Interfaces for interacting with contracts and contract ABIs

Usage no npm install needed!

<script type="module">
  import chainxV2ApiContract from 'https://cdn.skypack.dev/@chainx-v2/api-contract';



Interfaces to allow for the encoding and decoding of Substrate contract ABIs.

import {ApiPromise, WsProvider } from '@chainx-v2/api';
import { Abi } from '@chainx-v2/api-contract';

const wsProvider = new WsProvider(<...Node Url...>);
const api = await ApiPromise.create({ provider: wsProvider });
const abi = new Abi(api.registry, <...JSON ABI...>);

  .call(<contract addr>, <value>, <max gas>, abi.messages.<method name>(<...params...>))
  .signAndSend(<keyring pair>, (result: SubmittableResult) => { ... });