-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgen_supplyinfoburn.go
49 lines (43 loc) · 1.17 KB
/
gen_supplyinfoburn.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
// Code generated by github.com/fjl/gencodec. DO NOT EDIT.
package main
import (
"encoding/json"
"math/big"
"github.com/ethereum/go-ethereum/common/hexutil"
)
var _ = (*supplyInfoBurnMarshaling)(nil)
// MarshalJSON marshals as JSON.
func (s supplyInfoBurn) MarshalJSON() ([]byte, error) {
type supplyInfoBurn struct {
EIP1559 *hexutil.Big `json:"eip1559,omitempty"`
Blob *hexutil.Big `json:"blob,omitempty"`
Misc *hexutil.Big `json:"misc,omitempty"`
}
var enc supplyInfoBurn
enc.EIP1559 = (*hexutil.Big)(s.EIP1559)
enc.Blob = (*hexutil.Big)(s.Blob)
enc.Misc = (*hexutil.Big)(s.Misc)
return json.Marshal(&enc)
}
// UnmarshalJSON unmarshals from JSON.
func (s *supplyInfoBurn) UnmarshalJSON(input []byte) error {
type supplyInfoBurn struct {
EIP1559 *hexutil.Big `json:"eip1559,omitempty"`
Blob *hexutil.Big `json:"blob,omitempty"`
Misc *hexutil.Big `json:"misc,omitempty"`
}
var dec supplyInfoBurn
if err := json.Unmarshal(input, &dec); err != nil {
return err
}
if dec.EIP1559 != nil {
s.EIP1559 = (*big.Int)(dec.EIP1559)
}
if dec.Blob != nil {
s.Blob = (*big.Int)(dec.Blob)
}
if dec.Misc != nil {
s.Misc = (*big.Int)(dec.Misc)
}
return nil
}