Search…
⌃K

Reading State

Reading the state of a function is easy, for most contracts the states will be in JSON format, although, some contracts might be programmed different or in the case of EVM contracts where a hex representing the storage of the contract is returned.
  • SDK
JS SDK
import { Exm, ContractType } from '@execution-machine/sdk';
import { readFileSync } from 'fs';
const exm = new Exm({ token: 'MY_EXM_TOKEN' });
const functionId: string = '' // Arweave TX Id of function to read state from;
await exm.functions.read(functionId);
// {
// state: ...
// }
  • CLI
$ exm function:read xta8UH5zUzf2Owg8aK8Bp6TiiUiHh3wSOHala-8sW7g
For more information about deployments with exm , refer to:
$ exm function:read --help
  • REST API
get
https://api.exm.dev/read
/:id