-
Notifications
You must be signed in to change notification settings - Fork 117
/
Copy pathjetton.go
62 lines (53 loc) · 1.37 KB
/
jetton.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
62
package core
import (
"math/big"
"github.com/shopspring/decimal"
"github.com/tonkeeper/tongo"
)
type JettonWallet struct {
// Address of a jetton wallet.
Address tongo.AccountID
Balance decimal.Decimal
OwnerAddress *tongo.AccountID
// JettonAddress of a jetton master.
JettonAddress tongo.AccountID
Lock *JettonWalletLockData
Extensions []string
}
type JettonHolder struct {
JettonAddress tongo.AccountID
Address tongo.AccountID
Owner tongo.AccountID
Balance decimal.Decimal
}
type JettonMaster struct {
// Address of a jetton master.
Address tongo.AccountID
TotalSupply big.Int
Mintable bool
Admin *tongo.AccountID
}
type JettonWalletLockData struct {
FullBalance decimal.Decimal
UnlockTime int64
}
type JettonOperationType = string
const (
TransferJettonOperation JettonOperationType = "transfer"
MintJettonOperation JettonOperationType = "mint"
BurnJettonOperation JettonOperationType = "burn"
UnknownJettonOperation JettonOperationType = "unknown"
)
type JettonOperation struct {
Operation JettonOperationType
Source *tongo.AccountID
Destination *tongo.AccountID
JettonMaster tongo.AccountID
TraceID TraceID
DestEndBalance decimal.Decimal
Amount decimal.Decimal
QueryID uint64
ForwardPayload string
Lt uint64
Utime int64
}