Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AspectProtocol ¶
type AspectProtocol interface { ChainId() *big.Int VMFromSnapshotState() (VM, error) VMFromCanonicalState() (VM, error) ConvertProtocolTx(txData TxData) (BaseLayerTx, error) EstimateGas(txData TxData) (uint64, error) GasPrice() (*big.Int, error) LastBlockHeader() (BlockHeader, error) NonceOf(address common.Address) (uint64, error) SubmitTxToCurrentProposal(tx BaseLayerTx) error InitSystemContract(addr common.Address, code []byte, storage map[common.Hash][]byte, contractType SystemContractType) error BalanceOf(address common.Address) *big.Int }
AspectProtocol is the core interface for integrating Aspect Programming into an existing protocol
type BaseLayerTx ¶
type BlockHeader ¶
type JoinPointStage ¶
type JoinPointStage int
JoinPointStage defines the stage of join point.
const ( Unknown JoinPointStage = iota BlockInitialization PreTransactionExecution TransactionExecution PostTransactionExecution BlockFinalization )
type Message ¶
type Message interface { From() common.Address To() *common.Address GasPrice() *big.Int GasFeeCap() *big.Int GasTipCap() *big.Int Gas() uint64 Value() *big.Int Nonce() uint64 Data() []byte }
Message represents a message sent to a contract.
type SystemContractType ¶
type SystemContractType int
const ( Native SystemContractType = iota Solidity )
type TxData ¶
type TxData interface { TxType() byte // returns the type ID From() common.Address To() common.Address Data() []byte Gas() uint64 GasPrice() *big.Int GasTipCap() *big.Int GasFeeCap() *big.Int Value() *big.Int Nonce() uint64 Extra() map[string]interface{} }
TxData defines the interface of a transaction data.
type VM ¶
type VM interface { // Msg returns the current vm message Msg() Message // Call executes the contract call using the given input. Call(ctx context.Context, caller vm.ContractRef, addr common.Address, input []byte, gas uint64, value *big.Int) (ret []byte, leftOverGas uint64, err error) }
VM defines the interface to interact with VM.
Click to show internal directories.
Click to hide internal directories.