Skip to content

Commit 1d671d5

Browse files
satyamakgecjacogr
authored andcommitted
update as per the 0.97.0-beta.38 release (#1617)
1 parent a49cd79 commit 1d671d5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/api-contract/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@
33
Interfaces to allow for the encoding and decoding of Substrate contract ABIs.
44

55
```js
6+
import {ApiPromise, WsProvider } from '@polkadot/api';
67
import { Abi } from '@polkadot/api-contract';
78

8-
const abi = new Abi(<...JSON ABI...>);
9+
const wsProvider = new WsProvider(<...Node Url...>);
10+
const api = await ApiPromise.create({ provider: wsProvider });
11+
const abi = new Abi(api.registry, <...JSON ABI...>);
912

1013
api.tx.contracts
1114
.call(<contract addr>, <value>, <max gas>, abi.messages.<method name>(<...params...>))

0 commit comments

Comments
 (0)