-
Notifications
You must be signed in to change notification settings - Fork 1
/
ethtypes.go
61 lines (52 loc) · 1.56 KB
/
ethtypes.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package main
import (
"math"
"math/big"
"github.com/ethereum/go-ethereum/common"
)
var Fixed8Decimals = big.NewInt(int64(math.Pow10(8)))
type BlockAndTxLogs struct {
Height int64
BlockHash string
ParentBlockHash string
BlockTime int64
}
type EthStatus struct {
Allowance string `json:"allowance"`
Erc20Balance string `json:"erc20_balance"`
EthBalance string `json:"eth_balance"`
}
type SwapStatus struct {
Id int64 `json:"id"`
SenderAddr string `json:"sender_addr"`
ReceiverAddr string `json:"receiver_addr"`
OtherChainAddr string `json:"other_chain_addr"`
InAmount string `json:"in_amount"`
OutAmount string `json:"out_amount"`
RandomNumberHash string `json:"random_number_hash"`
ExpireTimestamp int64 `json:"expire_timestamp"`
Height int64 `json:"height"`
Timestamp int64 `json:"timestamp"`
RandomNumber string `json:"random_number"`
}
type FailedSwaps struct {
TotalCount int `json:"total_count"`
CurPage int `json:"cur_page"`
NumPerPage int `json:"num_per_page"`
Swaps []*SwapStatus `json:"swaps"`
}
type ReconciliationStatus struct {
Bep2TokenBalance *big.Float
Bep2TokenOutPending *big.Float
OtherChainTokenBalance *big.Float
OtherChainTokenOutPending *big.Float
}
type SwapRequest struct {
Id common.Hash
RandomNumberHash common.Hash
ExpireTimestamp int64
SenderAddress string
RecipientAddress string
RecipientOtherChain string
OutAmount *big.Int
}