Closed zerosnacks closed 2 years ago
No longer blocked
Blocked again..
I found out the major source of the problems I was having with testing comes down to the fact that for some odd reason the generated Foundry artifact does not include the bytecode / deployedBytecode for some files (not all) making it impossible to use in tests.
In tests the deployCode
does not throw but rather returns that the deployed address has a 0x
contract (empty).
"bytecode": {
"object": "0x",
"sourceMap": "",
"linkReferences": {}
},
"deployedBytecode": {
"object": "0x",
"sourceMap": "",
"linkReferences": {}
}
It appears to be generally limited to contracts without a constructor (Comptroller
), which makes sense. But also the Unitroller
which does have a constructor. In the Midas Protocol the bytecode is generated correctly.
@sriyantra do you know of a way we could deploy a new instance of a Comptroller
in our tests?
I don't really see a way we are able to port the unit-style tests from Midas without it.
Unblocked, resolved in #39 for now. I have merged it already into here to resolve the blocker
Closed https://github.com/Rari-Capital/fuse-v1/pull/17
Closing this ticket, decided not to port tests 1:1 from Midas but rather take some of their core learnings and implement them separately.
Relevant tests to port:
Future: