I'm working on a Solidity Smart Contract for Tron Network. I want the owner can set an array of address => uint. This is the code:
pragma solidity ^0.8.0;
struct singleUser {
address user;
uint amount;
}
mapping(address=>uint) private _users;
function setUsers(singleUser[] memory _data) {
for(uint i = 0; i<_data.length; i++){
_users[_data[i].address] = _data[i].amount;
}
}
Now, I'm testing this contract direclty on Shasta Network and on TronIDE, but I cannot defined the _data variable. I've tried as follow:
[{address:0x54426759596b4a6655397744444d6e656b72516e534a676346576677584872465364,amount:60000000},{address:0x5442363852436b4e666b736e383476655938516946337262347777587278524e3454,amount:80000000}]
[{address:'TBgYYkJfU9wDDMnekrQnSJgcFWfwXHrFSd',amount:60000000},{address:'TB68RCkNfksn84veY8QiF3rb4wwXrxRN4T',amount:80000000}]
No one of these works. How can I set this tuple?