Skip to main content

code

Description

Retrieves the code and ABI for an account.

Positional Arguments

  • name TEXT - The name of the account whose code should be retrieved

Options

  • -c,--code TEXT - The name of the file to save the contract .wast to
  • -a,--abi TEXT - The name of the file to save the contract .abi to
  • --wasm Save contract as wasm

Examples

  • To output the hash of sysio.token contract, run:
clio get code sysio.token
code hash: 92d0fa227e2ebe492d40f88ed12ad0ebab627080830727c5b0c0021246e58955
  • To retrieve and save contract's ABI to a file, run:
clio get code sysio.token -a sysio.token.abi
code hash: 92d0fa227e2ebe492d40f88ed12ad0ebab627080830727c5b0c0021246e58955
saving abi to sysio.token.abi
  • To retrieve and save wast code for sysio.token contract, run:
clio get code sysio.token -c sysio.token.wast
code hash: 92d0fa227e2ebe492d40f88ed12ad0ebab627080830727c5b0c0021246e58955
saving wast to sysio.token.wast