Abi constructor takes different parameters (#3347)

The Abi constructor used to take the registry as a parameter, now it takes registry.getChainProperties() and this change introduced hard to debug behaviour
This commit is contained in:
Veliko
2021-03-22 16:48:15 +01:00
committed by GitHub
parent c87ef7526b
commit 67ab11a036
+1 -1
View File
@@ -8,7 +8,7 @@ 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...>);
const abi = new Abi(<...JSON ABI...>, api.registry.getChainProperties());
api.tx.contracts
.call(<contract addr>, <value>, <max gas>, abi.messages.<method name>(<...params...>))