Documentation ¶
Index ¶
- Constants
- func ExecutorErr(errorCode pb.ExecutorError) error
- func ExecutorErrorCode(err error) pb.ExecutorError
- func IsExecutorOutOfCountersError(error pb.ExecutorError) bool
- func IsIntrinsicError(error pb.RomError) bool
- func IsInvalidBalanceError(error pb.RomError) bool
- func IsInvalidNonceError(error pb.RomError) bool
- func IsROMOutOfCountersError(error pb.RomError) bool
- func NewExecutorClient(ctx context.Context, c Config) (pb.ExecutorServiceClient, *grpc.ClientConn, context.CancelFunc)
- func RomErr(errorCode pb.RomError) error
- func RomErrorCode(err error) pb.RomError
- type Config
Constants ¶
View Source
const ( // ROM_ERROR_UNSPECIFIED indicates the execution ended successfully ROM_ERROR_UNSPECIFIED int32 = iota // ROM_ERROR_NO_ERROR indicates the execution ended successfully ROM_ERROR_NO_ERROR // ROM_ERROR_OUT_OF_GAS indicates there is not enough balance to continue the execution ROM_ERROR_OUT_OF_GAS // ROM_ERROR_STACK_OVERFLOW indicates a stack overflow has happened ROM_ERROR_STACK_OVERFLOW // ROM_ERROR_STACK_UNDERFLOW indicates a stack overflow has happened ROM_ERROR_STACK_UNDERFLOW // ROM_ERROR_MAX_CODE_SIZE_EXCEEDED indicates the code size is beyond the maximum ROM_ERROR_MAX_CODE_SIZE_EXCEEDED // ROM_ERROR_CONTRACT_ADDRESS_COLLISION there is a collision regarding contract addresses ROM_ERROR_CONTRACT_ADDRESS_COLLISION // ROM_ERROR_EXECUTION_REVERTED indicates the execution has been reverted ROM_ERROR_EXECUTION_REVERTED // ROM_ERROR_OUT_OF_COUNTERS_STEP indicates there is not enough step counters to continue the execution ROM_ERROR_OUT_OF_COUNTERS_STEP // ROM_ERROR_OUT_OF_COUNTERS_KECCAK indicates there is not enough keccak counters to continue the execution ROM_ERROR_OUT_OF_COUNTERS_KECCAK // ROM_ERROR_OUT_OF_COUNTERS_BINARY indicates there is not enough binary counters to continue the execution ROM_ERROR_OUT_OF_COUNTERS_BINARY // ROM_ERROR_OUT_OF_COUNTERS_MEM indicates there is not enough memory aligncounters to continue the execution ROM_ERROR_OUT_OF_COUNTERS_MEM // ROM_ERROR_OUT_OF_COUNTERS_ARITH indicates there is not enough arith counters to continue the execution ROM_ERROR_OUT_OF_COUNTERS_ARITH // ROM_ERROR_OUT_OF_COUNTERS_PADDING indicates there is not enough padding counters to continue the execution ROM_ERROR_OUT_OF_COUNTERS_PADDING // ROM_ERROR_OUT_OF_COUNTERS_POSEIDON indicates there is not enough poseidon counters to continue the execution ROM_ERROR_OUT_OF_COUNTERS_POSEIDON // ROM_ERROR_INVALID_JUMP indicates there is an invalid jump opcode ROM_ERROR_INVALID_JUMP // ROM_ERROR_INVALID_OPCODE indicates there is an invalid opcode ROM_ERROR_INVALID_OPCODE // ROM_ERROR_INVALID_STATIC indicates there is an invalid static call ROM_ERROR_INVALID_STATIC // ROM_ERROR_INVALID_BYTECODE_STARTS_EF indicates there is a bytecode starting with 0xEF ROM_ERROR_INVALID_BYTECODE_STARTS_EF // ROM_ERROR_INTRINSIC_INVALID_SIGNATURE indicates the transaction is failing at the signature intrinsic check ROM_ERROR_INTRINSIC_INVALID_SIGNATURE // ROM_ERROR_INTRINSIC_INVALID_CHAIN_ID indicates the transaction is failing at the chain id intrinsic check ROM_ERROR_INTRINSIC_INVALID_CHAIN_ID // ROM_ERROR_INTRINSIC_INVALID_NONCE indicates the transaction is failing at the nonce intrinsic check ROM_ERROR_INTRINSIC_INVALID_NONCE // ROM_ERROR_INTRINSIC_INVALID_GAS_LIMIT indicates the transaction is failing at the gas limit intrinsic check ROM_ERROR_INTRINSIC_INVALID_GAS_LIMIT // ROM_ERROR_INTRINSIC_INVALID_BALANCE indicates the transaction is failing at balance intrinsic check ROM_ERROR_INTRINSIC_INVALID_BALANCE // ROM_ERROR_INTRINSIC_INVALID_BATCH_GAS_LIMIT indicates the batch is exceeding the batch gas limit ROM_ERROR_INTRINSIC_INVALID_BATCH_GAS_LIMIT // ROM_ERROR_INTRINSIC_INVALID_SENDER_CODE indicates the batch is exceeding the batch gas limit ROM_ERROR_INTRINSIC_INVALID_SENDER_CODE // ROM_ERROR_INTRINSIC_TX_GAS_OVERFLOW indicates the transaction gasLimit*gasPrice > MAX_UINT_256 - 1 ROM_ERROR_INTRINSIC_TX_GAS_OVERFLOW // ROM_ERROR_BATCH_DATA_TOO_BIG indicates the batch_l2_data is too big to be processed ROM_ERROR_BATCH_DATA_TOO_BIG // ROM_ERROR_UNSUPPORTED_FORK_ID indicates that the fork id is not supported ROM_ERROR_UNSUPPORTED_FORK_ID // EXECUTOR_ERROR_UNSPECIFIED indicates the execution ended successfully EXECUTOR_ERROR_UNSPECIFIED = 0 // EXECUTOR_ERROR_NO_ERROR indicates there was no error EXECUTOR_ERROR_NO_ERROR = 1 // EXECUTOR_ERROR_COUNTERS_OVERFLOW_KECCAK indicates that the keccak counter exceeded the maximum EXECUTOR_ERROR_COUNTERS_OVERFLOW_KECCAK = 2 // EXECUTOR_ERROR_COUNTERS_OVERFLOW_BINARY indicates that the binary counter exceeded the maximum EXECUTOR_ERROR_COUNTERS_OVERFLOW_BINARY = 3 // EXECUTOR_ERROR_COUNTERS_OVERFLOW_MEM indicates that the memory align counter exceeded the maximum EXECUTOR_ERROR_COUNTERS_OVERFLOW_MEM = 4 // EXECUTOR_ERROR_COUNTERS_OVERFLOW_ARITH indicates that the arith counter exceeded the maximum EXECUTOR_ERROR_COUNTERS_OVERFLOW_ARITH = 5 // EXECUTOR_ERROR_COUNTERS_OVERFLOW_PADDING indicates that the padding counter exceeded the maximum EXECUTOR_ERROR_COUNTERS_OVERFLOW_PADDING = 6 // EXECUTOR_ERROR_COUNTERS_OVERFLOW_POSEIDON indicates that the poseidon counter exceeded the maximum EXECUTOR_ERROR_COUNTERS_OVERFLOW_POSEIDON = 7 // EXECUTOR_ERROR_UNSUPPORTED_FORK_ID indicates that the fork id is not supported EXECUTOR_ERROR_UNSUPPORTED_FORK_ID = 8 // EXECUTOR_ERROR_BALANCE_MISMATCH indicates that there is a balance mismatch error in the ROM EXECUTOR_ERROR_BALANCE_MISMATCH = 9 )
Variables ¶
This section is empty.
Functions ¶
func ExecutorErr ¶
func ExecutorErr(errorCode pb.ExecutorError) error
ExecutorErr returns an instance of error related to the ExecutorError
func ExecutorErrorCode ¶
func ExecutorErrorCode(err error) pb.ExecutorError
ExecutorErrorCode returns the error code for a given error
func IsExecutorOutOfCountersError ¶
func IsExecutorOutOfCountersError(error pb.ExecutorError) bool
IsExecutorOutOfCountersError indicates if the error is an ROM OOC
func IsIntrinsicError ¶
IsIntrinsicError indicates if the error is due to a intrinsic check
func IsInvalidBalanceError ¶
IsInvalidBalanceError indicates if the error is due to a invalid balance
func IsInvalidNonceError ¶
IsInvalidNonceError indicates if the error is due to a invalid nonce
func IsROMOutOfCountersError ¶
IsROMOutOfCountersError indicates if the error is an ROM OOC
func NewExecutorClient ¶
func NewExecutorClient(ctx context.Context, c Config) (pb.ExecutorServiceClient, *grpc.ClientConn, context.CancelFunc)
NewExecutorClient is the executor client constructor.
func RomErrorCode ¶
RomErrorCode returns the error code for a given error
Types ¶
Click to show internal directories.
Click to hide internal directories.