gas_usage

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 6, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Default

type Default struct {
}

Default returns hard coded gas usage for all slots. In theory can use the eth client to esimtate it, but this requires a valid nonce and a staked addr so not that easy. Also the client estimation doesn't account for refunds due to freeing up storage slots so this needs to be tracked separately and further complicates the logic.

func NewDefault

func NewDefault() *Default

func (*Default) Query

func (self *Default) Query(ctx context.Context, _ *ethereum.Account, slot uint64) (uint64, error)

type GasUsageQuerier

type GasUsageQuerier interface {
	Query(ctx context.Context, account *ethereum.Account, slot uint64) (uint64, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL