mirror of
https://github.com/luxfi/evm.git
synced 2026-09-24 00:27:44 +00:00
* 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]>
56 lines
1.4 KiB
Go
56 lines
1.4 KiB
Go
// Code generated by github.com/fjl/gencodec. DO NOT EDIT.
|
|
|
|
package native
|
|
|
|
import (
|
|
"encoding/json"
|
|
|
|
"github.com/ethereum/go-ethereum/common"
|
|
"github.com/ethereum/go-ethereum/common/hexutil"
|
|
)
|
|
|
|
var _ = (*flatCallResultMarshaling)(nil)
|
|
|
|
// MarshalJSON marshals as JSON.
|
|
func (f flatCallResult) MarshalJSON() ([]byte, error) {
|
|
type flatCallResult struct {
|
|
Address *common.Address `json:"address,omitempty"`
|
|
Code *hexutil.Bytes `json:"code,omitempty"`
|
|
GasUsed *hexutil.Uint64 `json:"gasUsed,omitempty"`
|
|
Output *hexutil.Bytes `json:"output,omitempty"`
|
|
}
|
|
var enc flatCallResult
|
|
enc.Address = f.Address
|
|
enc.Code = (*hexutil.Bytes)(f.Code)
|
|
enc.GasUsed = (*hexutil.Uint64)(f.GasUsed)
|
|
enc.Output = (*hexutil.Bytes)(f.Output)
|
|
return json.Marshal(&enc)
|
|
}
|
|
|
|
// UnmarshalJSON unmarshals from JSON.
|
|
func (f *flatCallResult) UnmarshalJSON(input []byte) error {
|
|
type flatCallResult struct {
|
|
Address *common.Address `json:"address,omitempty"`
|
|
Code *hexutil.Bytes `json:"code,omitempty"`
|
|
GasUsed *hexutil.Uint64 `json:"gasUsed,omitempty"`
|
|
Output *hexutil.Bytes `json:"output,omitempty"`
|
|
}
|
|
var dec flatCallResult
|
|
if err := json.Unmarshal(input, &dec); err != nil {
|
|
return err
|
|
}
|
|
if dec.Address != nil {
|
|
f.Address = dec.Address
|
|
}
|
|
if dec.Code != nil {
|
|
f.Code = (*[]byte)(dec.Code)
|
|
}
|
|
if dec.GasUsed != nil {
|
|
f.GasUsed = (*uint64)(dec.GasUsed)
|
|
}
|
|
if dec.Output != nil {
|
|
f.Output = (*[]byte)(dec.Output)
|
|
}
|
|
return nil
|
|
}
|