Documentation
¶
Index ¶
- Constants
- Variables
- func ExecuteCall(ctx context.Context, msg *gethcore.Message, s *state.StateDB, ...) (*gethcore.ExecutionResult, error)
- func ExecuteTransaction(tx *common.L2PricedTransaction, s *state.StateDB, header *types.Header, ...) *core.TxExecResult
- func TransactionToMessageNoSender(tx *types.Transaction, baseFee *big.Int) *core.Message
- func TransactionToMessageWithOverrides(tx *common.L2PricedTransaction, config *params.ChainConfig, ...) (*core.Message, error)
- type ContractTransparencyConfigEventLogConfig
- type ContractTransparencyConfigVisibilityConfig
- type NoOpConsensusEngine
- func (e *NoOpConsensusEngine) APIs(_ consensus.ChainHeaderReader) []rpc.API
- func (e *NoOpConsensusEngine) Author(_ *types.Header) (common.Address, error)
- func (e *NoOpConsensusEngine) CalcDifficulty(_ consensus.ChainHeaderReader, _ uint64, _ *types.Header) *big.Int
- func (e *NoOpConsensusEngine) Close() error
- func (e *NoOpConsensusEngine) Finalize(_ consensus.ChainHeaderReader, _ *types.Header, _ vm.StateDB, _ *types.Body)
- func (e *NoOpConsensusEngine) FinalizeAndAssemble(_ consensus.ChainHeaderReader, _ *types.Header, _ *state.StateDB, ...) (*types.Block, error)
- func (e *NoOpConsensusEngine) Prepare(_ consensus.ChainHeaderReader, _ *types.Header) error
- func (e *NoOpConsensusEngine) Seal(_ consensus.ChainHeaderReader, _ *types.Block, _ chan<- *types.Block, ...) error
- func (e *NoOpConsensusEngine) SealHash(_ *types.Header) common.Hash
- func (e *NoOpConsensusEngine) VerifyHeader(_ consensus.ChainHeaderReader, _ *types.Header) error
- func (e *NoOpConsensusEngine) VerifyHeaders(_ consensus.ChainHeaderReader, _ []*types.Header) (chan<- struct{}, <-chan error)
- func (e *NoOpConsensusEngine) VerifyUncles(_ consensus.ChainReader, _ *types.Block) error
- type TenChainContext
- type TransparencyConfig
- type TransparencyConfigCaller
Constants ¶
const ( BalanceDecreaseL1Payment tracing.BalanceChangeReason = 100 BalanceIncreaseL1Payment tracing.BalanceChangeReason = 101 BalanceRevertDecreaseL1Payment tracing.BalanceChangeReason = 102 BalanceRevertIncreaseL1Payment tracing.BalanceChangeReason = 103 )
Variables ¶
var ContractTranspMetaData = &bind.MetaData{
ABI: "[{\"inputs\":[],\"name\":\"visibilityRules\",\"outputs\":[{\"components\":[{\"internalType\":\"enumContractTransparencyConfig.ContractCfg\",\"name\":\"contractCfg\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"eventSignature\",\"type\":\"bytes32\"},{\"internalType\":\"enumContractTransparencyConfig.Field[]\",\"name\":\"visibleTo\",\"type\":\"uint8[]\"}],\"internalType\":\"structContractTransparencyConfig.EventLogConfig[]\",\"name\":\"eventLogConfigs\",\"type\":\"tuple[]\"}],\"internalType\":\"structContractTransparencyConfig.VisibilityConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}]",
}
ContractTranspMetaData contains all meta data concerning the TransparencyConfig contract.
var ErrGasNotEnoughForL1 = errors.New("gas limit too low to pay for execution and l1 fees")
var PoolAddress = common.HexToAddress("0x0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A")
PoolAddress - address of the pool where the gas will go todo (#627) - this has to be reworked when the gas/fee work starts
Functions ¶
func ExecuteCall ¶ added in v1.0.0
func ExecuteCall( ctx context.Context, msg *gethcore.Message, s *state.StateDB, header *common.BatchHeader, storage storage.Storage, gethEncodingService gethencoding.EncodingService, chainConfig *params.ChainConfig, gasEstimationCap uint64, config enclaveconfig.EnclaveConfig, logger gethlog.Logger, ) (*gethcore.ExecutionResult, error)
func logReceipt(r *types.Receipt, logger gethlog.Logger) { if logger.Enabled(context.Background(), gethlog.LevelTrace) { logger.Trace("Receipt", log.TxKey, r.TxHash, "Result", receiptToString(r)) } }
func receiptToString(r *types.Receipt) string { receiptJSON, err := r.MarshalJSON() if err != nil { if r.Status == types.ReceiptStatusFailed { return "Unsuccessful (status != 1) (but could not print receipt as JSON)" } return "Successfully executed (but could not print receipt as JSON)" } if r.Status == types.ReceiptStatusFailed { return fmt.Sprintf("Unsuccessful (status != 1). Receipt: %s", string(receiptJSON)) } return fmt.Sprintf("Successfully executed. Receipt: %s", string(receiptJSON)) }
ExecuteCall - executes the eth_call call
func ExecuteTransaction ¶ added in v1.0.0
func ExecuteTransaction( tx *common.L2PricedTransaction, s *state.StateDB, header *types.Header, chain *TenChainContext, cc *params.ChainConfig, gp *gethcore.GasPool, usedGas *uint64, vmCfg vm.Config, tCount int, logger gethlog.Logger, ) *core.TxExecResult
func TransactionToMessageNoSender ¶ added in v0.28.0
func TransactionToMessageWithOverrides ¶ added in v0.28.0
func TransactionToMessageWithOverrides( tx *common.L2PricedTransaction, config *params.ChainConfig, header *types.Header, ) (*core.Message, error)
TransactionToMessageWithOverrides is used to convert a transaction to a message to be applied to the evm. Overrides can change how stuff in the message is derived, e.g. the sender. This is useful for synthetic transactions, where we do not want to do signature validation or have a private key.
Types ¶
type ContractTransparencyConfigEventLogConfig ¶ added in v0.28.0
type ContractTransparencyConfigEventLogConfig struct { EventSignature common.Hash VisibleTo []uint8 }
ContractTransparencyConfigEventLogConfig is an auto generated low-level Go binding around an user-defined struct.
type ContractTransparencyConfigVisibilityConfig ¶ added in v0.28.0
type ContractTransparencyConfigVisibilityConfig struct { ContractCfg uint8 EventLogConfigs []ContractTransparencyConfigEventLogConfig }
ContractTransparencyConfigVisibilityConfig is an auto generated low-level Go binding around an user-defined struct.
type NoOpConsensusEngine ¶ added in v1.0.0
type NoOpConsensusEngine struct {
// contains filtered or unexported fields
}
NoOpConsensusEngine - implements the geth consensus.Engine, but doesn't do anything This is needed for running evm transactions
func (*NoOpConsensusEngine) APIs ¶ added in v1.0.0
func (e *NoOpConsensusEngine) APIs(_ consensus.ChainHeaderReader) []rpc.API
func (*NoOpConsensusEngine) Author ¶ added in v1.0.0
Author is used to determine where to send the gas collected from the fees.
func (*NoOpConsensusEngine) CalcDifficulty ¶ added in v1.0.0
func (e *NoOpConsensusEngine) CalcDifficulty(_ consensus.ChainHeaderReader, _ uint64, _ *types.Header) *big.Int
func (*NoOpConsensusEngine) Close ¶ added in v1.0.0
func (e *NoOpConsensusEngine) Close() error
func (*NoOpConsensusEngine) Finalize ¶ added in v1.0.0
func (e *NoOpConsensusEngine) Finalize(_ consensus.ChainHeaderReader, _ *types.Header, _ vm.StateDB, _ *types.Body)
func (*NoOpConsensusEngine) FinalizeAndAssemble ¶ added in v1.0.0
func (*NoOpConsensusEngine) Prepare ¶ added in v1.0.0
func (e *NoOpConsensusEngine) Prepare(_ consensus.ChainHeaderReader, _ *types.Header) error
func (*NoOpConsensusEngine) Seal ¶ added in v1.0.0
func (e *NoOpConsensusEngine) Seal(_ consensus.ChainHeaderReader, _ *types.Block, _ chan<- *types.Block, _ <-chan struct{}) error
func (*NoOpConsensusEngine) SealHash ¶ added in v1.0.0
func (e *NoOpConsensusEngine) SealHash(_ *types.Header) common.Hash
func (*NoOpConsensusEngine) VerifyHeader ¶ added in v1.0.0
func (e *NoOpConsensusEngine) VerifyHeader(_ consensus.ChainHeaderReader, _ *types.Header) error
func (*NoOpConsensusEngine) VerifyHeaders ¶ added in v1.0.0
func (e *NoOpConsensusEngine) VerifyHeaders(_ consensus.ChainHeaderReader, _ []*types.Header) (chan<- struct{}, <-chan error)
func (*NoOpConsensusEngine) VerifyUncles ¶ added in v1.0.0
func (e *NoOpConsensusEngine) VerifyUncles(_ consensus.ChainReader, _ *types.Block) error
type TenChainContext ¶ added in v1.0.0
type TenChainContext struct {
// contains filtered or unexported fields
}
TenChainContext - basic implementation of the ChainContext needed for the EVM integration
func NewTenChainContext ¶ added in v1.0.0
func NewTenChainContext(storage storage.Storage, gethEncodingService gethencoding.EncodingService, config config.EnclaveConfig, logger gethlog.Logger) *TenChainContext
NewTenChainContext returns a new instance of the TenChainContext given a storage ( and logger )
func (*TenChainContext) Engine ¶ added in v1.0.0
func (occ *TenChainContext) Engine() consensus.Engine
type TransparencyConfig ¶ added in v0.28.0
type TransparencyConfig struct {
TransparencyConfigCaller // Read-only binding to the contract
}
TransparencyConfig is an auto generated Go binding around an Ethereum contract.
type TransparencyConfigCaller ¶ added in v0.28.0
type TransparencyConfigCaller struct {
// contains filtered or unexported fields
}
TransparencyConfigCaller is an auto generated read-only Go binding around an Ethereum contract.
func NewTransparencyConfigCaller ¶ added in v0.28.0
func NewTransparencyConfigCaller(address common.Address, caller bind.ContractCaller) (*TransparencyConfigCaller, error)
NewTransparencyConfigCaller creates a new read-only instance of TransparencyConfig, bound to a specific deployed contract.
func (*TransparencyConfigCaller) VisibilityRules ¶ added in v0.28.0
func (_ContractTransp *TransparencyConfigCaller) VisibilityRules(opts *bind.CallOpts) (ContractTransparencyConfigVisibilityConfig, error)
VisibilityRules is a free data retrieval call binding the contract method 0x30173dd1.
Solidity: function visibilityRules() pure returns((bool,(bytes,bool,bool,bool,bool,bool)[]))