difftreelog
fixup tests
in: master
3 files changed
tests/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);
tests/src/eth/util/contractHelpersAbi.jsondiffbeforeafterboth1[2 {3 "inputs": [4 {5 "internalType": "address",6 "name": "contract",7 "type": "address"8 }9 ],10 "name": "allowlistEnabled",11 "outputs": [12 {13 "internalType": "bool",14 "name": "",15 "type": "bool"16 }17 ],18 "stateMutability": "view",19 "type": "function"20 },21 {22 "inputs": [23 {24 "internalType": "address",25 "name": "target",26 "type": "address"27 },28 {29 "internalType": "address",30 "name": "caller",31 "type": "address"32 }33 ],34 "name": "allowed",35 "outputs": [36 {37 "internalType": "bool",38 "name": "",39 "type": "bool"40 }41 ],42 "stateMutability": "view",43 "type": "function"44 },45 {46 "inputs": [47 {48 "internalType": "address",49 "name": "target",50 "type": "address"51 }52 ],53 "name": "contractOwner",54 "outputs": [55 {56 "internalType": "address",57 "name": "",58 "type": "address"59 }60 ],61 "stateMutability": "view",62 "type": "function"63 },64 {65 "inputs": [66 {67 "internalType": "address",68 "name": "target",69 "type": "address"70 }71 ],72 "name": "sponsoringEnabled",73 "outputs": [74 {75 "internalType": "bool",76 "name": "",77 "type": "bool"78 }79 ],80 "stateMutability": "view",81 "type": "function"82 },83 {84 "inputs": [85 {86 "internalType": "address",87 "name": "target",88 "type": "address"89 },90 {91 "internalType": "address",92 "name": "user",93 "type": "address"94 },95 {96 "internalType": "bool",97 "name": "isAllowed",98 "type": "bool"99 }100 ],101 "name": "toggleAllowed",102 "outputs": [],103 "stateMutability": "nonpayable",104 "type": "function"105 },106 {107 "inputs": [108 {109 "internalType": "address",110 "name": "target",111 "type": "address"112 },113 {114 "internalType": "bool",115 "name": "enabled",116 "type": "bool"117 }118 ],119 "name": "toggleAllowlist",120 "outputs": [],121 "stateMutability": "nonpayable",122 "type": "function"123 },124 {125 "inputs": [126 {127 "internalType": "address",128 "name": "target",129 "type": "address"130 },131 {132 "internalType": "bool",133 "name": "enabled",134 "type": "bool"135 }136 ],137 "name": "toggleSponsoring",138 "outputs": [],139 "stateMutability": "nonpayable",140 "type": "function"141 },142 {143 "inputs": [144 {145 "internalType": "address",146 "name": "target",147 "type": "address"148 },149 {150 "internalType": "uint32",151 "name": "limit",152 "type": "uint32"153 }154 ],155 "name": "setSponsoringRateLimit",156 "outputs": [],157 "stateMutability": "nonpayable",158 "type": "function"159 },160 {161 "inputs": [162 {163 "internalType": "address",164 "name": "contractAddress",165 "type": "address"166 }167 ],168 "name": "getSponsoringRateLimit",169 "outputs": [170 {171 "internalType": "uint32",172 "name": "",173 "type": "uint32"174 }175 ],176 "stateMutability": "view",177 "type": "function"178 }179]1[2 {3 "inputs": [4 {5 "internalType": "address",6 "name": "contract",7 "type": "address"8 }9 ],10 "name": "allowlistEnabled",11 "outputs": [12 {13 "internalType": "bool",14 "name": "",15 "type": "bool"16 }17 ],18 "stateMutability": "view",19 "type": "function"20 },21 {22 "inputs": [23 {24 "internalType": "address",25 "name": "target",26 "type": "address"27 },28 {29 "internalType": "address",30 "name": "caller",31 "type": "address"32 }33 ],34 "name": "allowed",35 "outputs": [36 {37 "internalType": "bool",38 "name": "",39 "type": "bool"40 }41 ],42 "stateMutability": "view",43 "type": "function"44 },45 {46 "inputs": [47 {48 "internalType": "address",49 "name": "target",50 "type": "address"51 }52 ],53 "name": "contractOwner",54 "outputs": [55 {56 "internalType": "address",57 "name": "",58 "type": "address"59 }60 ],61 "stateMutability": "view",62 "type": "function"63 },64 {65 "inputs": [66 {67 "internalType": "address",68 "name": "target",69 "type": "address"70 }71 ],72 "name": "sponsoringEnabled",73 "outputs": [74 {75 "internalType": "bool",76 "name": "",77 "type": "bool"78 }79 ],80 "stateMutability": "view",81 "type": "function"82 },83 {84 "inputs": [85 {86 "internalType": "address",87 "name": "target",88 "type": "address"89 },90 {91 "internalType": "address",92 "name": "user",93 "type": "address"94 },95 {96 "internalType": "bool",97 "name": "isAllowed",98 "type": "bool"99 }100 ],101 "name": "toggleAllowed",102 "outputs": [],103 "stateMutability": "nonpayable",104 "type": "function"105 },106 {107 "inputs": [108 {109 "internalType": "address",110 "name": "target",111 "type": "address"112 },113 {114 "internalType": "bool",115 "name": "enabled",116 "type": "bool"117 }118 ],119 "name": "toggleAllowlist",120 "outputs": [],121 "stateMutability": "nonpayable",122 "type": "function"123 },124 {125 "inputs": [126 {127 "internalType": "address",128 "name": "target",129 "type": "address"130 },131 {132 "internalType": "bool",133 "name": "enabled",134 "type": "bool"135 }136 ],137 "name": "toggleSponsoring",138 "outputs": [],139 "stateMutability": "nonpayable",140 "type": "function"141 },142 {143 "inputs": [144 {145 "internalType": "address",146 "name": "target",147 "type": "address"148 },149 {150 "internalType": "uint8",151 "name": "mode",152 "type": "uint8"153 }154 ],155 "name": "setSponsoringMode",156 "outputs": [],157 "stateMutability": "nonpayable",158 "type": "function"159 },160 {161 "inputs": [162 {163 "internalType": "address",164 "name": "target",165 "type": "address"166 }167 ],168 "name": "sponsoringMode",169 "outputs": [170 {171 "internalType": "uint8",172 "name": "",173 "type": "uint8"174 }175 ],176 "stateMutability": "nonpayable",177 "type": "function"178 },179 {180 "inputs": [181 {182 "internalType": "address",183 "name": "target",184 "type": "address"185 },186 {187 "internalType": "uint32",188 "name": "limit",189 "type": "uint32"190 }191 ],192 "name": "setSponsoringRateLimit",193 "outputs": [],194 "stateMutability": "nonpayable",195 "type": "function"196 },197 {198 "inputs": [199 {200 "internalType": "address",201 "name": "contractAddress",202 "type": "address"203 }204 ],205 "name": "getSponsoringRateLimit",206 "outputs": [207 {208 "internalType": "uint32",209 "name": "",210 "type": "uint32"211 }212 ],213 "stateMutability": "view",214 "type": "function"215 }216]tests/src/eth/util/helpers.tsdiffbeforeafterboth--- a/tests/src/eth/util/helpers.ts
+++ b/tests/src/eth/util/helpers.ts
@@ -22,9 +22,9 @@
export const GAS_ARGS = {gas: 2500000};
export enum SponsoringMode {
- Disabled,
- Allowlisted,
- Generous,
+ Disabled = 0,
+ Allowlisted = 1,
+ Generous = 2,
}
let web3Connected = false;