-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How I can get multiple value from requestReadContract function? #99
Comments
Hello, @afdaldev ! Could you post a reproducible pice of code so I can check? |
here @quetool .. and now i using web3dart to ReadContract. because, the return data is may you can change return of |
ABI
|
@afdaldev what should be the expected result? Could you provide a working example? using web3dart maybe? |
@quetool here : Web3Example i think you just need to change return of |
Hello @afdaldev I'll check this ASAP or you can also open a PR for this and I'll review it |
Hello @afdaldev! I just pushed a fix, could you check by using dependencies:
walletconnect_flutter_v2: ^2.2.2-beta02 If you instead need this fix on dependencies:
web3modal_flutter: ^3.1.2
dependency_overrides:
walletconnect_flutter_v2: ^2.2.2-beta02 |
i have try in : https://github.com/afdaldev/Web3Dart_Example/tree/testing_read_contract_with_web3modal thanks @quetool |
Hello @afdaldev! Are you ok with the current solution? if you don't get the proper response type you can try |
sure, this is good solution for me. because, i can get all information from my smart contract for |
Sounds good! I'll close this issue for now and I'll let you know then the fix is on web3modal as well. Thanks! |
Describe the bug
I try to read smart contract with requestReadContract,, for single value response is good.. but, for multiple value i just get response 1 value
Expected behavior
my expectation return list of value => [maxCap,lockedPeriod,apy ,rewardPercent,totalStaked]
My ABI:
"name": "pools",
"outputs": [
{"internalType": "uint256", "name": "maxCap", "type": "uint256"},
{"internalType": "uint256", "name": "lockedPeriod", "type": "uint256"},
{"internalType": "uint256", "name": "apy", "type": "uint256"},
{"internalType": "uint256", "name": "rewardPercent", "type": "uint256"},
{"internalType": "uint256", "name": "totalStaked", "type": "uint256"}
],
Actual behavior
I just get single response => result: 10000000000000000000000000 (value of maxCap)
The text was updated successfully, but these errors were encountered: