etherscan-python icon indicating copy to clipboard operation
etherscan-python copied to clipboard

make URL endpoint configurable

Open cgumpert opened this issue 3 years ago • 1 comments

Allow users to change the endpoint URL which would make this library also useful for other chains (e.g. BSC).

cgumpert avatar Jan 03 '22 08:01 cgumpert

I thought about this also, but other chain *scan.io services don't provide the full suite of methods etherscan does. For example If I were to use arbiscan.io as the endpoint methods such as get_contract_execution_status will cause errors as it as not been implemented from arbiscan.io https://arbiscan.io/apis#transactions

I think endpoints should be supported and hardcoded, as have the testnets; but with compatibility flags on each method

I would not expect this to be too much extra work to execute this

txnhash = "0x15f8e5ea1079d9a0bb04a4c58ae5fe7654b5b2b4463375ff7ffb490aa0032f3a"
eth = Etherscan(api_key=API_KEY, net='Arbitrum')
eth.get_contract_execution_status(txnhash=txnhash)
>>> NotImplementedError

dylmanning avatar Apr 17 '22 01:04 dylmanning