Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compare dev > main #681

Open
wants to merge 105 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
0c332ad
Rename params
ngmachado Apr 10, 2024
827d3d5
Merge branch 'dev' into basic_action_change_arg_name
pi0neerpat Apr 22, 2024
2a66eea
Merge pull request #612 from open-dollar:basic_action_change_arg_name
pi0neerpat Apr 22, 2024
df01844
add target to codecov
ngmachado Apr 23, 2024
9a6140d
removed extra 'startBroadcast' line (#647)
MrDeadCe11 Apr 23, 2024
4c351d2
Merge pull request #649 from open-dollar/618
pi0neerpat Apr 24, 2024
e8fb328
Update timelock mindelay (#651)
MrDeadCe11 Apr 24, 2024
270c4cd
Gov script modifiable per collateral (#654)
MrDeadCe11 Apr 24, 2024
3b4b4a2
4 21 24 deployment (#643)
cupOJoseph Apr 24, 2024
b3de720
Add script DeployVault721Mainnet (#648)
pi0neerpat Apr 25, 2024
a3b03cc
Fix readme table
pi0neerpat Apr 25, 2024
e10a139
add proxy singleton script (#657)
daopunk Apr 26, 2024
51fce2f
Gov script improvements (#653)
MrDeadCe11 Apr 29, 2024
66d7f86
Fix Basic actions (#659)
MrDeadCe11 Apr 29, 2024
7665e9a
update stabilityFee and svg text
daopunk May 1, 2024
6fde524
governor => tlc_gov
daopunk May 1, 2024
f8a864f
edit comment, rm broadcasts
daopunk May 1, 2024
a42b4eb
follow sol rules
daopunk May 1, 2024
17ba796
update collateral text
daopunk May 1, 2024
b9204b1
update collateral & debt lookups
daopunk May 1, 2024
153a8fa
add saviour gas burner (#661)
ngmachado May 1, 2024
2263ed2
svg changes
daopunk May 1, 2024
5f948a3
edit svg
daopunk May 1, 2024
1b99626
Add DeployNFTRendererMainnet
pi0neerpat May 1, 2024
a106091
add stabilityFee mapping
daopunk May 1, 2024
afb8e5a
Merge branch 'nfv-stabilityFee' of https://github.com/open-dollar/od-…
daopunk May 1, 2024
1588c61
Update DeployNFTRendererMainnet to call updateStabilityFee
pi0neerpat May 1, 2024
3651fcc
Deploy new NFV Renderer
pi0neerpat May 1, 2024
a2beffb
Merge pull request #667 from open-dollar/nfv-stabilityFee
daopunk May 1, 2024
2bb7d4e
nod to v20 (#670)
pi0neerpat May 3, 2024
c14764f
Update Revoke Script (#668)
daopunk May 3, 2024
58b698e
Basic action exit deltaDebt fix (#674)
MrDeadCe11 May 3, 2024
5e00e76
Add collateral sepolia test (#666)
MrDeadCe11 May 3, 2024
b4acf9b
pass tests
daopunk May 3, 2024
42948f1
create PrankSwitch contract
daopunk May 3, 2024
abcea67
add use case comment
daopunk May 3, 2024
a7db9bc
edit comment
daopunk May 3, 2024
b4e60b8
Merge pull request #669 from open-dollar/update-var-name
daopunk May 3, 2024
b009bcc
reenter test
daopunk May 3, 2024
0a69bff
Merge pull request #676 from open-dollar/fix-nfvRenderer-tests
daopunk May 3, 2024
7c23916
Update readme
pi0neerpat May 3, 2024
a76a92b
simplify logic
daopunk May 3, 2024
0cec1c4
Deploy basic actions 5-3-24 (#679)
pi0neerpat May 4, 2024
06cbc01
Merge pull request #677 from open-dollar/prankSwitch-refactor
daopunk May 5, 2024
c6fa21b
Merge branch 'dev' into sepoliaDeploymentTest
daopunk May 6, 2024
738315c
rm redundant test
daopunk May 6, 2024
83dbbe4
add E2EDeploymentMainnetTest
daopunk May 6, 2024
0dc26ee
refactor
daopunk May 6, 2024
7a1d63d
change var name
daopunk May 6, 2024
caa16cc
E2e safemanager tests (#680)
MrDeadCe11 May 6, 2024
26e3825
Merge pull request #678 from open-dollar/sepoliaDeploymentTest
daopunk May 7, 2024
045a96a
increase by magnitude
daopunk May 7, 2024
c0bebcc
fixed tests (#686)
MrDeadCe11 May 7, 2024
3d31abf
Merge pull request #685 from open-dollar/increase-fuzz-reject-rate
daopunk May 7, 2024
a42668d
pass tests
daopunk May 7, 2024
4597b99
Merge pull request #688 from open-dollar/fix-gov-test
daopunk May 9, 2024
db72c32
fix interface
daopunk May 9, 2024
08c9353
Merge pull request #693 from open-dollar/fix-safeManager-proxy
daopunk May 10, 2024
853efb8
cleantree
daopunk May 11, 2024
7aac224
forge install: ds-test
daopunk May 11, 2024
b7575ae
Update export action (#684)
pi0neerpat May 11, 2024
11a7f5a
Merge branch 'dev' into fix-imports
pi0neerpat May 11, 2024
7321f6b
Merge pull request #697 from open-dollar/fix-imports
daopunk May 12, 2024
1e6213e
solidity-exporter-actions v2.0.15
pi0neerpat May 13, 2024
5e2be44
exporter-action to v2.0.16
pi0neerpat May 13, 2024
bec4076
Add example flexible proposal (#695)
pi0neerpat May 21, 2024
d24ccc4
change test params
daopunk May 21, 2024
e31c215
Merge pull request #706 from open-dollar/fix-package
daopunk May 21, 2024
22d75d0
691 allow script gen (#705)
MrDeadCe11 May 22, 2024
04ddd4b
add allow safe call to the protectSafe function in basicActions. (#704)
MrDeadCe11 May 22, 2024
93ab5d0
increase readability
daopunk May 22, 2024
7ecf592
increase readability
daopunk May 22, 2024
c2beba2
Update export-abis.yml (#709)
pi0neerpat May 24, 2024
0f28885
Remove shadow declaration warnings from scripts (#710)
pi0neerpat Jun 3, 2024
5ca9dfe
Merge pull request #708 from open-dollar/fix-math
daopunk Jun 5, 2024
8de75a0
add pessimistic report
pi0neerpat Jun 13, 2024
d6742b6
update common actions deployment script (#719)
pi0neerpat Jun 19, 2024
aa32dc9
Remove governance manager (#726)
MrDeadCe11 Jun 28, 2024
7f2c4f4
add tokens to mainnet fork setup
daopunk Jun 29, 2024
e2c07a6
add test oracles
daopunk Jun 29, 2024
317262a
fix test
daopunk Jun 29, 2024
d805d33
Merge pull request #727 from open-dollar/token-setup
daopunk Jun 29, 2024
c104e73
add liq test
daopunk Jul 3, 2024
f8bf2dc
edit comment
daopunk Jul 3, 2024
31edfb2
change test params
daopunk Jul 3, 2024
b30ce33
add liquidation tests
daopunk Jul 4, 2024
3a0d416
add more details about liquidation
daopunk Jul 5, 2024
482434a
format emits
daopunk Jul 8, 2024
478d50b
add OD fix
daopunk Jul 9, 2024
984c17c
Merge pull request #731 from open-dollar/liq-test
daopunk Jul 9, 2024
234e7c3
refactor cast tokens
daopunk Jul 9, 2024
31c8796
Merge pull request #735 from open-dollar/test-deploy-refactor
daopunk Jul 11, 2024
5f1f266
init
daopunk Jul 12, 2024
5e5466a
add address book
daopunk Jul 12, 2024
62462d5
add common functions
daopunk Jul 12, 2024
878ce28
add common setup functions
daopunk Jul 12, 2024
0843a8a
refine imports
daopunk Jul 12, 2024
eea5c60
refine imports
daopunk Jul 12, 2024
4229080
remove redundant code
daopunk Jul 12, 2024
bfcc410
fix warnings
daopunk Jul 13, 2024
161d990
Merge pull request #737 from open-dollar/address-book
daopunk Jul 13, 2024
c1dff81
fix arb safetyPrice
daopunk Jul 24, 2024
09fafe5
add coverage badge
pi0neerpat Jul 24, 2024
00b33fa
Merge pull request #741 from open-dollar/arb-test-params
daopunk Jul 24, 2024
522eb99
Add 3% per year
pi0neerpat Jul 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update stabilityFee and svg text
  • Loading branch information
daopunk committed May 1, 2024
commit 7665e9aa3fbe656e9d79abb75d7b73f7b144303a
47 changes: 47 additions & 0 deletions broadcast/DeploySingleton.s.sol/42161/run-1714063204.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"transactions": [
{
"hash": "0xa7d2e787917487b732ac14443d7f2e436f8b6a01279040bd6f68a20bd39f51d5",
"transactionType": "CALL",
"contractName": null,
"contractAddress": null,
"function": null,
"arguments": null,
"transaction": {
"from": "0xa0313248556dea42fd17b345817dd5dc5674c1e1",
"value": "0x0",
"input": "0x60a060405234801561001057600080fd5b506040516107e83803806107e883398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b60805161075161009760003960008181604b0152818160e4015261017c01526107516000f3fe6080604052600436106100345760003560e01c8063117803e3146100395780631b6bb66f146100975780631cff79cd146100b7575b600080fd5b34801561004557600080fd5b5061006d7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6100aa6100a536600461055c565b6100ca565b60405161008e91906106c5565b6100aa6100c536600461055c565b610162565b60603373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461013b576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61015b73ffffffffffffffffffffffffffffffffffffffff841683610240565b9392505050565b60603373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146101d3576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316610220576040517f8de42c8300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61015b73ffffffffffffffffffffffffffffffffffffffff841683610284565b606061015b838360006040518060400160405280601e81526020017f416464726573733a206c6f772d6c6576656c2063616c6c206661696c656400008152506102a9565b606061015b83836040518060600160405280602781526020016106f5602791396103c9565b606082471015610340576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161036991906106d8565b60006040518083038185875af1925050503d80600081146103a6576040519150601f19603f3d011682016040523d82523d6000602084013e6103ab565b606091505b50915091506103bc8783838761044e565b925050505b949350505050565b60606000808573ffffffffffffffffffffffffffffffffffffffff16856040516103f391906106d8565b600060405180830381855af49150503d806000811461042e576040519150601f19603f3d011682016040523d82523d6000602084013e610433565b606091505b50915091506104448683838761044e565b9695505050505050565b606083156104e45782516000036104dd5773ffffffffffffffffffffffffffffffffffffffff85163b6104dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610337565b50816103c1565b6103c183838151156104f95781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161033791906106c5565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000806040838503121561056f57600080fd5b823573ffffffffffffffffffffffffffffffffffffffff8116811461059357600080fd5b9150602083013567ffffffffffffffff808211156105b057600080fd5b818501915085601f8301126105c457600080fd5b8135818111156105d6576105d661052d565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561061c5761061c61052d565b8160405282815288602084870101111561063557600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b8381101561067257818101518382015260200161065a565b50506000910152565b60008151808452610693816020860160208601610657565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061015b602083018461067b565b600082516106ea818460208701610657565b919091019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220fcf593e91cbc5a611cc864261ffadf02fd0a8dee73114890cbddcf0f981862a464736f6c634300081400330000000000000000000000001804c8ab1f12e6bbf3894d4083f33e07309d1f38",
"nonce": "0x13",
"chainId": "0xa4b1"
},
"additionalContracts": [],
"isFixedGasLimit": false
}
],
"receipts": [
{
"status": "0x1",
"cumulativeGasUsed": "0x164bb5",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"type": "0x2",
"transactionHash": "0xa7d2e787917487b732ac14443d7f2e436f8b6a01279040bd6f68a20bd39f51d5",
"transactionIndex": "0x4",
"blockHash": "0xb53531602c5de92f9fa51ab5a5d78230d3d9e68d0c7c917e243e07aeb1017728",
"blockNumber": "0xc33ef0e",
"gasUsed": "0xe6913",
"effectiveGasPrice": "0x989680",
"from": "0xa0313248556dea42fd17b345817dd5dc5674c1e1",
"to": null,
"contractAddress": "0x544a9dad6d954fd2e659bbe017b2e53ba595d320",
"gasUsedForL1": "0x77172",
"l1BlockNumber": "0x12d1c7c"
}
],
"libraries": [],
"pending": [],
"returns": {},
"timestamp": 1714063204,
"chain": 42161,
"commit": "2cd378e7"
}
47 changes: 47 additions & 0 deletions broadcast/DeploySingleton.s.sol/42161/run-1714230736.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"transactions": [
{
"hash": "0x272c56e13db5ecea8b21c2c7f8ad4ea66595397aca919107e06c642b740ca7c7",
"transactionType": "CALL",
"contractName": null,
"contractAddress": null,
"function": null,
"arguments": null,
"transaction": {
"from": "0xa0313248556dea42fd17b345817dd5dc5674c1e1",
"value": "0x0",
"input": "0x60a060405234801561001057600080fd5b506040516107e83803806107e883398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b60805161075161009760003960008181604b0152818160e4015261017c01526107516000f3fe6080604052600436106100345760003560e01c8063117803e3146100395780631b6bb66f146100975780631cff79cd146100b7575b600080fd5b34801561004557600080fd5b5061006d7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6100aa6100a536600461055c565b6100ca565b60405161008e91906106c5565b6100aa6100c536600461055c565b610162565b60603373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461013b576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61015b73ffffffffffffffffffffffffffffffffffffffff841683610240565b9392505050565b60603373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146101d3576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316610220576040517f8de42c8300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61015b73ffffffffffffffffffffffffffffffffffffffff841683610284565b606061015b838360006040518060400160405280601e81526020017f416464726573733a206c6f772d6c6576656c2063616c6c206661696c656400008152506102a9565b606061015b83836040518060600160405280602781526020016106f5602791396103c9565b606082471015610340576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161036991906106d8565b60006040518083038185875af1925050503d80600081146103a6576040519150601f19603f3d011682016040523d82523d6000602084013e6103ab565b606091505b50915091506103bc8783838761044e565b925050505b949350505050565b60606000808573ffffffffffffffffffffffffffffffffffffffff16856040516103f391906106d8565b600060405180830381855af49150503d806000811461042e576040519150601f19603f3d011682016040523d82523d6000602084013e610433565b606091505b50915091506104448683838761044e565b9695505050505050565b606083156104e45782516000036104dd5773ffffffffffffffffffffffffffffffffffffffff85163b6104dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610337565b50816103c1565b6103c183838151156104f95781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161033791906106c5565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000806040838503121561056f57600080fd5b823573ffffffffffffffffffffffffffffffffffffffff8116811461059357600080fd5b9150602083013567ffffffffffffffff808211156105b057600080fd5b818501915085601f8301126105c457600080fd5b8135818111156105d6576105d661052d565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561061c5761061c61052d565b8160405282815288602084870101111561063557600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b8381101561067257818101518382015260200161065a565b50506000910152565b60008151808452610693816020860160208601610657565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061015b602083018461067b565b600082516106ea818460208701610657565b919091019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220fcf593e91cbc5a611cc864261ffadf02fd0a8dee73114890cbddcf0f981862a464736f6c634300081400330000000000000000000000001804c8ab1f12e6bbf3894d4083f33e07309d1f38",
"nonce": "0x14",
"chainId": "0xa4b1"
},
"additionalContracts": [],
"isFixedGasLimit": false
}
],
"receipts": [
{
"status": "0x1",
"cumulativeGasUsed": "0x9d613",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"type": "0x2",
"transactionHash": "0x272c56e13db5ecea8b21c2c7f8ad4ea66595397aca919107e06c642b740ca7c7",
"transactionIndex": "0x2",
"blockHash": "0x9d3aba9ff83111716a46eca6129cf12937537583791c417a8e074f38bbc61833",
"blockNumber": "0xc3e0623",
"gasUsed": "0x93c07",
"effectiveGasPrice": "0x989680",
"from": "0xa0313248556dea42fd17b345817dd5dc5674c1e1",
"to": null,
"contractAddress": "0xade3a5fb6c099aa4830e33074c9f3fccc129c504",
"gasUsedForL1": "0x24466",
"l1BlockNumber": "0x12d5296"
}
],
"libraries": [],
"pending": [],
"returns": {},
"timestamp": 1714230736,
"chain": 42161,
"commit": "2cd378e7"
}
47 changes: 47 additions & 0 deletions broadcast/DeploySingleton.s.sol/42161/run-latest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"transactions": [
{
"hash": "0x272c56e13db5ecea8b21c2c7f8ad4ea66595397aca919107e06c642b740ca7c7",
"transactionType": "CALL",
"contractName": null,
"contractAddress": null,
"function": null,
"arguments": null,
"transaction": {
"from": "0xa0313248556dea42fd17b345817dd5dc5674c1e1",
"value": "0x0",
"input": "0x60a060405234801561001057600080fd5b506040516107e83803806107e883398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b60805161075161009760003960008181604b0152818160e4015261017c01526107516000f3fe6080604052600436106100345760003560e01c8063117803e3146100395780631b6bb66f146100975780631cff79cd146100b7575b600080fd5b34801561004557600080fd5b5061006d7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6100aa6100a536600461055c565b6100ca565b60405161008e91906106c5565b6100aa6100c536600461055c565b610162565b60603373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461013b576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61015b73ffffffffffffffffffffffffffffffffffffffff841683610240565b9392505050565b60603373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146101d3576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316610220576040517f8de42c8300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61015b73ffffffffffffffffffffffffffffffffffffffff841683610284565b606061015b838360006040518060400160405280601e81526020017f416464726573733a206c6f772d6c6576656c2063616c6c206661696c656400008152506102a9565b606061015b83836040518060600160405280602781526020016106f5602791396103c9565b606082471015610340576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161036991906106d8565b60006040518083038185875af1925050503d80600081146103a6576040519150601f19603f3d011682016040523d82523d6000602084013e6103ab565b606091505b50915091506103bc8783838761044e565b925050505b949350505050565b60606000808573ffffffffffffffffffffffffffffffffffffffff16856040516103f391906106d8565b600060405180830381855af49150503d806000811461042e576040519150601f19603f3d011682016040523d82523d6000602084013e610433565b606091505b50915091506104448683838761044e565b9695505050505050565b606083156104e45782516000036104dd5773ffffffffffffffffffffffffffffffffffffffff85163b6104dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610337565b50816103c1565b6103c183838151156104f95781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161033791906106c5565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000806040838503121561056f57600080fd5b823573ffffffffffffffffffffffffffffffffffffffff8116811461059357600080fd5b9150602083013567ffffffffffffffff808211156105b057600080fd5b818501915085601f8301126105c457600080fd5b8135818111156105d6576105d661052d565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561061c5761061c61052d565b8160405282815288602084870101111561063557600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b8381101561067257818101518382015260200161065a565b50506000910152565b60008151808452610693816020860160208601610657565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061015b602083018461067b565b600082516106ea818460208701610657565b919091019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220fcf593e91cbc5a611cc864261ffadf02fd0a8dee73114890cbddcf0f981862a464736f6c634300081400330000000000000000000000001804c8ab1f12e6bbf3894d4083f33e07309d1f38",
"nonce": "0x14",
"chainId": "0xa4b1"
},
"additionalContracts": [],
"isFixedGasLimit": false
}
],
"receipts": [
{
"status": "0x1",
"cumulativeGasUsed": "0x9d613",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"type": "0x2",
"transactionHash": "0x272c56e13db5ecea8b21c2c7f8ad4ea66595397aca919107e06c642b740ca7c7",
"transactionIndex": "0x2",
"blockHash": "0x9d3aba9ff83111716a46eca6129cf12937537583791c417a8e074f38bbc61833",
"blockNumber": "0xc3e0623",
"gasUsed": "0x93c07",
"effectiveGasPrice": "0x989680",
"from": "0xa0313248556dea42fd17b345817dd5dc5674c1e1",
"to": null,
"contractAddress": "0xade3a5fb6c099aa4830e33074c9f3fccc129c504",
"gasUsedForL1": "0x24466",
"l1BlockNumber": "0x12d5296"
}
],
"libraries": [],
"pending": [],
"returns": {},
"timestamp": 1714230736,
"chain": 42161,
"commit": "2cd378e7"
}
14 changes: 11 additions & 3 deletions src/contracts/proxies/NFTRenderer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ contract NFTRenderer {
using Math for uint256;
using DateTime for uint256;

uint256 internal constant _RAY = 10 ** 27;
uint256 internal constant _RAY = 1e27;

IVault721 public immutable vault721;

Expand Down Expand Up @@ -172,7 +172,7 @@ contract NFTRenderer {
params.state = state;
}
ITaxCollector.TaxCollectorCollateralData memory taxData = _taxCollector.cData(cType);
params.stabilityFee = (taxData.nextStabilityFee / _RAY).toString();
params.stabilityFee = _formatNumberForSvgRay(taxData.nextStabilityFee);

return params;
}
Expand Down Expand Up @@ -264,7 +264,7 @@ contract NFTRenderer {
string memory debtDetail;
if (ratio != 0) {
debtDetail = string.concat(
'<text fill="#00587E" xml:space="preserve" font-weight="600"><tspan x="102" y="168.9">DEBT MINTED</tspan></text><text fill="#D0F1FF" xml:space="preserve" font-size="24"><tspan x="102" y="194">',
'<text fill="#00587E" xml:space="preserve" font-weight="600"><tspan x="102" y="168.9">DEBT</tspan></text><text fill="#D0F1FF" xml:space="preserve" font-size="24"><tspan x="102" y="194">',
debt,
' OD',
'</tspan></text><text fill="#00587E" xml:space="preserve" font-weight="600"><tspan x="102" y="229.9">COLLATERAL DEPOSITED</tspan></text><text fill="#D0F1FF" xml:space="preserve" font-size="24"><tspan x="102" y="255">',
Expand Down Expand Up @@ -376,6 +376,14 @@ contract NFTRenderer {
return _parseNumberWithComma(left, right);
}

function _formatNumberForSvgRay(uint256 num) internal pure returns (string memory) {
uint256 left = num / _RAY;
uint256 expLeft = left * _RAY;
uint256 expRight = num - expLeft;
uint256 right = expRight / 1e25; // format to 4 decimal places
return _parseNumber(left, right);
}

/**
* @dev converts uint from wei fixed-point to ether floating-point format
*/
Expand Down
Loading