forked from okx/go-wallet-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
withdraw.go
47 lines (41 loc) · 1.04 KB
/
withdraw.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
/*
Author: https://github.com/zksync-sdk/zksync-go
*
*/
package core
import (
"math/big"
)
const (
TransactionTypeWithdraw = "Withdraw"
TransactionTypeForcedExit = "ForcedExit"
)
type Withdraw struct {
Type string `json:"type"`
AccountId uint32 `json:"accountId"`
From string `json:"from"`
To string `json:"to"`
TokenId uint32 `json:"token"`
Amount *big.Int `json:"amount"`
Fee string `json:"fee"`
Nonce uint32 `json:"nonce"`
Signature *Signature `json:"signature"`
*TimeRange
}
func (t *Withdraw) getType() string {
return TransactionTypeWithdraw
}
type ForcedExit struct {
Type string `json:"type"`
AccountId uint32 `json:"initiatorAccountId"`
Target string `json:"target"`
TokenId uint32 `json:"token"`
Amount *big.Int `json:"amount"`
Fee string `json:"fee"`
Nonce uint32 `json:"nonce"`
Signature *Signature `json:"signature"`
*TimeRange
}
func (t *ForcedExit) getType() string {
return TransactionTypeForcedExit
}