feat: add web3 config
This commit is contained in:
parent
5afd668379
commit
87646d9661
9
constant.py
Normal file
9
constant.py
Normal file
@ -0,0 +1,9 @@
|
||||
# web3 provider information
|
||||
# include provider HTTPS endpoint URL & its API Key.
|
||||
# Alchemy is a good choice for Web3 provider
|
||||
WEB3_PROVIDER_URL = "https://eth-sepolia.g.alchemy.com/v2/"
|
||||
WEB3_PROVIDER_KEY = ""
|
||||
|
||||
# Please write down your wallet key to sign a transaction with our contract.
|
||||
WALLET_KEY = ""
|
||||
|
||||
@ -5,6 +5,7 @@ import time
|
||||
import docker
|
||||
from web3 import Web3
|
||||
from src.scheduler import Scheduler
|
||||
from constant import *
|
||||
|
||||
class NodeManager():
|
||||
def __init__(self, host, port):
|
||||
@ -28,7 +29,7 @@ class NodeManager():
|
||||
self.docker_client = docker.from_env()
|
||||
|
||||
# web3 provider
|
||||
self.w3 = Web3(Web3.HTTPProvider('https://eth-sepolia.g.alchemy.com/v2/'+ALCHEMY_KEY))
|
||||
self.w3 = Web3(Web3.HTTPProvider(WEB3_PROVIDER_URL + WEB3_PROVIDER_KEY))
|
||||
|
||||
time.sleep(2)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user