jit_inherent

package
v0.4.7-rc7 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 13 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewUserOperation

func NewUserOperation(leftoverGas uint64, maxFeePerGas uint64, maxPriorityFeePerGas uint64, protoMsg *types.JitInherentRequest) *aa.UserOperation

func NewUserOperations

func NewUserOperations(leftoverGas uint64, maxFeePerGas uint64, maxPriorityFeePerGas uint64, protoMsg ...*types.JitInherentRequest) []*aa.UserOperation

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager manages the JIT inherent calls.

func NewManager

func NewManager(protocol integration.AspectProtocol) *Manager

NewManager creates a new JITInherentManager instance.

func (*Manager) ClearLookup

func (m *Manager) ClearLookup()

ClearLookup clears the user operation sender lookup. When current block finished, the lookup table should be cleared.

func (*Manager) ClearUserOp

func (m *Manager) ClearUserOp(userOpHash common.Hash)

ClearUserOp clears the user operation sender lookup. When current call finished, the lookup table should be cleared.

func (*Manager) EstimateGas

func (m *Manager) EstimateGas(aspect common.Address, inherent *types.JitInherentRequest) (
	verificationGasLimit, callGasLimit *uint256.Int, err error,
)

func (*Manager) Nonce

func (m *Manager) Nonce(ctx context.Context, account common.Address, key *big.Int) (nonce *big.Int, err error)

func (*Manager) SenderAspect

func (m *Manager) SenderAspect(userOpHash common.Hash) common.Address

SenderAspect returns the sender Aspect address of the user operation.

func (*Manager) Submit

func (m *Manager) Submit(ctx context.Context, aspect common.Address,
	gas uint64, inherent *types.JitInherentRequest,
) (*types.JitInherentResponse, uint64, error)

Submit submits a JIT inherent call. There are two types of JIT inherent calls:

  1. JIT call: the JIT call will be injected into the current evm callstack to guarantee the execution. Only one JIT call can be submitted at a time.

func (*Manager) UpdateProtocol

func (m *Manager) UpdateProtocol(protocol integration.AspectProtocol)

TODO: Refactor the code to eliminate the use of a global instance for managing JIT calls. After that, the protocol should not be updated.

Jump to

Keyboard shortcuts

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