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

difftreelog

tests: fix contracthelpers types

Yaroslav Bolyukin2021-03-09parent: #030d76f.patch.diff
in: master

1 file changed

modifiedtests/src/util/contracthelpers.tsdiffbeforeafterboth
2222
23function deployContract(alice: IKeyringPair, code: CodePromise, constructor: string = 'default', ...args: any[]): Promise<Contract> {23function deployContract(alice: IKeyringPair, code: CodePromise, constructor: string = 'default', ...args: any[]): Promise<Contract> {
24 return new Promise<Contract>(async (resolve, reject) => {24 return new Promise<Contract>(async (resolve, reject) => {
25 const unsub = await code25 const unsub = await (code as any)
26 .tx[constructor]({value: endowment, gasLimit}, ...args)26 .tx[constructor]({value: endowment, gasLimit}, ...args)
27 .signAndSend(alice, (result) => {27 .signAndSend(alice, (result: any) => {
28 if (result.status.isInBlock || result.status.isFinalized) {28 if (result.status.isInBlock || result.status.isFinalized) {
29 // here we have an additional field in the result, containing the blueprint29 // here we have an additional field in the result, containing the blueprint
30 resolve((result as any).contract);30 resolve((result as any).contract);