Convert all type/* (and some primitives) to srml/* (#1189)
* Convert (almost-all) non-primitives (and some primitives) to srml/* * Move Vote to primitives, remove type folder * Move Balance :-o * Fixup tests, override Balance.toRaw()
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { ISubmittableResult, SubmittableResult } from '@polkadot/api/SubmittableExtrinsic';
|
||||
import { Hash } from '@polkadot/types/srml/types';
|
||||
import { IKeyringPair } from '@polkadot/types/types';
|
||||
import { ContractABI } from './types';
|
||||
|
||||
@@ -10,7 +11,7 @@ import BN from 'bn.js';
|
||||
import { Observable } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { ApiRx } from '@polkadot/api';
|
||||
import { AccountId, Address, Hash } from '@polkadot/types';
|
||||
import { createType, AccountId, Address } from '@polkadot/types';
|
||||
|
||||
import Abi from './Abi';
|
||||
import RxBase from './RxBase';
|
||||
@@ -39,7 +40,7 @@ export default class Blueprint extends RxBase {
|
||||
public constructor (api: ApiRx, abi: ContractABI | Abi, codeHash: string | Hash) {
|
||||
super(api, abi);
|
||||
|
||||
this.codeHash = new Hash(codeHash);
|
||||
this.codeHash = createType('Hash', codeHash);
|
||||
}
|
||||
|
||||
public deployContract (endowment: number | BN, maxGas: number | BN, ...params: any[]): BlueprintCreate {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { ISubmittableResult, SubmittableResult } from '@polkadot/api/SubmittableExtrinsic';
|
||||
import { Hash } from '@polkadot/types/srml/types';
|
||||
import { IKeyringPair } from '@polkadot/types/types';
|
||||
import { ContractABI } from './types';
|
||||
|
||||
@@ -10,7 +11,7 @@ import BN from 'bn.js';
|
||||
import { Observable } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { ApiRx } from '@polkadot/api';
|
||||
import { AccountId, Address, Hash } from '@polkadot/types';
|
||||
import { AccountId, Address } from '@polkadot/types';
|
||||
import { compactAddLength, u8aToU8a } from '@polkadot/util';
|
||||
|
||||
import Abi from './Abi';
|
||||
|
||||
Reference in New Issue
Block a user