Bump metadata (w/ AssetBalance, AssetDetails) (#2917)

* Bump metadata (w/ AssetBalance, AssetDetails)

* Bluperint for new-style with salt as default

* Use TBalance

* Easier overrides

* Balance

* Build types
This commit is contained in:
Jaco Greeff
2020-12-06 11:31:54 +01:00
committed by GitHub
parent 4e2ab3d11c
commit 8b4d3872d7
11 changed files with 1020 additions and 16 deletions
+2 -2
View File
@@ -92,9 +92,9 @@ export class Blueprint<ApiType extends ApiTypes> extends Base<ApiType> {
const withSalt = this.api.tx.contracts.instantiate.meta.args.length === 5;
const encoded = this.abi.findConstructor(constructorOrId).toU8a(params, withSalt ? EMPTY_SALT : encodedSalt);
const tx = withSalt
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore new style with salt included
? this.api.tx.contracts.instantiate(value, gasLimit, this.codeHash, encoded, encodedSalt)
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore old style with salt included
: this.api.tx.contracts.instantiate(value, gasLimit, this.codeHash, encoded);
return tx.withResultTransform((result: ISubmittableResult) =>