Files
evm/eth/tracers/native/gen_flatcallaction_json.go
4721f3ebe2 Sync coreth v0.12.4 rc0 (#694)
* apply diff to rc0

* replace coreth with subnet-evm

* go mod tidy

* remove must commit

* remove apricots

* replace coreth with subnet-evm

* rename banff and cortina

* test memory db

* add dUpgrade

* fix errors

* sync with v0.12.4-rc0

* more diffs

* change templates

* readd preparePredicateSlots

* run goimports

* readd tx allow list check to txpool

* Fix tests

* readd subnet evm check for tests

* fix tests

* add gas limit & coinbase fakers

* Fix timestamp types

* check error from newblockchain

* fix gas limit in simulated genesis

* downgrade ci to go 1.19

* gofmt files

* rebump go to 1.20

* bump anr to latest

* bump anr to latest

* prepare predicate storage slots in Subnet-EVM

* uncomment tests

* change order of airdrop memory cleanup

* add utils import

* Coreth 0.12.4 x apply (#720)

Co-authored-by: Darioush Jalali <[email protected]>

* move instruction sets

* revert unpack changes

* reduce diffs

* move genesis verify to vm (#753)

* move genesis verify to vm

* fix comment

* set a correct default from genesis

* fix log

* revert change to vm.go

---------

Co-authored-by: Darioush Jalali <[email protected]>

* avoid adding/removing GasLimits in tests (#755)

* move genesis verify to vm

* fix comment

* set a correct default from genesis

* fix log

* revert change to vm.go

* avoid adding/removing GasLimits in tests

* nit

---------

Co-authored-by: Ceyhun Onur <[email protected]>

---------

Co-authored-by: Darioush Jalali <[email protected]>
2023-07-26 09:45:17 -04:00

111 lines
3.3 KiB
Go

// Code generated by github.com/fjl/gencodec. DO NOT EDIT.
package native
import (
"encoding/json"
"math/big"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
)
var _ = (*flatCallActionMarshaling)(nil)
// MarshalJSON marshals as JSON.
func (f flatCallAction) MarshalJSON() ([]byte, error) {
type flatCallAction struct {
Author *common.Address `json:"author,omitempty"`
RewardType string `json:"rewardType,omitempty"`
SelfDestructed *common.Address `json:"address,omitempty"`
Balance *hexutil.Big `json:"balance,omitempty"`
CallType string `json:"callType,omitempty"`
CreationMethod string `json:"creationMethod,omitempty"`
From *common.Address `json:"from,omitempty"`
Gas *hexutil.Uint64 `json:"gas,omitempty"`
Init *hexutil.Bytes `json:"init,omitempty"`
Input *hexutil.Bytes `json:"input,omitempty"`
RefundAddress *common.Address `json:"refundAddress,omitempty"`
To *common.Address `json:"to,omitempty"`
Value *hexutil.Big `json:"value,omitempty"`
}
var enc flatCallAction
enc.Author = f.Author
enc.RewardType = f.RewardType
enc.SelfDestructed = f.SelfDestructed
enc.Balance = (*hexutil.Big)(f.Balance)
enc.CallType = f.CallType
enc.CreationMethod = f.CreationMethod
enc.From = f.From
enc.Gas = (*hexutil.Uint64)(f.Gas)
enc.Init = (*hexutil.Bytes)(f.Init)
enc.Input = (*hexutil.Bytes)(f.Input)
enc.RefundAddress = f.RefundAddress
enc.To = f.To
enc.Value = (*hexutil.Big)(f.Value)
return json.Marshal(&enc)
}
// UnmarshalJSON unmarshals from JSON.
func (f *flatCallAction) UnmarshalJSON(input []byte) error {
type flatCallAction struct {
Author *common.Address `json:"author,omitempty"`
RewardType *string `json:"rewardType,omitempty"`
SelfDestructed *common.Address `json:"address,omitempty"`
Balance *hexutil.Big `json:"balance,omitempty"`
CallType *string `json:"callType,omitempty"`
CreationMethod *string `json:"creationMethod,omitempty"`
From *common.Address `json:"from,omitempty"`
Gas *hexutil.Uint64 `json:"gas,omitempty"`
Init *hexutil.Bytes `json:"init,omitempty"`
Input *hexutil.Bytes `json:"input,omitempty"`
RefundAddress *common.Address `json:"refundAddress,omitempty"`
To *common.Address `json:"to,omitempty"`
Value *hexutil.Big `json:"value,omitempty"`
}
var dec flatCallAction
if err := json.Unmarshal(input, &dec); err != nil {
return err
}
if dec.Author != nil {
f.Author = dec.Author
}
if dec.RewardType != nil {
f.RewardType = *dec.RewardType
}
if dec.SelfDestructed != nil {
f.SelfDestructed = dec.SelfDestructed
}
if dec.Balance != nil {
f.Balance = (*big.Int)(dec.Balance)
}
if dec.CallType != nil {
f.CallType = *dec.CallType
}
if dec.CreationMethod != nil {
f.CreationMethod = *dec.CreationMethod
}
if dec.From != nil {
f.From = dec.From
}
if dec.Gas != nil {
f.Gas = (*uint64)(dec.Gas)
}
if dec.Init != nil {
f.Init = (*[]byte)(dec.Init)
}
if dec.Input != nil {
f.Input = (*[]byte)(dec.Input)
}
if dec.RefundAddress != nil {
f.RefundAddress = dec.RefundAddress
}
if dec.To != nil {
f.To = dec.To
}
if dec.Value != nil {
f.Value = (*big.Int)(dec.Value)
}
return nil
}