Documentation
¶
Index ¶
- Constants
- Variables
- func EtherToWei(val *uint256.Int) *uint256.Int
- func GetBuildVersion() string
- func ParseHexSeed(seed string) ([]byte, error)
- func ReadFileLinesTrimmed(fname string) ([]string, error)
- func ReadableAmount(amount *uint256.Int) string
- func RecoverPanic(logger *logrus.Entry, routineName string, restartFn func()) bool
- func WeiToEther(val *uint256.Int) *uint256.Int
- type ABICallDataBuilder
- type DeterministicRNG
- type FlexibleJsonUInt64
- type TxFees
- func (txFees *TxFees) BlobBaseFeeGwei() (res big.Int)
- func (txFees *TxFees) BlobBaseFeeGweiString() string
- func (txFees *TxFees) BlobFeeGwei() (res big.Int)
- func (txFees *TxFees) BlobFeeGweiString() string
- func (txFees *TxFees) TotalFeeGwei() (res big.Int)
- func (txFees *TxFees) TotalFeeGweiString() string
- func (txFees *TxFees) TxBaseFeeGwei() (res big.Int)
- func (txFees *TxFees) TxBaseFeeGweiString() string
- func (txFees *TxFees) TxFeeGwei() (res big.Int)
- func (txFees *TxFees) TxFeeGweiString() string
Constants ¶
const (
// EIP-7825: Maximum gas limit per transaction (2^24)
MaxGasLimitPerTx = 16777216
)
Variables ¶
var BuildRelease string
var BuildTime string
var BuildVersion string
Functions ¶
func GetBuildVersion ¶
func GetBuildVersion() string
func ParseHexSeed ¶ added in v1.2.4
ParseHexSeed decodes a hex seed, tolerating a 0x prefix and an odd digit count.
func ReadFileLinesTrimmed ¶
func ReadableAmount ¶ added in v1.1.4
func RecoverPanic ¶ added in v1.1.3
Types ¶
type ABICallDataBuilder ¶ added in v1.1.4
type ABICallDataBuilder struct {
// contains filtered or unexported fields
}
func NewABICallDataBuilder ¶ added in v1.1.4
func NewABICallDataBuilder(callABI, callFnName, callFnSig, callArgs string) (*ABICallDataBuilder, error)
func (*ABICallDataBuilder) BuildCallData ¶ added in v1.1.4
func (b *ABICallDataBuilder) BuildCallData(txIdx uint64) ([]byte, error)
type DeterministicRNG ¶ added in v1.2.4
type DeterministicRNG struct {
// contains filtered or unexported fields
}
DeterministicRNG is a seeded pseudo-random source for fuzzing scenarios.
Fuzzers need their output to be reproducible from a short command line: a run is identified by a seed, and every transaction index draws from its own stream derived from that seed, so a single failing transaction can be regenerated on its own without replaying the ones before it.
func NewDeterministicRNGWithSeed ¶ added in v1.2.4
func NewDeterministicRNGWithSeed(txID uint64, baseSeed string) *DeterministicRNG
NewDeterministicRNGWithSeed creates a generator for one transaction index.
The seed is hashed together with the index so that neighbouring indices produce unrelated streams; a seed that is not valid hex is used as raw bytes rather than rejected, so an operator can pass a memorable string.
func (*DeterministicRNG) Bytes ¶ added in v1.2.4
func (r *DeterministicRNG) Bytes(n int) []byte
Bytes returns n pseudo-random bytes.
func (*DeterministicRNG) Draws ¶ added in v1.2.4
func (r *DeterministicRNG) Draws() uint64
Draws returns how many values have been taken from the stream, which lets a caller assert that a generation pass consumed a stable number of draws.
func (*DeterministicRNG) Float64 ¶ added in v1.2.4
func (r *DeterministicRNG) Float64() float64
Float64 returns a value in [0, 1].
func (*DeterministicRNG) Intn ¶ added in v1.2.4
func (r *DeterministicRNG) Intn(n int) int
Intn returns a value in [0, n), or 0 when n is not positive.
func (*DeterministicRNG) Uint64 ¶ added in v1.2.4
func (r *DeterministicRNG) Uint64() uint64
Uint64 returns the next value from the stream, using xorshift64*.
func (*DeterministicRNG) Uint64n ¶ added in v1.2.4
func (r *DeterministicRNG) Uint64n(n uint64) uint64
Uint64n returns a value in [0, n), or 0 when n is zero.
type FlexibleJsonUInt64 ¶ added in v1.1.2
type FlexibleJsonUInt64 uint64
func (*FlexibleJsonUInt64) UnmarshalJSON ¶ added in v1.1.2
func (f *FlexibleJsonUInt64) UnmarshalJSON(b []byte) error
func (*FlexibleJsonUInt64) UnmarshalYAML ¶ added in v1.1.2
func (f *FlexibleJsonUInt64) UnmarshalYAML(unmarshal func(interface{}) error) error
type TxFees ¶ added in v1.1.5
type TxFees struct {
FeeAmount big.Int
BlobFeeAmount big.Int
TxBaseFee big.Int
BlobBaseFee big.Int
}
TxFees represents the fees associated with a transaction including the fee amount and blob fee amount.
func GetTransactionFees ¶ added in v1.1.5
func GetTransactionFees(tx *txtypes.Transaction, receipt *txtypes.Receipt) *TxFees