Skip to content

Commit 4e1ac81

Browse files
authored
Update spacefi.py
1 parent 859a5ab commit 4e1ac81

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

swaps/spacefi/spacefi.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from utils.chains import ERA
12
from loguru import logger
23
from web3 import Web3
34
import random
@@ -28,7 +29,7 @@ def __init__(self,
2829
self.to_token = to_token
2930
self.amount_to_swap = random.uniform(amount_from, amount_to)
3031
self.swap_router_address = '0xbE7D1FD1f6748bbDefC4fbaCafBb11C6Fc506d1d'
31-
self.web3 = Web3(Web3.HTTPProvider('https://mainnet.era.zksync.io'))
32+
self.web3 = Web3(Web3.HTTPProvider(ERA.rpc))
3233
self.account = self.web3.eth.account.from_key(private_key)
3334
self.address_wallet = self.account.address
3435
self.nonce = self.web3.eth.get_transaction_count(self.address_wallet)
@@ -121,7 +122,7 @@ def __init__(self,
121122
self.token = token
122123
self.amount = random.uniform(amount_from, amount_to)
123124
self.swap_router_address = '0xbE7D1FD1f6748bbDefC4fbaCafBb11C6Fc506d1d'
124-
self.web3 = Web3(Web3.HTTPProvider('https://mainnet.era.zksync.io'))
125+
self.web3 = Web3(Web3.HTTPProvider(ERA.rpc))
125126
self.account = self.web3.eth.account.from_key(private_key)
126127
self.address_wallet = self.account.address
127128

0 commit comments

Comments
 (0)