Game-X-Coin / eosjs-rn

General purpose library for the EOS blockchain.
http://eosio.github.io/eosjs
MIT License
18 stars 5 forks source link

How can I use user-defined abi? #12

Closed marcoLuo closed 5 years ago

marcoLuo commented 5 years ago

as follows: { "actions": [{ "account": "prochaintech", "name": "click", "authorization": [{ "actor": "lyxlyxlyxlyx", "permission": "active" }], "data": { "clickRequest": { "account": "lyxlyxlyxlyx", "candyId": 16, "ref": "" } } }] } the struct ‘clickRequest’ is user-defined, i sent the action but failed

conr2d commented 5 years ago

Can you show me the function signature of click action? It seems that clickRequest is a name of struct, then you should send data with argument name, not argument type.

For example, if your action is void click(clickRequest req) then your json should be like the next:

{
   "actions": [{
      ...
      "data": {
         "req": {   <= NOT clickRequest