Adjust ABI registry (#3516)

* Adjust ABI registry

* Remove V2 support

* instantiateWithCode mock
This commit is contained in:
Jaco
2021-05-11 10:58:20 +02:00
committed by GitHub
parent 9b3158599c
commit 92bde9de6f
9 changed files with 70 additions and 90 deletions
+6 -1
View File
@@ -106,7 +106,12 @@ export class Contract<ApiType extends ApiTypes> extends Base<ApiType> {
#exec = (messageOrId: AbiMessage | string | number, { gasLimit = BN_ZERO, value = BN_ZERO }: ContractOptions, params: CodecArg[]): SubmittableExtrinsic<ApiType> => {
return this.api.tx.contracts
.call(this.address, value, this.#getGas(gasLimit), this.abi.findMessage(messageOrId).toU8a(params))
.call(
this.address,
value,
this.#getGas(gasLimit),
this.abi.findMessage(messageOrId).toU8a(params)
)
.withResultTransform((result: ISubmittableResult) =>
// ContractEmitted is the current generation, ContractExecution is the previous generation
new ContractSubmittableResult(result, applyOnEvent(result, ['ContractEmitted', 'ContractExecution'], (records: EventRecord[]) =>