Community version of EthTx transaction decoder
For local instance, you need few things:
- Depending on your distribution, install: docker, docker-compose, python3-pip, pipenv
- mongoDB - to set it up for the first time, execute this command:
make populate-db
. This will init db with seed provided in repository. After this, if mongo is not running you can raise it withmake run-database
- pipenv - to create virtual env run command
pipenv install
, this should create venv for this project with all python dependencies.
After this, if you want to run any command inside this env, use pipenv run
or pipenv shell
.
To run flask server localy, use make run-local
command, this will setup new server on host 0.0.0.0 port 5000
For proper functioning, .env
file is required containing all database and 3rd party providers configuration.
.env.sample
file is provided in repository with default values and should be good to use if nothing else was changed.
Parameters [CHAIN_ID]_NODE_URL
should hold valid urls to ethereum nodes; Parameter ETHERSCAN_KEY
should be equal to
Etherscan API key assigned to user.
For docker container, values should be placed in .docker_env
file since urls for database are differrent than normal
instance
The EthTx APIs are provided as a community service and without warranty, so please use what you need and no more. We
support GET
requests.
-
Decode transaction
Returns decoded EthTx transaction, based on
chain_id
and transaction hashtx_hash
- URL
/api/transactions/CHAIN_ID/TX_HASH
- Method
GET
- Authorization
- Required:
header:
x-api-key=[string]
OR query parameter:api_key=[string]
- Required:
header:
- URL Params
- Required:
chain_id=[string]
,tx_hash=[string]
- Required:
- Example
curl --location --request GET 'http://0.0.0.0:5000/api/transactions/dsad/asd' \ --header 'x-api-key: 05a2212d-9985-48d2-b54f-0fbc5ba28766'
- URL
-
Get Raw Semantic
Returns raw semantic based on
chain_id
and sender/receiveraddress
- URL
/api/semantics/CHAIN_ID/ADDRESS
- Method
GET
- Authorization
- Required:
header:
x-api-key=[string]
OR query parameter:api_key=[string]
- Required:
header:
- URL Params
- Required:
chain_id=[string]
,address=[string]
- Required:
- Example
curl --location --request GET 'http://0.0.0.0:5000/api/semantics/dsad/asd' \ --header 'x-api-key: 05a2212d-9985-48d2-b54f-0fbc5ba28766'
- URL