Giter VIP home page Giter VIP logo

aw_inscription's Introduction

AW Inscription

This project is a backend service for AW Inscription based on the Flask framework.

Inscription operating method

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"
 }

Project Overview

The project provides a series of APIs for querying blockchain-related information, including address balances, address increment amounts, Tick lists, transaction statistics, and more.

Project Structure

  • 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.

API Documentation

1. Get Address Balance

  • Endpoint: /v1/get_balance
  • Request Method: GET
  • Request Parameters:
    • address: string, the address
    • tick: string, the token type
  • Response: JSON format containing balance information

2. Get Address Increment Amount

  • Endpoint: /v1/get_address_amount
  • Request Method: GET
  • Request Parameters:
    • tick: string, the token type
  • Response: JSON format containing address increment amount information

3. Get Tick List

  • Endpoint: /v1/get_tick_list
  • Request Method: GET
  • Response: JSON format containing Tick list information

4. Get Transaction Statistics

  • Endpoint: /v1/get_tx_statisstics
  • Request Method: GET
  • Response: JSON format containing transaction statistics information

5. Get Address Balance List

  • Endpoint: /v1/get_balance_list
  • Request Method: GET
  • Response: JSON format containing address balance list information

6. Get Video URL

  • Endpoint: /v1/get_video_url
  • Request Method: GET
  • Response: JSON format containing video URL information

7. Health Check

  • Endpoint: /v1/ping
  • Request Method: GET
  • Response: JSON format containing health check result

Dependency Installation

pip install Flask web3 pymongo

Startup

python app.py

Notes

  • 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.

Other

If you have any questions, please contact the developer for assistance.

aw_inscription's People

Contributors

lidamaohub 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.