Open transmissions11 opened 3 years ago
hmm, no it should work, but I guess something might be wrong with the encoder
i'm having the same issue. any workaround?
the issue seems to be about method signature lookup. look at this trace of a successful call to a function that takes a struct as an argument (BreedingColor::[unknown method]
on setUp
):
$ dapp test -m testColorRequest
Running 1 tests for test/dapptools/BreedingColor.t.sol:BreedingColorTest
[BAIL] testColorRequest()
Failure: testColorRequest
test/dapptools/BreedingColor.t.sol:BreedingColorTest
├╴constructor
├╴setUp()
│ ├╴create MockLink@0xCe71065D4017F316EC606Fe4422e11eB2c47c246 (test/dapptools/BreedingColor.t.sol:17)
│ │ └╴← 2977 bytes of code
│ ├╴create BreedingColor@0x185a4dc360CE69bDCceE33b3784B0282f7961aea (test/dapptools/BreedingColor.t.sol:18)
│ │ ├╴RoleGranted() (node_modules/@openzeppelin/contracts/access/AccessControl.sol:200)
│ │ ├╴RoleGranted() (node_modules/@openzeppelin/contracts/access/AccessControl.sol:200)
│ │ ├╴RoleGranted() (node_modules/@openzeppelin/contracts/access/AccessControl.sol:200)
│ │ └╴← 16256 bytes of code
│ ├╴call BreedingColor::[unknown method](0x592f4d8700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000) (test/dapptools/BreedingColor.t.sol:24)
│ │ └╴← 0x
│ └╴call MockLink::mint(address,uint256)(BreedingColor@0x185a4dc360CE69bDCceE33b3784B0282f7961aea, 666) (test/dapptools/BreedingColor.t.sol:25)
│ ├╴Transfer(666) (node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol:258)
│ └╴← 0x
└╴testColorRequest()
├╴call BreedingColor::requestBreeding(uint256,uint256,uint256)(0, 0, 0) (test/dapptools/BreedingColor.t.sol:41)
│ └╴error Revert 0x (contracts/normal_deployment/BreedingColor.sol:146)
└╴error Revert 0x (test/dapptools/BreedingColor.t.sol:41)
I have a small test contract like this:
https://github.com/Rari-Capital/nova-invariants/blob/proveUpdatingGasConfig-demo/src/ExecutionManager.t.sol
L1_NovaExecutionManager.GasConfig
is a struct like so:https://github.com/Rari-Capital/nova/blob/3252ceea5e50d3c29be69861b77908a5b4f28815/contracts/L1_NovaExecutionManager.sol#L90-L103
Running
dapp test
yields:Even when switching the test from
prove
totest
it still unexpectedly reverts:Does hevm not support generating args for functions that take structs?