github.com/klaytn/klaytn@v1.10.2/blockchain/vm/errors.go (about)

     1  // Modifications Copyright 2018 The klaytn Authors
     2  // Copyright 2014 The go-ethereum Authors
     3  // This file is part of the go-ethereum library.
     4  //
     5  // The go-ethereum library is free software: you can redistribute it and/or modify
     6  // it under the terms of the GNU Lesser General Public License as published by
     7  // the Free Software Foundation, either version 3 of the License, or
     8  // (at your option) any later version.
     9  //
    10  // The go-ethereum library is distributed in the hope that it will be useful,
    11  // but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    13  // GNU Lesser General Public License for more details.
    14  //
    15  // You should have received a copy of the GNU Lesser General Public License
    16  // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
    17  //
    18  // This file is derived from core/vm/errors.go (2018/06/04).
    19  // Modified and improved for the klaytn development.
    20  
    21  package vm
    22  
    23  import (
    24  	"errors"
    25  	"fmt"
    26  
    27  	"github.com/klaytn/klaytn/params"
    28  )
    29  
    30  // List execution errors
    31  var (
    32  	ErrCodeStoreOutOfGas                 = errors.New("contract creation code storage out of gas")
    33  	ErrDepth                             = errors.New("max call depth exceeded")
    34  	ErrTraceLimitReached                 = errors.New("the number of logs reached the specified limit")
    35  	ErrInsufficientBalance               = errors.New("insufficient balance for transfer")
    36  	ErrContractAddressCollision          = errors.New("contract address collision")
    37  	ErrTotalTimeLimitReached             = errors.New("reached the total execution time limit for txs in a block")
    38  	ErrOpcodeComputationCostLimitReached = errors.New(fmt.Sprintf("reached the opcode computation cost limit (%d) for tx", params.OpcodeComputationCostLimit))
    39  	ErrFailedOnSetCode                   = errors.New("failed on setting code to an account")
    40  
    41  	// EVM internal errors
    42  	ErrWriteProtection       = errors.New("evm: write protection")
    43  	ErrReturnDataOutOfBounds = errors.New("evm: return data out of bounds")
    44  	ErrExecutionReverted     = errors.New("evm: execution reverted")
    45  	ErrMaxCodeSizeExceeded   = errors.New("evm: max code size exceeded")
    46  	ErrInvalidJump           = errors.New("evm: invalid jump destination")
    47  	ErrInvalidCode           = errors.New("invalid code: must not begin with 0xef")
    48  )