Closed hieronx closed 3 years ago
Please make sure src/DssSpell.t.sol
has only the needed changes for this spell. I see several differences that should not exist (formatting, spaces, uint256 => uint, missing functions, missing or extra comments, etc).
The diff should only show remotion of specific things of the prev spell and addendums of this specific new spell + the new collaterals in the structure.
Whatever remains in this PR will be the base for the next ones so we should make sure the test file doesn't get altered in any case that doesn't correspond.
Please make sure
src/DssSpell.t.sol
has only the needed changes for this spell. I see several differences that should not exist (formatting, spaces, uint256 => uint, missing functions, missing or extra comments, etc).
@gbalabasquer these differences you mention are the differences that exist between the spell tests in the maker kovan spells repo and the maker mainnet spells repo. @godsflaw has told us that we should keep the differences between the kovan and mainnet versions as small as possible, which is why we've put it together like this.
@gbalabasquer these differences you mention are the differences that exist between the spell tests in the maker kovan spells repo and the maker mainnet spells repo. @godsflaw has told us that we should keep the differences between the kovan and mainnet versions as small as possible, which is why we've put it together like this.
I guess he meant the test functions, but having the template changed shouldn't be the case. Each week we use the prev spell files as base for the new one. With this approach, the template is broken. Having minimum changes between spells is also helpful to detect exactly what is new in the system.
I just pushed a commit which reverts the changes that are not related to this spell.
Not sure where the others are with their reviews, but this pretty much LGTM except that we are waiting on the exec copy to be done so we can add the hash. There's also been some discussion that we might add the changes from last week here since the previous executive is having trouble passing.
dapp-test: rpc block: latest Running 16 tests for src/DssSpell.t.sol:DssSpellTest [PASS] testFail_notScheduled() (gas: 4759) [PASS] test_auth_in_sources() (gas: 281473904021917) [PASS] test_use_eta() (gas: 171113) [PASS] testOnTime() (gas: 6769842) [PASS] test_nextCastTime() (gas: 171955) [PASS] testFailTooEarly() (gas: 3501) [PASS] test_bytecode_matches() (gas: 2310700) [PASS] test_auth() (gas: 281473906858052) [PASS] testSpellIsCast_GENERAL() (gas: 13766183) [PASS] testManagerWards() (gas: 29565) [PASS] testFailWrongDay() (gas: 3655) [PASS] testCastCost() (gas: 6771456) [PASS] testNewChainlogValues() (gas: 6814928) [PASS] test_RWA_values() (gas: 8433612) [PASS] testNewIlkRegistryValues() (gas: 6849127) [PASS] testFailTooLate() (gas: 3853)
Running 2 tests for src/DssSpellManager.t.sol:DssSpellManagerTest [PASS] testWipeAndExit() (gas: 934898) [PASS] testJoinAndDraw() (gas: 592691)
Tests with changes for deployed spell:
Running 16 tests for src/DssSpell.t.sol:DssSpellTest
[PASS] testFail_notScheduled() (gas: 9759)
[PASS] test_auth_in_sources() (gas: 281473904021948)
[PASS] test_use_eta() (gas: 322773)
[PASS] testOnTime() (gas: 6921502)
[PASS] test_nextCastTime() (gas: 323615)
[PASS] testFailTooEarly() (gas: 8501)
[PASS] test_bytecode_matches() (gas: 2317700)
[PASS] test_auth() (gas: 281473906858084)
[PASS] testSpellIsCast_GENERAL() (gas: 16222006)
[PASS] testManagerWards() (gas: 29565)
[PASS] testFailWrongDay() (gas: 8655)
[PASS] testCastCost() (gas: 6923116)
[PASS] testNewChainlogValues() (gas: 6966588)
[PASS] test_RWA_values() (gas: 8585272)
[PASS] testNewIlkRegistryValues() (gas: 7000787)
[PASS] testFailTooLate() (gas: 8853)
Running 2 tests for src/DssSpellManager.t.sol:DssSpellManagerTest
[PASS] testWipeAndExit() (gas: 934898)
[PASS] testJoinAndDraw() (gas: 592691)
Tests pass on deployed spell--will approve on merging of deployed spell commit and archival.
Just archived it @kmbarry1
Description
Contribution Checklist
(PE-<TICKET_NUMBER>)
Checklist
officeHours
modifier4 days
monthly and30 days
for the rest)ETH_GAS="XXX" ETH_GAS_PRICE="YYY" make deploy
mainnet
contract on etherscanDssSpell.sol
andDssSpell.t.sol
the same, but make a copy inarchive
squash and merge
this PRCentrifuge Asset Checklist
A few notes about scope.
In scope:
Out of scope (unless you really want to):
checklist
RWA003
MCD_JOIN
(join adapter)MCD_JOIN_RWA002_A
linkvat
address matches changelogilk
is thebytes32
representation of "RWANNN-A"seth --to-bytes32 $(seth --from-ascii "RWANNN")
to get correct value for comparisongem
matches theGEM
value from the Centrifuge configwards
denied
URN
address from this config has beenrelied
relied
relied
(check internal transactions)GEM
(dummy token used as collateral in adapter)RWA002
link TODO(after this batch, we should probably compare toRWA003
since they changed the code a bit)name
is inRWA-NNN
formatsymbol
is inRWANNN
formattotalSupply
is1000000000000000000
(10^18)totalSupply
over to the manager (OPERATOR
address below)OPERATOR
(aka "manager" and same as both conduits)RWA002_A_INPUT_CONDUIT
linkdai
address matches changelog (MCD_DAI
) addressdaiJoin
address matches changelog (MCD_JOIN_DAI
) addressend
address matches changelog (MCD_END
) addressgem
address matches (DROP
) from the test valuesliq
address matches changelog (MIP21_LIQUIDATION_ORACLE
) addressurn
address is zero (if spell is formainnet
) OR matchesURN
from this config (if spell is for a testnet)vat
address matches changelog (MCD_VAT
) addressvow
address matches changelog (MCD_VOW
) addresswards
rely()
has been called withROOT
from the test valuesrely()
has been called on theclerk
deny()
has been called on the contract's deployer addressINPUT_CONDUIT
is the same address asOPERATOR
OUTPUT_CONDUIT
is the same address asOPERATOR
URN
RWA002_A_URN
linkdaiJoin
address matches changelog (MCD_JOIN_DAI
) addressgemJoin
address matchesMCD_JOIN
from this configjug
address matches changelog (MCD_JUG
) addressoutputConduit
address matchesOUTPUT_CONDUIT
from this configvat
address matches changelog (MCD_VAT
) addresswards
MCD_PAUSE_PROXY
) has beenrelied
denied
wards
have been added (check internal txes)gemID
is formatted asRWANNN
joinID
is formatted asMCD_JOIN_RWANNN_A
urnID
is formatted asRWANNN_A_URN
inputConduitID
is formatted asRWANNN_A_INPUT_CONDUIT
outputConduitID
is formatted asRWANNN_A_OUTPUT_CONDUIT
pipID
is formatted asPIP_RWANNN
ilk
is formatted asRWANNN-A
ilk_string
is formatted asRWANNN-A
ilkRegistryName
is formatted asRWANNN-A: Centrifuge: <entity>
RATE
matches the intended value when converted to a yearly APY and matches the value in the pollCEIL
matches the debt ceiling value specified in the pollPRICE
is [(CEIL
+ 2 years of fees)MAT
10^14] (e.g. 2 10^6 1.06^2 * 1.05)MAT
corresponds to the collateralization ratio specified in the pollTAU
is usually 0, but can be used as a grace period to remediate and cure()DOC
is the IPFS hash of the correct DROP token subscription agreementRWA004
MCD_JOIN
(join adapter)MCD_JOIN_RWA002_A
linkvat
address matches changelogilk
is thebytes32
representation of "RWANNN-A"seth --to-bytes32 $(seth --from-ascii "RWANNN")
to get correct value for comparisongem
matches theGEM
value from the Centrifuge configwards
denied
URN
address from this config has beenrelied
relied
relied
(check internal transactions)GEM
(dummy token used as collateral in adapter)RWA002
link TODO(after this batch, we should probably compare toRWA003
since they changed the code a bit)name
is inRWA-NNN
formatsymbol
is inRWANNN
formattotalSupply
is1000000000000000000
(10^18)totalSupply
over to the manager (OPERATOR
address below)OPERATOR
(aka "manager" and same as both conduits)RWA002_A_INPUT_CONDUIT
linkdai
address matches changelog (MCD_DAI
) addressdaiJoin
address matches changelog (MCD_JOIN_DAI
) addressend
address matches changelog (MCD_END
) addressgem
address matches (DROP
) from the test valuesliq
address matches changelog (MIP21_LIQUIDATION_ORACLE
) addressurn
address is zero (if spell is formainnet
) OR matchesURN
from this config (if spell is for a testnet)vat
address matches changelog (MCD_VAT
) addressvow
address matches changelog (MCD_VOW
) addresswards
rely()
has been called withROOT
from the test valuesrely()
has been called on theclerk
deny()
has been called on the contract's deployer addressINPUT_CONDUIT
is the same address asOPERATOR
OUTPUT_CONDUIT
is the same address asOPERATOR
URN
RWA002_A_URN
linkdaiJoin
address matches changelog (MCD_JOIN_DAI
) addressgemJoin
address matchesMCD_JOIN
from this configjug
address matches changelog (MCD_JUG
) addressoutputConduit
address matchesOUTPUT_CONDUIT
from this configvat
address matches changelog (MCD_VAT
) addresswards
MCD_PAUSE_PROXY
) has beenrelied
denied
wards
have been added (check internal txes)gemID
is formatted asRWANNN
joinID
is formatted asMCD_JOIN_RWANNN_A
urnID
is formatted asRWANNN_A_URN
inputConduitID
is formatted asRWANNN_A_INPUT_CONDUIT
outputConduitID
is formatted asRWANNN_A_OUTPUT_CONDUIT
pipID
is formatted asPIP_RWANNN
ilk
is formatted asRWANNN-A
ilk_string
is formatted asRWANNN-A
ilkRegistryName
is formatted asRWANNN-A: Centrifuge: <entity>
RATE
matches the intended value when converted to a yearly APY and matches the value in the pollCEIL
matches the debt ceiling value specified in the pollPRICE
is [(CEIL
+ 2 years of fees)MAT
10^14] (e.g. 2 10^6 1.06^2 * 1.05)MAT
corresponds to the collateralization ratio specified in the pollTAU
is usually 0, but can be used as a grace period to remediate and cure()DOC
is the IPFS hash of the correct DROP token subscription agreementRWA005
MCD_JOIN
(join adapter)MCD_JOIN_RWA002_A
linkvat
address matches changelogilk
is thebytes32
representation of "RWANNN-A"seth --to-bytes32 $(seth --from-ascii "RWANNN")
to get correct value for comparisongem
matches theGEM
value from the Centrifuge configwards
denied
URN
address from this config has beenrelied
relied
relied
(check internal transactions)GEM
(dummy token used as collateral in adapter)RWA002
link TODO(after this batch, we should probably compare toRWA003
since they changed the code a bit)name
is inRWA-NNN
formatsymbol
is inRWANNN
formattotalSupply
is1000000000000000000
(10^18)totalSupply
over to the manager (OPERATOR
address below)OPERATOR
(aka "manager" and same as both conduits)RWA002_A_INPUT_CONDUIT
linkdai
address matches changelog (MCD_DAI
) addressdaiJoin
address matches changelog (MCD_JOIN_DAI
) addressend
address matches changelog (MCD_END
) addressgem
address matches (DROP
) from the test valuesliq
address matches changelog (MIP21_LIQUIDATION_ORACLE
) addressurn
address is zero (if spell is formainnet
) OR matchesURN
from this config (if spell is for a testnet)vat
address matches changelog (MCD_VAT
) addressvow
address matches changelog (MCD_VOW
) addresswards
rely()
has been called withROOT
from the test valuesrely()
has been called on theclerk
deny()
has been called on the contract's deployer addressINPUT_CONDUIT
is the same address asOPERATOR
OUTPUT_CONDUIT
is the same address asOPERATOR
URN
RWA002_A_URN
linkdaiJoin
address matches changelog (MCD_JOIN_DAI
) addressgemJoin
address matchesMCD_JOIN
from this configjug
address matches changelog (MCD_JUG
) addressoutputConduit
address matchesOUTPUT_CONDUIT
from this configvat
address matches changelog (MCD_VAT
) addresswards
MCD_PAUSE_PROXY
) has beenrelied
denied
wards
have been added (check internal txes)gemID
is formatted asRWANNN
joinID
is formatted asMCD_JOIN_RWANNN_A
urnID
is formatted asRWANNN_A_URN
inputConduitID
is formatted asRWANNN_A_INPUT_CONDUIT
outputConduitID
is formatted asRWANNN_A_OUTPUT_CONDUIT
pipID
is formatted asPIP_RWANNN
ilk
is formatted asRWANNN-A
ilk_string
is formatted asRWANNN-A
ilkRegistryName
is formatted asRWANNN-A: Centrifuge: <entity>
RATE
matches the intended value when converted to a yearly APY and matches the value in the pollCEIL
matches the debt ceiling value specified in the pollPRICE
is [(CEIL
+ 2 years of fees)MAT
10^14] (e.g. 2 10^6 1.06^2 * 1.05)MAT
corresponds to the collateralization ratio specified in the pollTAU
is usually 0, but can be used as a grace period to remediate and cure()DOC
is the IPFS hash of the correct DROP token subscription agreementRWA006
MCD_JOIN
(join adapter)MCD_JOIN_RWA002_A
linkvat
address matches changelogilk
is thebytes32
representation of "RWANNN-A"seth --to-bytes32 $(seth --from-ascii "RWANNN")
to get correct value for comparisongem
matches theGEM
value from the Centrifuge configwards
denied
URN
address from this config has beenrelied
relied
relied
(check internal transactions)GEM
(dummy token used as collateral in adapter)RWA002
link TODO(after this batch, we should probably compare toRWA003
since they changed the code a bit)name
is inRWA-NNN
formatsymbol
is inRWANNN
formattotalSupply
is1000000000000000000
(10^18)totalSupply
over to the manager (OPERATOR
address below)OPERATOR
(aka "manager" and same as both conduits)RWA002_A_INPUT_CONDUIT
linkdai
address matches changelog (MCD_DAI
) addressdaiJoin
address matches changelog (MCD_JOIN_DAI
) addressend
address matches changelog (MCD_END
) addressgem
address matches (DROP
) from the test valuesliq
address matches changelog (MIP21_LIQUIDATION_ORACLE
) addressurn
address is zero (if spell is formainnet
) OR matchesURN
from this config (if spell is for a testnet)vat
address matches changelog (MCD_VAT
) addressvow
address matches changelog (MCD_VOW
) addresswards
rely()
has been called withROOT
from the test valuesrely()
has been called on theclerk
deny()
has been called on the contract's deployer addressINPUT_CONDUIT
is the same address asOPERATOR
OUTPUT_CONDUIT
is the same address asOPERATOR
URN
RWA002_A_URN
linkdaiJoin
address matches changelog (MCD_JOIN_DAI
) addressgemJoin
address matchesMCD_JOIN
from this configjug
address matches changelog (MCD_JUG
) addressoutputConduit
address matchesOUTPUT_CONDUIT
from this configvat
address matches changelog (MCD_VAT
) addresswards
MCD_PAUSE_PROXY
) has beenrelied
denied
wards
have been added (check internal txes)gemID
is formatted asRWANNN
joinID
is formatted asMCD_JOIN_RWANNN_A
urnID
is formatted asRWANNN_A_URN
inputConduitID
is formatted asRWANNN_A_INPUT_CONDUIT
outputConduitID
is formatted asRWANNN_A_OUTPUT_CONDUIT
pipID
is formatted asPIP_RWANNN
ilk
is formatted asRWANNN-A
ilk_string
is formatted asRWANNN-A
ilkRegistryName
is formatted asRWANNN-A: Centrifuge: <entity>
RATE
matches the intended value when converted to a yearly APY and matches the value in the pollCEIL
matches the debt ceiling value specified in the poll (should be 0)PRICE
is [(CEIL
+ 2 years of fees)MAT
10^14] (e.g. 2 10^6 1.06^2 * 1.05) (currently should be 0)MAT
corresponds to the collateralization ratio specified in the pollTAU
is usually 0, but can be used as a grace period to remediate and cure()DOC
is the IPFS hash of the correct DROP token subscription agreementspell-wide checklist
MIP21_LIQUIDATION_ORACLE
from changelogGEM
from the configGEM
decimalsinit()
on the liqudation oraclepip
frominit()
in theSpotter
vat.init()
on theilk
jug.init()
on theilk
vat
ilk.line
and the globalvat.Line
MCD_SPOT
forilk
hopes
theOPERATOR
on theURN
CHANGELOG
GEM
stored undergemID
MCD_JOIN
stored underjoinID
URN
stored underurnID
INPUT_CONDUIT
stored underinputConduitID
OUTPUT_CONDUIT
stored underoutputConduitID
pip
stored underpipID