Giter Site home page Giter Site logo

doytsujin / ethtx_ce Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ethtx/ethtx_ce

0.0 1.0 0.0 960 KB

Ethereum transaction decoder (community version).

Home Page: https://ethtx.info

License: Apache License 2.0

Dockerfile 0.37% Makefile 0.81% Python 49.32% CSS 6.26% HTML 43.03% Shell 0.21%

ethtx_ce's Introduction

EthTx Community Edition


Community version of EthTx transaction decoder

Python Black OpenSource Apache


Local environment

For local instance, you need few things:

  1. Depending on your distribution, install: docker, docker-compose, python3-pip, pipenv
  2. 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 with make run-database
  3. 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

.env file

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 .env_docker file since urls for database are differrent than normal instance

API

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 hash tx_hash

    • URL
      /api/transactions/CHAIN_ID/TX_HASH
    • Method GET
    • Authorization
      • Required: header: x-api-key=[string] OR query parameter: api_key=[string]
    • URL Params
      • Required: chain_id=[string],tx_hash=[string]
    • Example
      curl --location --request GET 'http://0.0.0.0:5000/api/transactions/dsad/asd' \
      --header 'x-api-key: 05a2212d-9985-48d2-b54f-0fbc5ba28766'
  • Get Raw Semantic

    Returns raw semantic based on chain_id and sender/receiver address

    • URL
      /api/semantics/CHAIN_ID/ADDRESS
    • Method GET
    • Authorization
      • Required: header: x-api-key=[string] OR query parameter: api_key=[string]
    • URL Params
      • Required:chain_id=[string],address=[string]
    • Example
      curl --location --request GET 'http://0.0.0.0:5000/api/semantics/dsad/asd' \
      --header 'x-api-key: 05a2212d-9985-48d2-b54f-0fbc5ba28766'

ethtx_ce's People

Contributors

kchojn avatar piotr-rudnik avatar tmierzwa avatar wolololol avatar zdumitru avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.