Files
geth/ethclient/gen_simulate_block_result.go
zeekayandEthereum Foundation <https://github.com/ethereum/go-ethereum> 347b448823 Merge latest go-ethereum upstream (v1.16.6) into luxfi/geth
Merged upstream changes from go-ethereum master branch (commit fb3c8f462)
while preserving luxfi branding and package structure.

Key changes:
- Updated to go-ethereum v1.16.6 (patch version bump from v1.16.5)
- Preserved luxfi module name (github.com/luxfi/geth)
- Preserved luxfi branding in LICENSE (Lux Industries Inc.)
- Maintained LuxMainnetChainConfig and LuxTestnetChainConfig
- All import paths use github.com/luxfi/geth (not ethereum)
- Added Lux genesis hashes for network identification
- Integrated new upstream features:
  * Enhanced blob pool with conversion support
  * New keccak256 preimage tracer
  * Transaction pool validation improvements
  * State sizing utilities
  * Filter system enhancements
  * Various performance and stability improvements

Build verified: geth v1.16.6-unstable compiled successfully

Co-authored-by: Ethereum Foundation <https://github.com/ethereum/go-ethereum>
2025-10-28 23:52:29 -07:00

81 lines
2.3 KiB
Go

// Code generated by github.com/fjl/gencodec. DO NOT EDIT.
package ethclient
import (
"encoding/json"
"math/big"
"github.com/luxfi/geth/common"
"github.com/luxfi/geth/common/hexutil"
)
var _ = (*simulateBlockResultMarshaling)(nil)
// MarshalJSON marshals as JSON.
func (s SimulateBlockResult) MarshalJSON() ([]byte, error) {
type SimulateBlockResult struct {
Number *hexutil.Big `json:"number"`
Hash common.Hash `json:"hash"`
Timestamp hexutil.Uint64 `json:"timestamp"`
GasLimit hexutil.Uint64 `json:"gasLimit"`
GasUsed hexutil.Uint64 `json:"gasUsed"`
FeeRecipient common.Address `json:"miner"`
BaseFeePerGas *hexutil.Big `json:"baseFeePerGas,omitempty"`
Calls []SimulateCallResult `json:"calls"`
}
var enc SimulateBlockResult
enc.Number = (*hexutil.Big)(s.Number)
enc.Hash = s.Hash
enc.Timestamp = hexutil.Uint64(s.Timestamp)
enc.GasLimit = hexutil.Uint64(s.GasLimit)
enc.GasUsed = hexutil.Uint64(s.GasUsed)
enc.FeeRecipient = s.FeeRecipient
enc.BaseFeePerGas = (*hexutil.Big)(s.BaseFeePerGas)
enc.Calls = s.Calls
return json.Marshal(&enc)
}
// UnmarshalJSON unmarshals from JSON.
func (s *SimulateBlockResult) UnmarshalJSON(input []byte) error {
type SimulateBlockResult struct {
Number *hexutil.Big `json:"number"`
Hash *common.Hash `json:"hash"`
Timestamp *hexutil.Uint64 `json:"timestamp"`
GasLimit *hexutil.Uint64 `json:"gasLimit"`
GasUsed *hexutil.Uint64 `json:"gasUsed"`
FeeRecipient *common.Address `json:"miner"`
BaseFeePerGas *hexutil.Big `json:"baseFeePerGas,omitempty"`
Calls []SimulateCallResult `json:"calls"`
}
var dec SimulateBlockResult
if err := json.Unmarshal(input, &dec); err != nil {
return err
}
if dec.Number != nil {
s.Number = (*big.Int)(dec.Number)
}
if dec.Hash != nil {
s.Hash = *dec.Hash
}
if dec.Timestamp != nil {
s.Timestamp = uint64(*dec.Timestamp)
}
if dec.GasLimit != nil {
s.GasLimit = uint64(*dec.GasLimit)
}
if dec.GasUsed != nil {
s.GasUsed = uint64(*dec.GasUsed)
}
if dec.FeeRecipient != nil {
s.FeeRecipient = *dec.FeeRecipient
}
if dec.BaseFeePerGas != nil {
s.BaseFeePerGas = (*big.Int)(dec.BaseFeePerGas)
}
if dec.Calls != nil {
s.Calls = dec.Calls
}
return nil
}