-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.go
64 lines (56 loc) · 1.31 KB
/
types.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
63
64
package ethereum
import (
"math/big"
)
// Client defines typed wrappers for the Ethereum RPC API.
type Client uint32
// Block defines wrappers for a block retrieved by the client.
type Block struct {
id uint64
client Client
}
// Contract defines typed wrappers for a contract with given abi.
type Contract struct {
id uint32
client Client
methods map[string]*ContractMethod
events map[string]Event
address string
}
// Event defines the Ethereum event and wraps the methods for the event.
type Event struct {
name string
contractID uint32
client Client
}
// ContractMethod defines the contract method and wraps the methods for the contract method.
type ContractMethod struct {
contractID uint32
client Client
name string
inputs []string
outputs []string
}
// Transaction defines wrappers for a transaction retrieved by the client.
type Transaction struct {
id uint32
client Client
blockID uint64
contractID uint32
nonce uint64
gasPrice *big.Int
gasTipCap *big.Int
gasFeeCap *big.Int
gas uint64
value *big.Int
data []byte
rawSignatures rawSignatures
toAddress []byte
chain *big.Int
hash []byte
}
type rawSignatures struct {
VSig *big.Int
RSig *big.Int
SSig *big.Int
}