问题:Remix 产生奇怪的行为,字符串参数后跟数组参数
复制:
contract ItemMarket is ERC721 {
struct Item {
string name;
uint[3] others;
}
Item[] public items;
function createItem(string _name, uint[6] _others) public {
uint tokenId = items.push(Item({name: _name, traits:_traits})) - 1;
}
}
当您使用参数调用 createItem() 时,"hello", [1,2,3]
第一个参数将转换为\u0000
. 通过 MEW 与合约交互时,具有相同参数的相同函数调用可以正常工作