git.delta.rocks / unique-network / refs/commits / 97722e574046

difftreelog

fix add parallel Alice

Andrey2022-10-18parent: #13aba58.patch.diff
in: master

1 file changed

modifiedtests/src/eth/proxyContract.test.tsdiffbeforeafterboth
15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {GAS_ARGS} from './util/helpers';
1918
20import {itEth, expect, usingEthPlaygrounds, EthUniqueHelper} from './util/playgrounds';19import {itEth, expect, usingEthPlaygrounds, EthUniqueHelper} from './util';
2120
22describe('EVM payable contracts', () => {21describe('EVM payable contracts', () => {
23 let donor: IKeyringPair;22 let donor: IKeyringPair;
2423
25 before(async function() {24 before(async function() {
26 await usingEthPlaygrounds(async (_, privateKey) => {25 await usingEthPlaygrounds(async (_, privateKey) => {
27 donor = privateKey('//Alice');26 donor = await privateKey({filename: __filename});
28 });27 });
29 });28 });
3029
34 const proxyContract = await deployProxyContract(helper, deployer);33 const proxyContract = await deployProxyContract(helper, deployer);
35 34
36 const realContractV1 = await deployRealContractV1(helper, deployer);35 const realContractV1 = await deployRealContractV1(helper, deployer);
37 const realContractV1proxy = new helper.web3!.eth.Contract(realContractV1.options.jsonInterface, proxyContract.options.address, {from: caller, ...GAS_ARGS});36 const realContractV1proxy = new helper.web3!.eth.Contract(realContractV1.options.jsonInterface, proxyContract.options.address, {from: caller, gas: helper.eth.DEFAULT_GAS});
38 await proxyContract.methods.updateVersion(realContractV1.options.address).send();37 await proxyContract.methods.updateVersion(realContractV1.options.address).send();
39 38
40 await realContractV1proxy.methods.flip().send();39 await realContractV1proxy.methods.flip().send();
46 expect(value1).to.be.equal(true);45 expect(value1).to.be.equal(true);
4746
48 const realContractV2 = await deployRealContractV2(helper, deployer);47 const realContractV2 = await deployRealContractV2(helper, deployer);
49 const realContractV2proxy = new helper.web3!.eth.Contract(realContractV2.options.jsonInterface, proxyContract.options.address, {from: caller, ...GAS_ARGS});48 const realContractV2proxy = new helper.web3!.eth.Contract(realContractV2.options.jsonInterface, proxyContract.options.address, {from: caller, gas: helper.eth.DEFAULT_GAS});
50 await proxyContract.methods.updateVersion(realContractV2.options.address).send();49 await proxyContract.methods.updateVersion(realContractV2.options.address).send();
5150
52 await realContractV2proxy.methods.flip().send();51 await realContractV2proxy.methods.flip().send();