@@ -23,10 +23,9 @@ import {
23
23
} from '../src' ;
24
24
import { getSelectorFromName } from '../src/utils/hash' ;
25
25
import { getDecimalString } from '../src/utils/num' ;
26
- import { contracts , createTestProvider , getTestAccount } from './config/fixtures' ;
26
+ import { contracts , createTestProvider , ETHtokenAddress , getTestAccount } from './config/fixtures' ;
27
27
28
28
describe ( 'Account and OutsideExecution' , ( ) => {
29
- const ethAddress = '0x49D36570D4E46F48E99674BD3FCC84644DDD6B96F7C741B1562B82F9E004DC7' ;
30
29
let provider : Provider ;
31
30
let executorAccount : Account ;
32
31
let signerAccount : Account ;
@@ -40,7 +39,7 @@ describe('Account and OutsideExecution', () => {
40
39
provider = new Provider ( await createTestProvider ( ) ) ;
41
40
executorAccount = getTestAccount ( provider ) ;
42
41
recipientAccount = executorAccount ;
43
- ethContract = new Contract ( contracts . Erc20OZ . sierra . abi , ethAddress , provider ) ;
42
+ ethContract = new Contract ( contracts . Erc20OZ . sierra . abi , ETHtokenAddress , provider ) ;
44
43
45
44
// Deploy the SNIP-9 signer account (ArgentX v 0.4.0, using SNIP-9 v2):
46
45
const calldataAX = new CallData ( contracts . ArgentX4Account . sierra . abi ) ;
@@ -61,7 +60,7 @@ describe('Account and OutsideExecution', () => {
61
60
62
61
// Transfer dust of ETH token to the signer account
63
62
const transferCall = {
64
- contractAddress : ethAddress ,
63
+ contractAddress : ETHtokenAddress ,
65
64
entrypoint : 'transfer' ,
66
65
calldata : {
67
66
recipient : signerAccount . address ,
@@ -245,31 +244,31 @@ describe('Account and OutsideExecution', () => {
245
244
caller : 'ANY_CALLER' ,
246
245
} ;
247
246
const call1 : Call = {
248
- contractAddress : ethAddress ,
247
+ contractAddress : ETHtokenAddress ,
249
248
entrypoint : 'transfer' ,
250
249
calldata : {
251
250
recipient : recipientAccount . address ,
252
251
amount : cairo . uint256 ( 100 ) ,
253
252
} ,
254
253
} ;
255
254
const call2 : Call = {
256
- contractAddress : ethAddress ,
255
+ contractAddress : ETHtokenAddress ,
257
256
entrypoint : 'transfer' ,
258
257
calldata : {
259
258
recipient : recipientAccount . address ,
260
259
amount : cairo . uint256 ( 200 ) ,
261
260
} ,
262
261
} ;
263
262
const call3 : Call = {
264
- contractAddress : ethAddress ,
263
+ contractAddress : ETHtokenAddress ,
265
264
entrypoint : 'transfer' ,
266
265
calldata : {
267
266
recipient : recipientAccount . address ,
268
267
amount : cairo . uint256 ( 300 ) ,
269
268
} ,
270
269
} ;
271
270
const call4 : Call = {
272
- contractAddress : ethAddress ,
271
+ contractAddress : ETHtokenAddress ,
273
272
entrypoint : 'transfer' ,
274
273
calldata : {
275
274
recipient : recipientAccount . address ,
@@ -293,7 +292,7 @@ describe('Account and OutsideExecution', () => {
293
292
expect ( outsideTransaction1 . outsideExecution . execute_before ) . toBe ( hour_later ) ;
294
293
expect ( outsideTransaction1 . outsideExecution . calls ) . toEqual ( [
295
294
{
296
- to : ethAddress ,
295
+ to : ETHtokenAddress ,
297
296
selector : '0x83afd3f4caedc6eebf44246fe54e38c95e3179a5ec9ea81740eca5b482d12e' ,
298
297
calldata : [ getDecimalString ( recipientAccount . address ) , '300' , '0' ] ,
299
298
} ,
@@ -305,12 +304,12 @@ describe('Account and OutsideExecution', () => {
305
304
) ;
306
305
expect ( outsideTransaction2 . outsideExecution . calls ) . toEqual ( [
307
306
{
308
- to : ethAddress ,
307
+ to : ETHtokenAddress ,
309
308
selector : '0x83afd3f4caedc6eebf44246fe54e38c95e3179a5ec9ea81740eca5b482d12e' ,
310
309
calldata : [ getDecimalString ( recipientAccount . address ) , '100' , '0' ] ,
311
310
} ,
312
311
{
313
- to : ethAddress ,
312
+ to : ETHtokenAddress ,
314
313
selector : '0x83afd3f4caedc6eebf44246fe54e38c95e3179a5ec9ea81740eca5b482d12e' ,
315
314
calldata : [ getDecimalString ( recipientAccount . address ) , '200' , '0' ] ,
316
315
} ,
0 commit comments