11import {
22 Contract ,
3+ EnsPlugin ,
34 JsonRpcProvider ,
45 JsonRpcSigner ,
6+ Network ,
57 formatEther ,
68 keccak256 ,
79 toBeHex ,
@@ -17,15 +19,27 @@ const LEARN_WORKERPOOL_OWNER_WALLET =
1719const PROD_WORKERPOOL_OWNER_WALLET =
1820 '0x1Ff6AfF580e8Ca738F76485E0914C2aCaDa7B462' ;
1921const APP_OWNER_WALLET = '0x626D65C778fB98f813C25F84249E3012B80e8d91' ;
20- const LEARN_WORKERPOOL = '0x0975bfce90f4748dab6d6729c96b33a2cd5491f5' ; // 'prod-v8-learn.main.pools.iexec.eth';
21- const PROD_WORKERPOOL = '0x0e7bc972c99187c191a17f3cae4a2711a4188c3f' ; // 'prod-v8-bellecour.main.pools.iexec.eth';
22- const WEB3_MAIL_DAPP_ADDRESS = '0x3d9d7600b6128c03b7ddbf050934e7ecfe0c61c8' ; // 'web3mail.apps.iexec.eth';
22+ const LEARN_WORKERPOOL_ENS = 'prod-v8-learn.main.pools.iexec.eth' ;
23+ const PROD_WORKERPOOL_ENS = 'prod-v8-bellecour.main.pools.iexec.eth' ;
24+ const WEB3_MAIL_DAPP_ADDRESS_ENS = 'web3mail.apps.iexec.eth' ;
2325
2426const rpcURL = DRONE ? 'http://bellecour-fork:8545' : 'http://127.0.0.1:8545' ;
2527
26- const provider = new JsonRpcProvider ( rpcURL , undefined , {
27- pollingInterval : 1000 , // speed up tests
28- } ) ;
28+ const provider = new JsonRpcProvider (
29+ rpcURL ,
30+ new Network ( 'bellecour-fork' , 134 ) . attachPlugin (
31+ new EnsPlugin ( '0x5f5B93fca68c9C79318d1F3868A354EE67D8c006' , 134 )
32+ ) ,
33+ {
34+ pollingInterval : 1000 , // speed up tests
35+ }
36+ ) ;
37+
38+ const LEARN_WORKERPOOL = await provider . resolveName ( LEARN_WORKERPOOL_ENS ) ;
39+ const PROD_WORKERPOOL = await provider . resolveName ( PROD_WORKERPOOL_ENS ) ;
40+ const WEB3_MAIL_DAPP_ADDRESS = await provider . resolveName (
41+ WEB3_MAIL_DAPP_ADDRESS_ENS
42+ ) ;
2943
3044const setBalance = async ( address , weiAmount ) => {
3145 fetch ( rpcURL , {
0 commit comments