Example #1
0
 def test_get_set_stored_network(self):
     """Checks default stored network and set method."""
     # checks default
     assert Settings.get_stored_network() == ChainID.MAINNET
     # checks set
     Settings.set_stored_network(ChainID.ROPSTEN)
     assert Settings.get_stored_network() == ChainID.ROPSTEN
Example #2
0
 def pyetheroll(self):
     """
     Gets or creates the Etheroll object.
     Also recreates the object if the chain_id changed.
     """
     chain_id = Settings.get_stored_network()
     return Etheroll.get_or_create(chain_id)
Example #3
0
 def pyetheroll(self):
     """
     Gets or creates the Etheroll object.
     Also recreates the object if the chain_id changed.
     """
     chain_id = Settings.get_stored_network()
     api_key = get_etherscan_api_key(API_KEY_PATH)
     return Etheroll.get_or_create(api_key, chain_id)