-
Notifications
You must be signed in to change notification settings - Fork 7
/
Withdraw.go
44 lines (38 loc) · 1.1 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
package zksync
import (
"github.com/ethereum/go-ethereum/common"
"math/big"
)
const (
TransactionTypeWithdraw TransactionType = "Withdraw"
TransactionTypeForcedExit TransactionType = "ForcedExit"
)
type Withdraw struct {
Type string `json:"type"`
AccountId uint32 `json:"accountId"`
From common.Address `json:"from"`
To common.Address `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 "Withdraw"
}
type ForcedExit struct {
Type string `json:"type"`
AccountId uint32 `json:"initiatorAccountId"`
Target common.Address `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 "ForcedExit"
}