From d60d84ea5a92497175c14f16f5892f741ceea2f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20B=C4=83ncioiu?= Date: Thu, 7 Jul 2022 00:10:18 +0300 Subject: [PATCH] Undo some changes. --- checks/localnet/snippets/adder.spec.ts | 16 ++++++++-------- checks/localnet/snippets/adderInteractor.ts | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/checks/localnet/snippets/adder.spec.ts b/checks/localnet/snippets/adder.spec.ts index cc98e240..8431aa06 100644 --- a/checks/localnet/snippets/adder.spec.ts +++ b/checks/localnet/snippets/adder.spec.ts @@ -89,7 +89,7 @@ describe("adder snippet", async function () { let contractAddress = await session.loadAddress("adderInShard0"); - const { transaction, transactionHash } = await sendValueToContract(bob, contractAddress, 1, "hello@aa.bb.cc", 10000000) + const { transaction, transactionHash } = await sendToContract(bob, contractAddress, 1, "hello@aa.bb.cc", 10000000) console.log("Transaction:", transactionHash); const transactionOnNetwork = await transactionWatcher.awaitCompleted(transaction); @@ -103,7 +103,7 @@ describe("adder snippet", async function () { let contractAddress = await session.loadAddress("adderInShard0"); - const { transaction, transactionHash } = await sendValueToContract(bob, contractAddress, 1, "", 10000000) + const { transaction, transactionHash } = await sendToContract(bob, contractAddress, 1, "", 10000000) console.log("Transaction:", transactionHash); const transactionOnNetwork = await transactionWatcher.awaitCompleted(transaction); @@ -141,7 +141,7 @@ describe("adder snippet", async function () { let contractAddress = await session.loadAddress("adderInShard1"); - const { transaction, transactionHash } = await sendValueToContract(bob, contractAddress, 1, "hello@aa.bb.cc", 10000000); + const { transaction, transactionHash } = await sendToContract(bob, contractAddress, 1, "hello@aa.bb.cc", 10000000); console.log("Transaction:", transactionHash); const transactionOnNetwork = await transactionWatcher.awaitCompleted(transaction); @@ -155,7 +155,7 @@ describe("adder snippet", async function () { let contractAddress = await session.loadAddress("adderInShard0"); - const { transaction, transactionHash } = await sendValueToContract(bob, contractAddress, 1, "hello", 10000000) + const { transaction, transactionHash } = await sendToContract(bob, contractAddress, 1, "hello", 10000000) console.log("Transaction:", transactionHash); const transactionOnNetwork = await transactionWatcher.awaitCompleted(transaction); @@ -169,7 +169,7 @@ describe("adder snippet", async function () { let contractAddress = await session.loadAddress("adderInShard1"); - const { transaction, transactionHash } = await sendValueToContract(bob, contractAddress, 1, "hello", 10000000) + const { transaction, transactionHash } = await sendToContract(bob, contractAddress, 1, "hello", 10000000) console.log("Transaction:", transactionHash); const transactionOnNetwork = await transactionWatcher.awaitCompleted(transaction); @@ -183,7 +183,7 @@ describe("adder snippet", async function () { let contractAddress = await session.loadAddress("adderInShard0"); - const { transaction, transactionHash } = await sendValueToContract(bob, contractAddress, 1, "add@01", 100000000) + const { transaction, transactionHash } = await sendToContract(bob, contractAddress, 1, "add@01", 100000000) console.log("Transaction:", transactionHash); const transactionOnNetwork = await transactionWatcher.awaitCompleted(transaction); @@ -197,14 +197,14 @@ describe("adder snippet", async function () { let contractAddress = await session.loadAddress("adderInShard1"); - const { transaction, transactionHash } = await sendValueToContract(bob, contractAddress, 1, "add@01", 100000000) + const { transaction, transactionHash } = await sendToContract(bob, contractAddress, 1, "add@01", 100000000) console.log("Transaction:", transactionHash); const transactionOnNetwork = await transactionWatcher.awaitCompleted(transaction); session.audit.onTransactionCompleted({ transactionHash, transaction: transactionOnNetwork }); }); - async function sendValueToContract(user: ITestUser, contractAddress: IAddress, value: BigNumber.Value, data: string, gasLimit: number): Promise<{ transaction: Transaction, transactionHash: string }> { + async function sendToContract(user: ITestUser, contractAddress: IAddress, value: BigNumber.Value, data: string, gasLimit: number): Promise<{ transaction: Transaction, transactionHash: string }> { const payment = TokenPayment.egldFromAmount(value); const transaction = transactionFactory.createEGLDTransfer({ diff --git a/checks/localnet/snippets/adderInteractor.ts b/checks/localnet/snippets/adderInteractor.ts index 84f84f95..4702ddb9 100644 --- a/checks/localnet/snippets/adderInteractor.ts +++ b/checks/localnet/snippets/adderInteractor.ts @@ -46,7 +46,7 @@ export class AdderInteractor { gasLimit: 20000000, chainID: this.networkConfig.ChainID }); - + // Set the transaction nonce. The account nonce must be synchronized beforehand. // Also, locally increment the nonce of the deployer (optional). transaction.setNonce(deployer.account.getNonceThenIncrement());