geth

package
v0.0.0-...-4547e52 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: GPL-3.0, Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeSpecularEVMPreTransferHook

func MakeSpecularEVMPreTransferHook(cfg RollupConfig) vm.EVMHook

MakeSpecularEVMPreTransferHook creates specular's vm.EVMHook function which is injected into the EVM and runs before every transfer currently this is only used to calculate & charge the L1 Fee

func RegisterGethRollupServices

func RegisterGethRollupServices(
	stack Node,
	cliCtx *cli.Context,
	eth api.ExecutionBackend,
	proofBackend proof.Backend,
) error

TODO: remove this when EL and CL client are decoupled. Creates rollup services and registers them as Geth services.

func ScaleBigInt

func ScaleBigInt(num *big.Int, scalar float64) *big.Int

multiply a big.Int with a float only the first 3 decimal places of the scalar are used to guarantee precision

Types

type Node

type Node interface {
	RegisterLifecycle(lc node.Lifecycle)
	AccountManager() *accounts.Manager
}

type RollupConfig

type RollupConfig interface {
	GetAccountAddr() common.Address      // recipient of the L1 Fee
	GetChainID() uint64                  // chain ID of the specular rollup
	GetL1FeeOverhead() int64             // fixed cost of submitting a tx to L1
	GetL1FeeMultiplier() float64         // value to scale the L1 Fee
	GetL1OracleAddress() common.Address  // contract providing the L1 basefee
	GetL1OracleBaseFeeSlot() common.Hash // L1 basefee storage slot
}

Jump to

Keyboard shortcuts

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