git.delta.rocks / unique-network / refs/commits / b5214e36e279

difftreelog

Fixing contract tests in progress

Greg Zaitsev2021-01-31parent: #d3e6623.patch.diff
in: master

1 file changed

modifiedtests/src/util/contracthelpers.tsdiffbeforeafterboth
17import { findUnusedAddress } from '../util/helpers';17import { findUnusedAddress } from '../util/helpers';
1818
19const value = 0;19const value = 0;
20const gasLimit = 200000n * 1000000n;20const gasLimit = '200000000000';
21const endowment = '100000000000000000';21const endowment = '100000000000000000';
2222
23function deployBlueprint(alice: IKeyringPair, code: CodePromise): Promise<Blueprint> {23function deployBlueprint(alice: IKeyringPair, code: CodePromise): Promise<Blueprint> {
37function deployContract(alice: IKeyringPair, blueprint: Blueprint) : Promise<any> {37function deployContract(alice: IKeyringPair, blueprint: Blueprint) : Promise<any> {
38 return new Promise<any>(async (resolve, reject) => {38 return new Promise<any>(async (resolve, reject) => {
39 const initValue = true;39 const initValue = true;
40 const constructorIndex = 0;
41
42 // const unsub = await blueprint
43 // .createContract(constructorIndex, { gasLimit: gasLimit, salt: null, value: endowment }, initValue)
44
45 // const unsub = await blueprint.tx
46 // .new({ gasLimit: gasLimit, salt: null, value: endowment }, initValue)
4047
41 const unsub = await blueprint.tx48 const unsub = await blueprint.tx
42 .new(endowment, gasLimit, initValue)49 .new(endowment, gasLimit, initValue)