1

For example, I have a function

function addClaimers(ClaimItemImport[] claimItems) onlyOwner external

and the ClaimItemImport struct looks as follows:

struct ClaimItemImport {
    uint128 balance;
    uint256 claimAddress;
}

How to call it from tondev with parameters?

This does not work:

tondev contract run Contract.abi.json --address XYZ addClaimers -i claimItems:[[123, 0x123], [456, 0x456]]

Norton
  • 83
  • 4

2 Answers2

2
    --address 0:540c1837656674d548c934258ddec9b5fd11b543da977b0016c14b5650bc7eb5 \
    --input '{ "point": { "color": "red", "center": { "x": 1, "y": 2 } } }'

Check readme in the end of this section https://github.com/tonlabs/tondev#run-contract-deployed-on-the-network

  • Ok, I've changed to {} notation and added names, so it became: `tondev contract run FidosafeDAO.abi.json addClaimers --address 0:2540afc97408aec8e094eaf2695acd8fd4c301830590214be584e4b627e5bf90 -i claimItems:[{"balance":0,"claimAddress":0}]` The system responds with: Error: Unexpected argument claimItems:[claimAddress:0] If I use this: `tondev contract run FidosafeDAO.abi.json addClaimers --address 0:2540afc97408aec8e094eaf2695acd8fd4c301830590214be584e4b627e5bf90 -i 'claimItems:[{"balance":0,"claimAddress":0}]'` It responds with: #FailureMessage Object: 00000090C6EFE940 – Norton Dec 23 '21 at 15:13
1

I've updated my tondev + used the following syntax:

tondev contract run FidosafeDAO.abi.json addClaimers --address 0:2540afc97408aec8e094eaf2695acd8fd4c301830590214be584e4b627e5bf90 -i '{"claimItems":[{"balance":0,"claimAddress":0}]}'
Norton
  • 83
  • 4