Create api-contract (baseline for useful interactions) (#1007)

* Create api-contract (baseline for useful interactions)

* Add CHANGELOG entry (breaking)
This commit is contained in:
Jaco Greeff
2019-06-14 13:48:53 +02:00
committed by GitHub
parent 6e7a126f4d
commit 4cba24c134
25 changed files with 614 additions and 312 deletions
+13
View File
@@ -0,0 +1,13 @@
# @polkadot/api-contract
Interfaces to allow for the encoding and decoding of Substrate contract ABIs.
```js
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) => { ... });
```