filecoin-project / filecoin-solidity

Filecoin Solidity API Library
Other
17 stars 11 forks source link

Type conversion problem #55

Closed ttsszzyy closed 3 months ago

ttsszzyy commented 6 months ago
image

ProviderError: message execution failed: exit 33, revert reason: none, vm error: message failed with backtrace: 00: f0100468 (method 3844450837) -- contract reverted (33) 01: f0100468 (method 6) -- out of gas (7) (RetCode=33) at HttpProvider.request (/Users/yangyang/Documents/workspace/chain/test/node_modules/hardhat/src/internal/core/providers/http.ts:90:21) at processTicksAndRejections (node:internal/process/task_queues:95:5) at async staticCallResult (/Users/yangyang/Documents/workspace/chain/test/node_modules/ethers/src.ts/contract/contract.ts:337:22) at async staticCall (/Users/yangyang/Documents/workspace/chain/test/node_modules/ethers/src.ts/contract/contract.ts:303:24) at async Proxy.getAvailableBalance (/Users/yangyang/Documents/workspace/chain/test/node_modules/ethers/src.ts/contract/contract.ts:351:41) at async getAvailableBalance (/Users/yangyang/Documents/workspace/chain/test/scripts/Miner.ts:51:18) at async main (/Users/yangyang/Documents/workspace/chain/test/scripts/Miner.ts:66:3)

### Tasks
ttsszzyy commented 6 months ago

I am currently using Solidity version 0.8.24 because I am using the AccessManager feature from OpenZeppelin. When using toUint256 from BigInts, an error occurs. If I directly return CommonTypes.BigInt, the method call works correctly. How can I solve this issue?

ttsszzyy commented 6 months ago
image