How to send the struct when I send transaction from command line.
This is error showed up.
contract-dir git:(master) ✗ oz send-tx
human (tuple): {age: 23, name: 'shin', borth: 2019, metaData: 'meta'}
invalid tuple value (coderType="tuple", value="{age: 23, name: 'shin', borth: 2019, metaData: 'meta'}", version=4.0.39)
Hi Shinsaku,
Can you share your smart contract (or a snippet including the struct and the function you want to call)?
Thank you for the answer.
pragma solidity 0.5.11;
pragma experimental ABIEncoderV2;
contract Human {
struct Person {
uint256 age;
string name;
uint256 borth;
string metaData;
}
function create(Person memory person) public returns(bool) {
return true;
}
}
This is contract I want to send the transaction.
Hi @Shinsaku,
I don’t know how to provide a tuple. I will have to investigate and come back to you on Monday.
Hi @Shinsaku,
An issue and a Pull Request have been created to support tuples in interactive commands:
Thank you very very much!
Hi @Shinsaku,
Tuple support is in OpenZeppelin CLI 2.7 RC.0, please try it out when you get a chance: