Files
m2pool_payment/internal/constant/constant.go
2025-11-13 17:08:38 +08:00

45 lines
1.2 KiB
Go

package constant
const (
STATUS_FAILED = 0 // 失败
STATUS_SUCCESS = 1 // 成功
STATUS_PENDING = 2 // 待确认
STATUS_VERIFY_FAILED = 3 // 验证失败
STATUS_BALANCE_NOT_ENOUGH = 4 // 钱包余额不足
STATUS_UNTRANSFER = 5 // 未支付
STATUS_END = 6 // 完成
STATUS_ERROR = 7
)
const ETH_ERC20_USDT_CONTRACT_ADDRESS = "0xdAC17F958D2ee523a2206206994597C13D831ec7"
const ETH_ERC20_ABI = `
[
{
"constant": true,
"inputs": [{"name": "_owner", "type": "address"}],
"name": "balanceOf",
"outputs": [{"name": "balance", "type": "uint256"}],
"type": "function"
},
{
"constant": false,
"inputs": [
{"name": "_to", "type": "address"},
{"name": "_value", "type": "uint256"}
],
"name": "transfer",
"outputs": [{"name": "", "type": "bool"}],
"type": "function"
},
{
"anonymous": false,
"inputs": [
{"indexed": true, "name": "from", "type": "address"},
{"indexed": true, "name": "to", "type": "address"},
{"indexed": false,"name": "value","type": "uint256"}
],
"name": "Transfer",
"type": "event"
}
]
`