Open chancehudson opened 2 weeks ago
Attempting to reproduce the issue here but have not been successful. I'd guess the bug is somewhere in the zk-kit stack. It may be related to the hardhat version, that's the only way i've seen the error.
Hardhat versions before 2.14.0
will error when building poseidon for solidity >= 0.8.20
Ran your repo in a codespace but pointed it at hardhat network rather than sepolia, got this error.
$ yarn test
yarn run v1.22.22
$ hardhat test ./test/a.test.js
asfas
0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512
1) should execute
0 passing (798ms)
1 failing
1) asfas
should execute:
Error: call revert exception [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ] (method="test()", data="0x", errorArgs=null, errorName=null, errorSignature=null, reason=null, code=CALL_EXCEPTION, version=abi/5.7.0)
at Logger.makeError (node_modules/@ethersproject/logger/src.ts/index.ts:269:28)
at Logger.throwError (node_modules/@ethersproject/logger/src.ts/index.ts:281:20)
at Interface.decodeFunctionResult (node_modules/@ethersproject/abi/src.ts/interface.ts:427:23)
at Contract.<anonymous> (node_modules/@ethersproject/contracts/src.ts/index.ts:400:44)
at step (node_modules/@ethersproject/contracts/lib/index.js:48:23)
at Object.next (node_modules/@ethersproject/contracts/lib/index.js:29:53)
at fulfilled (node_modules/@ethersproject/contracts/lib/index.js:20:58)
So perhaps it's an issue with hardhat network?
I was able to get my original code working with hardhat network by adding an override to the compiler settings and deploying the contract, rather than relying on the deterministically deployed contracts.
overrides: {
"node_modules/poseidon-solidity/PoseidonT3.sol": {
settings: {
optimizer: {
enabled: true,
runs: 2 ** 32 - 1,
},
},
},
},
Describe the bug Bug was originally reported in discord. Relevant text below
To Reproduce Unclear
Screenshots
Technologies (please complete the following information):
Additional context