difftreelog
Minor improvment
in: master
1 file changed
tests/src/eth/marketplace/marketplace.test.tsdiffbeforeafterboth51 });51 });525253 itEth('With UNQ', async ({helper}) => {53 itEth('With UNQ', async ({helper}) => {54 const web3 = helper.web3!;54 const web3 = helper.getWeb3();5556 const sponsor = await helper.eth.createAccountWithBalance(donor);57 const matcherOwner = await helper.eth.createAccountWithBalance(donor);55 const matcherOwner = await helper.eth.createAccountWithBalance(donor);58 const matcherContract = new web3.eth.Contract(JSON.parse((await readFile(`${__dirname}/MarketPlace.abi`)).toString()), undefined, {56 const matcherContract = new web3.eth.Contract(JSON.parse((await readFile(`${__dirname}/MarketPlace.abi`)).toString()), undefined, {59 from: matcherOwner,57 from: matcherOwner,60 ...GAS_ARGS,58 ...GAS_ARGS,61 });59 });62 const matcher = await matcherContract.deploy({data: (await readFile(`${__dirname}/MarketPlace.bin`)).toString(), arguments:[matcherOwner]}).send({from: matcherOwner});60 const matcher = await matcherContract.deploy({data: (await readFile(`${__dirname}/MarketPlace.bin`)).toString(), arguments:[matcherOwner]}).send({from: matcherOwner});6162 const sponsor = await helper.eth.createAccountWithBalance(donor);63 const helpers = contractHelpers(web3, matcherOwner);63 const helpers = contractHelpers(web3, matcherOwner);64 await helpers.methods.setSponsoringMode(matcher.options.address, SponsoringMode.Allowlisted).send({from: matcherOwner});64 await helpers.methods.setSponsoringMode(matcher.options.address, SponsoringMode.Allowlisted).send({from: matcherOwner});65 await helpers.methods.setSponsoringRateLimit(matcher.options.address, 1).send({from: matcherOwner});65 await helpers.methods.setSponsoringRateLimit(matcher.options.address, 1).send({from: matcherOwner});108 });108 });109109110 itEth('With escrow', async ({helper}) => {110 itEth('With escrow', async ({helper}) => {111 const web3 = helper.web3!;111 const web3 = helper.getWeb3();112113 const sponsor = await helper.eth.createAccountWithBalance(donor);114 const matcherOwner = await helper.eth.createAccountWithBalance(donor);112 const matcherOwner = await helper.eth.createAccountWithBalance(donor);115 const escrow = await helper.eth.createAccountWithBalance(donor);116 const matcherContract = new web3.eth.Contract(JSON.parse((await readFile(`${__dirname}/MarketPlace.abi`)).toString()), undefined, {113 const matcherContract = new web3.eth.Contract(JSON.parse((await readFile(`${__dirname}/MarketPlace.abi`)).toString()), undefined, {117 from: matcherOwner,114 from: matcherOwner,118 ...GAS_ARGS,115 ...GAS_ARGS,119 });116 });120 const matcher = await matcherContract.deploy({data: (await readFile(`${__dirname}/MarketPlace.bin`)).toString(), arguments: [matcherOwner]}).send({from: matcherOwner, gas: 10000000});117 const matcher = await matcherContract.deploy({data: (await readFile(`${__dirname}/MarketPlace.bin`)).toString(), arguments: [matcherOwner]}).send({from: matcherOwner, gas: 10000000});118119 const sponsor = await helper.eth.createAccountWithBalance(donor);120 const escrow = await helper.eth.createAccountWithBalance(donor);121 await matcher.methods.setEscrow(escrow).send({from: matcherOwner});121 await matcher.methods.setEscrow(escrow).send({from: matcherOwner});122 const helpers = contractHelpers(web3, matcherOwner);122 const helpers = contractHelpers(web3, matcherOwner);123 await helpers.methods.setSponsoringMode(matcher.options.address, SponsoringMode.Allowlisted).send({from: matcherOwner});123 await helpers.methods.setSponsoringMode(matcher.options.address, SponsoringMode.Allowlisted).send({from: matcherOwner});176 expect(await token.getOwner()).to.be.deep.equal({Substrate: alice.address});176 expect(await token.getOwner()).to.be.deep.equal({Substrate: alice.address});177 });177 });178178179 itEth('Sell tokens from substrate user via EVM contract', async ({helper, privateKey}) => {179 itEth('Sell tokens from substrate user via EVM contract', async ({helper}) => {180 const web3 = helper.web3!;180 const web3 = helper.getWeb3();181182 const matcherOwner = await helper.eth.createAccountWithBalance(donor);181 const matcherOwner = await helper.eth.createAccountWithBalance(donor);183 const matcherContract = new web3.eth.Contract(JSON.parse((await readFile(`${__dirname}/MarketPlace.abi`)).toString()), undefined, {182 const matcherContract = new web3.eth.Contract(JSON.parse((await readFile(`${__dirname}/MarketPlace.abi`)).toString()), undefined, {