-
Notifications
You must be signed in to change notification settings - Fork 93
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
calling methods with "tuple" type return gives error #273
Comments
Can you give me an address or test data that makes this fail? Can you confirm this also happens with latest |
@q9f I see this happening too; I think it's because in the ABI file, the components are nested. Here's an example.
and calling contract with address "0xbb505c54d71e9e599cb8435b4f0ceec05fc71cbd" on Base. eg.
but from the ABI, Line 455 in 4182fa7
|
Thank you. I used this ABI to ensure the Abi::Type parser works correctly, it has all types, names, and components correctly. # name
"statusArr"
# type
<Eth::Abi::Type:0x000062dd59c2e4f0 @base_type="tuple", @dimensions=[0], @name=nil, @sub_type="">
# data
{"components"=>
[{"internalType"=>"uint256", "name"=>"reserveId", "type"=>"uint256"},
{"internalType"=>"address", "name"=>"underlyingTokenAddress", "type"=>"address"},
{"internalType"=>"address", "name"=>"eTokenAddress", "type"=>"address"},
{"internalType"=>"address", "name"=>"stakingAddress", "type"=>"address"},
{"internalType"=>"uint256", "name"=>"totalLiquidity", "type"=>"uint256"},
{"internalType"=>"uint256", "name"=>"totalBorrows", "type"=>"uint256"},
{"internalType"=>"uint256", "name"=>"exchangeRate", "type"=>"uint256"},
{"internalType"=>"uint256", "name"=>"borrowingRate", "type"=>"uint256"}],
"internalType"=>"struct ILendingPool.ReserveStatus[]",
"name"=>"statusArr",
"type"=>"tuple[]"} The problem is that while decoding the result, the type somewhere loses the components, thus the error. I suspect that a recent bug fix did not cover all cases. I just need to find out where it fails. So, good news (for me) is the module works correctly, it just is not invoked correctly (in a yet unknown location). I'm sorry if this takes a bit as this specific code was added by a contributor and I'm still getting warm with the mechanics. |
I'm trying to get data for an EAS attestation, but i can't because the result is a tuple and it's giving error.
The ABI
the error
The text was updated successfully, but these errors were encountered: