wighawag / forge-deploy

MIT License
113 stars 10 forks source link

tests failing with v0.0.37 #4

Closed 0xCalibur closed 1 year ago

0xCalibur commented 1 year ago

Trying to port my tests to 0.0.37 but it's failing with

[FAIL. Reason: No cheatcode access granted for: 0x666f7267652d6465706c6f790000000000000000, see `vm.allowCheatcodes()`]

Repo/branch https://github.com/Abracadabra-money/abracadabra-money-contracts/tree/mim-layerzero

All my working in v0.0.36. For now I made a LegacyBaseTest so it's using barebone FoundryScript but would like to keep my repo up to date as you release new versions.

image
wighawag commented 1 year ago

oh, that's interesting

reading https://book.getfoundry.sh/cheatcodes/allow-cheatcodes

i think it is because now the deployer is not deployed normally but its deployed code is injected at address 0x666f7267652d6465706C6f790000000000000000 which represent "forge-deploy" in hex format

and because of that it does not inherit the cheatcode access

I probably need to call vm.allowCheatcodes(0x666f7267652d6465706C6f790000000000000000)

wighawag commented 1 year ago

I pushed v0.1.0 that now callvm.allowCheatcodes Did not tested but now I ll push patch version to only update sol files, as before now, I had to rebuild the binary

let me know if the issue is still there

0xCalibur commented 1 year ago

I'm confirming this is now working. closing the issue, thx