Build & run with das-register. Support CKB, TRX, BNB, ETH and Matic to pay the registration fee.
- Ubuntu 18.04 or newer
- MYSQL >= 8.0
- go version >= 1.15.0
- CKB Node
- ETH Node
- BSC Node
- Tron Node
- das-database
- das-register
# get the code
git clone https://github.com/dotbitHQ/das-pay.git
# edit config/config.yaml and run das-database and init db of das-register before run das_pay_server
# compile and run
cd das-pay
make pay
./das_pay_server --config=config/config.yaml
- docker >= 20.10
- docker-compose >= 2.2.2
sudo curl -L "https://github.com/docker/compose/releases/download/v2.2.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
docker-compose up -d
if you already have a mysql installed, just run
docker run -dv $PWD/config/config.yaml:/app/config/config.yaml --name das-pay-server dotbitteam/das-pay:latest
Set the gateway address of each chain in conf/config.yaml
( private
, the private key of address, is for refund). The whole workflow as below:
┌───────┐
│ start │
└───┬───┘
│
│
│
┌───────────▼───────────┐
┌───────┤ sync block? │◄─┬───┐
│ │ CKB/ETH/BSC/TRX/MATIC │ │ │
│ └───────────┬───────────┘ │ │
│ │ │ │
│ Y │ │
│ │ │ │
│ ┌─────────▼──────────┐ │ │
│ │ parse txs in block │ │ │
│ └─────────┬──────────┘ │ │
│ │ │ │
│ │ │ │
│ │ N │
N │ │ │
│ ┌─────────▼──────────┐ │ │
│ │ pay for the order? ├───┘ │
│ └─────────┬──────────┘ │
│ │ │
│ Y │
│ │ │
│ │ │
│ ┌───────────▼─────────────┐ │
│ │ update the order status ├────┘
│ └─────────────────────────┘
│
│
│
│
│ ┌───────┐
└──────────────►│ end │
└───────┘