Skip to content

How I can get multiple value from requestReadContract function? #99

Closed
@afdaldev

Description

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)

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions