Skip to content

Commit 115fb42

Browse files
authored
Update sync_swap.py
1 parent 4e1ac81 commit 115fb42

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

swaps/sync_swap/sync_swap.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from utils.chains import ERA
12
from eth_abi import encode
23
from loguru import logger
34
from web3 import Web3
@@ -25,7 +26,7 @@ def __init__(self, private_key: str, from_token: str, to_token: str,
2526
self.amount_to_swap = random.uniform(amount_from, amount_to)
2627
self.classic_pool_factory_address = '0xf2DAd89f2788a8CD54625C60b55cD3d2D0ACa7Cb'
2728
self.router_address = '0x2da10A1e27bF85cEdD8FFb1AbBe97e53391C0295'
28-
self.web3 = Web3(Web3.HTTPProvider('https://mainnet.era.zksync.io'))
29+
self.web3 = Web3(Web3.HTTPProvider(ERA.rpc))
2930
self.account = self.web3.eth.account.from_key(private_key)
3031
self.address_wallet = self.account.address
3132

@@ -120,7 +121,7 @@ def __init__(self, private_key: str,
120121
self.amount = random.uniform(amount_from, amount_to)
121122
self.classic_pool_factory_address = '0xf2DAd89f2788a8CD54625C60b55cD3d2D0ACa7Cb'
122123
self.router_address = '0x2da10A1e27bF85cEdD8FFb1AbBe97e53391C0295'
123-
self.web3 = Web3(Web3.HTTPProvider('https://mainnet.era.zksync.io'))
124+
self.web3 = Web3(Web3.HTTPProvider(ERA.rpc))
124125
self.account = self.web3.eth.account.from_key(private_key)
125126
self.address_wallet = self.account.address
126127

0 commit comments

Comments
 (0)