We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have this contract:
pragma solidity ^0.6.0; pragma experimental ABIEncoderV2; contract Tickets { struct Ticket { uint id; int val; } Ticket[] tickets; function addTicket(uint id, int val) public returns(bool success) { Ticket memory newTicket; newTicket.id = id; newTicket.val = val; tickets.push(newTicket); return true; } function getTicket(uint id) public view returns(Ticket memory) { uint index; for(uint i = 0; i<tickets.length; i++){ if (tickets[i].id == id) { index = i; break; } } Ticket memory t = tickets[index]; return t; }
When I call getTicket method using this gem:
contract.call.get_ticket(1)
It throw this error:
/ruby/2.5.0/lib/ruby/gems/2.5.0/gems/ethereum.rb-2.4/lib/ethereum/decoder.rb:14:in `decode': undefined method `decode_tuple' for #<Ethereum::Decoder:0x00000000023f78a0> (NoMethodError)
Then same happens when try to send a tuple:
/ruby/2.5.0/lib/ruby/gems/2.5.0/gems/ethereum.rb-2.4/lib/ethereum/encoder.rb:14:in `encode': undefined method `encode_tuple' for #<Ethereum::Encoder:0x000000000402ad38> (NoMethodError)
Ruby version: 2.5.0 Solc version: 0.6.2 OS: ubuntu 18.04
The text was updated successfully, but these errors were encountered:
https://github.com/ethers-io/ethers.js/blob/36172f7f7ba1d2043d6e331c76cfb4c52d425ba7/src.ts/utils/abi-coder.ts#L900 👈🏻 reference implementation
Sorry, something went wrong.
@rjurado01 Thanks for the issue. Please migrate as we will maintain the eth.rb library here. ;)
kurotaky
No branches or pull requests
Steps to reproduce
I have this contract:
When I call getTicket method using this gem:
It throw this error:
Then same happens when try to send a tuple:
System configuration
Ruby version: 2.5.0
Solc version: 0.6.2
OS: ubuntu 18.04
The text was updated successfully, but these errors were encountered: