Skip to content
This repository was archived by the owner on Aug 2, 2022. It is now read-only.

Fetching the ABI #566

Closed
jcalfee opened this issue Oct 14, 2017 · 3 comments
Closed

Fetching the ABI #566

jcalfee opened this issue Oct 14, 2017 · 3 comments

Comments

@jcalfee
Copy link
Contributor

jcalfee commented Oct 14, 2017

The eosjs has support for contract level messages. For this is it fetching ABI via get_code and using the types, structs, and actions. It does not use wast.. I suppose that over time it would be a waste to always return the code when it is not actually needed. So you might consider adjusting the api a bit..

  "get_code": {
    "brief": "Fetch smart contract code",
    "params": {
      "name": "Name"
    },
    "results": {
      "name": "Name",
      "wast": "String",
      "code_hash": "FixedBytes32",
      "abi": "Optional<Abi>"
    }
  },
@riotom
Copy link

riotom commented Mar 15, 2018

it just retured ABI structure and Code Hash for selected account

@jcalfee
Copy link
Contributor Author

jcalfee commented Mar 15, 2018

The command line client filters it for you .. but in the API it returns everything.

Look at get_code_params and get_code_results

https://github.com/EOSIO/eos/blob/master/plugins/chain_plugin/include/eosio/chain_plugin/chain_plugin.hpp#L92-L102

@jgiszczak
Copy link
Contributor

get abi is now available independently of get code.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants