0.2.11 • Published 5 years ago

@redspot/api-contract v0.2.11

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
5 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

5 years ago

0.2.9

5 years ago

0.2.8

5 years ago

0.2.7

5 years ago

0.2.3

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.46

5 years ago

0.1.45

5 years ago

0.1.42

5 years ago

0.1.43

5 years ago

0.1.44

5 years ago

0.1.39

5 years ago

0.1.37

5 years ago

0.1.36

5 years ago