Closed mayconamaroCW closed 6 months ago
This is a total shot in the dark, but this might have something to do with the differences between how evm_setNextBlockTimestamp
works in stratus and hardhat. In hardhat each produced block timestamp is always one second after the previous block (I think ???).
At least is a place to start, thank you 🙏
Investigation updates:
claim()
cases that are not present in others is checkClaim()
balanceOf(address)
, so it is a call to BRLC/Mock
expect...to.changeTokenBalances
partI'll try to increase the timeout as suggested in mentioned issue
Another error happened https://github.com/cloudwalk/stratus/actions/runs/8605836237/job/23582964905
Function 'claim()'
Executes as expected if token balances are according to case 1 and
The amount equals a half of the possible primary yield:
Error: call revert exception [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ]
(method="balanceOf(address)", 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)
at processTicksAndRejections (node:internal/process/task_queues:95:5)```
Start point to investigation
https://docs.ethers.org/v5/troubleshooting/errors/#help-CALL_EXCEPTION
Common Causes
- The code does not exist on-chain. This may happen if you failed to wait until the contract was deployed, the address is incorrect or if you are connected to a different network than the contract has been deployed. Check the code exists using provider.getCode(address).
- The wrong code is being accessed, for example if an artifact file was not correctly updated so an older instance of the contract is being called
- The contract is failing during a require statement. For example, if a contract method requires an admin account to be used, but the contract is connected to another Signer.
- The wrong ABI is being used to interact with a contract.
Didn't seem to have happened again for one entire week
This needs investigation example