Open matevz opened 2 months ago
The map of network name -> RPC URL should be part of the Sapphire Py wrapper.
This is a typical snippet in the current python projects:
def __init__(self, network_name: str): networks = { "sapphire": "https://sapphire.oasis.io", "sapphire-testnet": "https://testnet.sapphire.oasis.io", "sapphire-localnet": "http://localhost:8545", } self.w3 = setup_web3_middleware(networks.get(network_name), PRIVATE_KEY)
sapphire.NETWORKS constant should be used instead of networks.
sapphire.NETWORKS
networks
SUMMARY
The map of network name -> RPC URL should be part of the Sapphire Py wrapper.
This is a typical snippet in the current python projects:
sapphire.NETWORKS
constant should be used instead ofnetworks
.