0.2.11 • Published 4 years ago

@redspot/api-contract v0.2.11

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
4 years ago

@polkadot/api-contract

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

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

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

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

4 years ago

0.2.9

4 years ago

0.2.8

4 years ago

0.2.7

4 years ago

0.2.3

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.46

4 years ago

0.1.45

4 years ago

0.1.42

4 years ago

0.1.43

4 years ago

0.1.44

4 years ago

0.1.39

4 years ago

0.1.37

4 years ago

0.1.36

4 years ago