This project is a backend service for AW Inscription based on the Flask framework.
Deploy
{
"p": "game-20",
"op": "deploy",
"tick": "game",
"amt": 8000000
}
Mint
{
"p": "game-20",
"op": "mint",
"tick": "game",
}
Transfer
{
"p": "game-20",
"op": "transfer",
"tick": "game",
"amt": 8000000
}
The recipient's address is the transfer address
Market
{
"p": "game-20",
"op": "market",
"tick": "game",
"amt": 8000000,
"func":"sell"
}
Play
{
"p": "game-20",
"op": "play",
"tick": "game",
"amt": 10,
"key":"up"
}
The project provides a series of APIs for querying blockchain-related information, including address balances, address increment amounts, Tick lists, transaction statistics, and more.
app.py
: The main file of the Flask application, containing all the API definitions and service startup code.tools.py
: Tool module containing some utility functions, such as balance retrieval.statics.py
: Static configuration file containing static configuration information such as RPC address and starting block number for block scanning.
- Endpoint:
/v1/get_balance
- Request Method: GET
- Request Parameters:
address
: string, the addresstick
: string, the token type
- Response: JSON format containing balance information
- Endpoint:
/v1/get_address_amount
- Request Method: GET
- Request Parameters:
tick
: string, the token type
- Response: JSON format containing address increment amount information
- Endpoint:
/v1/get_tick_list
- Request Method: GET
- Response: JSON format containing Tick list information
- Endpoint:
/v1/get_tx_statisstics
- Request Method: GET
- Response: JSON format containing transaction statistics information
- Endpoint:
/v1/get_balance_list
- Request Method: GET
- Response: JSON format containing address balance list information
- Endpoint:
/v1/get_video_url
- Request Method: GET
- Response: JSON format containing video URL information
- Endpoint:
/v1/ping
- Request Method: GET
- Response: JSON format containing health check result
pip install Flask web3 pymongo
python app.py
- This project depends on the MongoDB database. Please ensure that MongoDB is installed and running.
- Please modify the RPC address and other configuration information in
statics.py
according to the actual situation.
If you have any questions, please contact the developer for assistance.