Documentation
¶
Index ¶
- func NewStubOracle(t *testing.T) (*StubBlockOracle, *StubStateOracle)
- type CapturingHinter
- type KvStateOracle
- type Miner
- type PrecompileResult
- type StubBlockOracle
- func (o StubBlockOracle) BlockByHash(blockHash common.Hash, chainID eth.ChainID) *gethTypes.Block
- func (o StubBlockOracle) BlockDataByHash(agreedBlockHash, blockHash common.Hash, chainID eth.ChainID) *gethTypes.Block
- func (o StubBlockOracle) Hinter() l2Types.OracleHinter
- func (o StubBlockOracle) OutputByRoot(root common.Hash, chainID eth.ChainID) eth.Output
- func (o StubBlockOracle) ReceiptsByBlockHash(blockHash common.Hash, chainID eth.ChainID) (*gethTypes.Block, gethTypes.Receipts)
- func (o StubBlockOracle) TransitionStateByRoot(root common.Hash) *interopTypes.TransitionState
- type StubPrecompileOracle
- type StubStateOracle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStubOracle ¶
func NewStubOracle(t *testing.T) (*StubBlockOracle, *StubStateOracle)
Types ¶
type CapturingHinter ¶ added in v1.13.7
func (*CapturingHinter) Hint ¶ added in v1.13.7
func (c *CapturingHinter) Hint(v preimage.Hint)
type KvStateOracle ¶
type KvStateOracle struct {
T *testing.T
Source ethdb.KeyValueStore
StubHinter l2Types.OracleHinter
}
KvStateOracle loads data from a source ethdb.KeyValueStore
func NewKvStateOracle ¶
func NewKvStateOracle(t *testing.T, db ethdb.KeyValueStore) *KvStateOracle
func (*KvStateOracle) CodeByHash ¶
func (*KvStateOracle) Hinter ¶ added in v1.13.7
func (o *KvStateOracle) Hinter() l2Types.OracleHinter
func (*KvStateOracle) NodeByHash ¶
type Miner ¶ added in v1.11.2
type Miner struct {
// contains filtered or unexported fields
}
type PrecompileResult ¶ added in v1.7.2
type StubBlockOracle ¶
type StubBlockOracle struct {
Blocks map[common.Hash]*gethTypes.Block
Receipts map[common.Hash]gethTypes.Receipts
Outputs map[common.Hash]eth.Output
TransitionStates map[common.Hash]*interopTypes.TransitionState
// contains filtered or unexported fields
}
func NewStubOracleWithBlocks ¶
func (StubBlockOracle) BlockByHash ¶
func (StubBlockOracle) BlockDataByHash ¶ added in v1.11.0
func (StubBlockOracle) Hinter ¶ added in v1.11.2
func (o StubBlockOracle) Hinter() l2Types.OracleHinter
func (StubBlockOracle) OutputByRoot ¶ added in v1.1.4
func (StubBlockOracle) ReceiptsByBlockHash ¶ added in v1.11.0
func (StubBlockOracle) TransitionStateByRoot ¶ added in v1.11.0
func (o StubBlockOracle) TransitionStateByRoot(root common.Hash) *interopTypes.TransitionState
type StubPrecompileOracle ¶ added in v1.7.2
type StubPrecompileOracle struct {
Results map[common.Hash]PrecompileResult
Calls int
// contains filtered or unexported fields
}
func NewStubPrecompileOracle ¶ added in v1.9.1
func NewStubPrecompileOracle(t *testing.T) *StubPrecompileOracle
func (*StubPrecompileOracle) Precompile ¶ added in v1.7.2
type StubStateOracle ¶
type StubStateOracle struct {
Data map[common.Hash][]byte
Code map[common.Hash][]byte
// contains filtered or unexported fields
}
StubStateOracle is a StateOracle implementation that reads from simple maps
func NewStubStateOracle ¶
func NewStubStateOracle(t *testing.T) *StubStateOracle
func (*StubStateOracle) CodeByHash ¶
func (*StubStateOracle) Hinter ¶ added in v1.13.7
func (o *StubStateOracle) Hinter() l2Types.OracleHinter
func (*StubStateOracle) NodeByHash ¶
Click to show internal directories.
Click to hide internal directories.