Documentation ¶
Index ¶
- type Simulator
- func (s *Simulator) Call(sender, to common.Address, input []byte, gas uint64, value *big.Int) ([]byte, error)
- func (s *Simulator) Fork(blockNumber uint64) error
- func (s *Simulator) Rollback(snapshot int)
- func (s *Simulator) Snapshot() int
- func (s *Simulator) StaticCall(sender, to common.Address, input []byte, gas uint64) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Simulator ¶
type Simulator struct {
// contains filtered or unexported fields
}
Simulator is a transaction simulator, allowing you to run transactions against the current blockchain state
func NewGethSimulator ¶
NewGethSimulator returns a new simulator that utilizes the go-ethereum LevelDB Database.
func NewSimulator ¶
func NewSimulator(blockchain *core.BlockChain) *Simulator
NewSimulator returns a bare simulator
func (*Simulator) Call ¶
func (s *Simulator) Call(sender, to common.Address, input []byte, gas uint64, value *big.Int) ([]byte, error)
Call executes an EVM call on the current context
func (*Simulator) Fork ¶
Fork creates a new temporary context with the state for a given block number
Click to show internal directories.
Click to hide internal directories.