Files
api/packages/api-contract/README.md
T
Jaco Greeff 4cba24c134 Create api-contract (baseline for useful interactions) (#1007)
* Create api-contract (baseline for useful interactions)

* Add CHANGELOG entry (breaking)
2019-06-14 13:48:53 +02:00

379 B

@polkadot/api-contract

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

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

const abi = new Abi(<...JSON ABI...>);

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