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

difftreelog

fixup tests

Yaroslav Bolyukin2022-01-26parent: #a11cc83.patch.diff
in: master

3 files changed

modifiedtests/src/eth/contractSponsoring.test.tsdiffbeforeafterboth
--- a/tests/src/eth/contractSponsoring.test.ts
+++ b/tests/src/eth/contractSponsoring.test.ts
@@ -35,7 +35,7 @@
     expect(await helpers.methods.sponsoringEnabled(flipper.options.address).call()).to.be.false;
   });
 
-  itWeb3('In generous mode, non-allowlisted user transaction will be sponsored', async ({ api, web3 }) => {
+  itWeb3('In generous mode, non-allowlisted user transaction will be sponsored', async ({api, web3}) => {
     const alice = privateKey('//Alice');
 
     const owner = await createEthAccountWithBalance(api, web3);
@@ -67,7 +67,7 @@
     const alice = privateKey('//Alice');
 
     const owner = await createEthAccountWithBalance(api, web3);
-    const caller = await createEthAccount(api);
+    const caller = createEthAccount(web3);
 
     const flipper = await deployFlipper(web3, owner);
 
@@ -97,7 +97,7 @@
     const alice = privateKey('//Alice');
 
     const owner = await createEthAccountWithBalance(api, web3);
-    const caller = await createEthAccount(api);
+    const caller = createEthAccount(web3);
 
     const flipper = await deployFlipper(web3, owner);
 
modifiedtests/src/eth/util/contractHelpersAbi.jsondiffbeforeafterboth
--- a/tests/src/eth/util/contractHelpersAbi.json
+++ b/tests/src/eth/util/contractHelpersAbi.json
@@ -147,6 +147,43 @@
                 "type": "address"
             },
             {
+                "internalType": "uint8",
+                "name": "mode",
+                "type": "uint8"
+            }
+        ],
+        "name": "setSponsoringMode",
+        "outputs": [],
+        "stateMutability": "nonpayable",
+        "type": "function"
+    },
+    {
+        "inputs": [
+            {
+                "internalType": "address",
+                "name": "target",
+                "type": "address"
+            }
+        ],
+        "name": "sponsoringMode",
+        "outputs": [
+            {
+                "internalType": "uint8",
+                "name": "",
+                "type": "uint8"
+            }
+        ],
+        "stateMutability": "nonpayable",
+        "type": "function"
+    },
+    {
+        "inputs": [
+            {
+                "internalType": "address",
+                "name": "target",
+                "type": "address"
+            },
+            {
                 "internalType": "uint32",
                 "name": "limit",
                 "type": "uint32"
@@ -176,4 +213,4 @@
         "stateMutability": "view",
         "type": "function"
     }
-]
\ No newline at end of file
+]
modifiedtests/src/eth/util/helpers.tsdiffbeforeafterboth
22export const GAS_ARGS = {gas: 2500000};22export const GAS_ARGS = {gas: 2500000};
2323
24export enum SponsoringMode {24export enum SponsoringMode {
25 Disabled,25 Disabled = 0,
26 Allowlisted,26 Allowlisted = 1,
27 Generous,27 Generous = 2,
28}28}
2929
30let web3Connected = false;30let web3Connected = false;