Example #1
0
    def create(self):
        network_id = None
        if (not self.args.skip_check):
            # check endpoint by getting its network_id
            w3         = get_web3(self.args.eth_rpc_endpoint)
            network_id = w3.version.network

        self._printout("add network with name='%s' with networkId='%s'"%(self.args.network_name, str(network_id)))
        self.config.add_network(self.args.network_name, self.args.eth_rpc_endpoint, self.args.default_gas_price)
Example #2
0
 def __init__(self,
              config,
              args,
              out_f=sys.stdout,
              err_f=sys.stderr,
              w3=None,
              ident=None):
     super(BlockchainCommand, self).__init__(config, args, out_f, err_f)
     self.w3 = w3 or get_web3(self._getstring("eth_rpc_endpoint"))
     self.ident = ident or get_identity(self.w3, self.session, self.args)
Example #3
0
 def __init__(self,
              config,
              args,
              out_f=sys.stdout,
              err_f=sys.stderr,
              w3=None,
              ident=None):
     super(BlockchainCommand, self).__init__(config, args, out_f, err_f)
     self.w3 = w3 or get_web3(self.get_eth_endpoint())
     self.ident = ident or self.get_identity()
Example #4
0
 def __init__(self, config, args, out_f=sys.stdout, err_f=sys.stderr, w3=None, ident=None):
     super(BlockchainCommand, self).__init__(config, args, out_f, err_f)
     self.w3 = w3 or get_web3(self.get_eth_endpoint())
     self.ident = ident or self.get_identity()
     if (type(self.w3.eth.gasPriceStrategy) != cachedGasPriceStrategy):
         self.w3.eth.setGasPriceStrategy(cachedGasPriceStrategy(self.get_gas_price_param()))