Documentation ¶
Index ¶
Constants ¶
View Source
const ( RetryInterval = 3 * time.Second DefaultMsgBuffer = 1000 DefaultBlocksPerScan = uint64(100) MaxBlocksPerScan = uint64(10000000) )
Variables ¶
View Source
var ( ErrNoAnyKeyStores = errors.New("No any keystores") ErrMessagePrivateKeyNil = errors.New("PrivateKey is nil") )
Functions ¶
Types ¶
type JsonRpcError ¶
type JsonRpcError struct { Code JsonRpcErrorCode `json:"code"` Message string `json:"message"` Data interface{} `json:"data,omitempty"` // Provides additional information for json rpc error. // It's not standard for JSON RPC spec. DecodedData interface{} `json:"decoded_data,omitempty"` RawError string `json:"raw_error"` Abi abi.ABI `json:"-"` }
func (*JsonRpcError) Error ¶
func (e *JsonRpcError) Error() string
func (*JsonRpcError) ErrorCode ¶
func (err *JsonRpcError) ErrorCode() JsonRpcErrorCode
func (*JsonRpcError) ErrorData ¶
func (err *JsonRpcError) ErrorData() interface{}
type JsonRpcErrorCode ¶ added in v0.1.1
type JsonRpcErrorCode int
const ( // Standard errors JsonRpcErrorCodeParseError JsonRpcErrorCode = -32700 // The JSON request is invalid, this can be due to syntax errors. JsonRpcErrorCodeInvalidRequest JsonRpcErrorCode = -32600 // The JSON request is possibly malformed. JsonRpcErrorCodeMethodNotFound JsonRpcErrorCode = -32601 // The method does not exist, often due to a typo in the method name or the method not being supported. JsonRpcErrorCodeInvalidArgument JsonRpcErrorCode = -32602 // Invalid method parameters. For example, "error":{"code":-32602,"message":"invalid argument 0: json: cannot unmarshal hex string without 0x prefix into Go value of type common.Hash"} indicates the 0x prefix is missing from the hexadecimal address. JsonRpcErrorCodeInternalError JsonRpcErrorCode = -32603 // An internal JSON-RPC error, often caused by a bad or invalid payload. // Non-standard errors for infura JsonRpcErrorCodeInvalidInput JsonRpcErrorCode = -32000 // Missing or invalid parameters, possibly due to server issues or a block not being processed yet. JsonRpcErrorCodeResourceNotFound JsonRpcErrorCode = -32001 // The requested resource cannot be found, possibly when calling an unsupported method. JsonRpcErrorCodeTransactionRejected JsonRpcErrorCode = -32003 // The transaction could not be created. JsonRpcErrorCodeMethodNotSupported JsonRpcErrorCode = -32004 // The requested method is not implemented. JsonRpcErrorCodeLimitExceeded JsonRpcErrorCode = -32005 // The request exceeds your request limit. For more information, refer to Avoid rate limiting. JsonRpcErrorCodeJsonRpcVersionNotSupported JsonRpcErrorCode = -32006 // The version of the JSON-RPC protocol is not supported. )
type RevertError ¶
func (RevertError) Error ¶
func (e RevertError) Error() string
Click to show internal directories.
Click to hide internal directories.