Documentation
¶
Index ¶
- Variables
- func Selector(abi string) []byte
- type CallOps
- type Contract
- type Encoder
- func Address() (Encoder, error)
- func Array(elem Encoder) (Encoder, error)
- func Bool() (Encoder, error)
- func Builtin(name string) (Encoder, bool)
- func Bytes() (Encoder, error)
- func Fixed(sign bool, M, N uint) (Encoder, error)
- func FixedArray(elem Encoder, len uint) (Encoder, error)
- func FixedBytes(len uint) (Encoder, error)
- func Integer(sign bool, bits uint) (Encoder, error)
- func String() (Encoder, error)
- func Tuple(name string, elems ...Encoder) (Encoder, error)
- type Func
- type JSONField
- type JSONFieldType
- type JSONParam
- type Op
- type StateMutability
- type Transaction
- type TransactionReceipt
- type Visitor
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrBits = errors.New("integer type bits out of range or is not a multiple of 8", errors.WithVendor(errVendor), errors.WithCode(-1)) ErrValue = errors.New("encode value type error", errors.WithVendor(errVendor), errors.WithCode(-2)) ErrFixedBytes = errors.New("fixed bytes length mismatch", errors.WithVendor(errVendor), errors.WithCode(-3)) ErrLength = errors.New("length error", errors.WithVendor(errVendor), errors.WithCode(-4)) ErrTag = errors.New("generate tuple tag error", errors.WithVendor(errVendor), errors.WithCode(-5)) ErrJSON = errors.New("parse json abi error", errors.WithVendor(errVendor), errors.WithCode(-6)) )
errors
Functions ¶
Types ¶
type Encoder ¶
type Encoder interface {
Static() bool
Marshal(value interface{}) ([]byte, error)
Unmarshal(data []byte, v interface{}) (uint, error)
fmt.Stringer
Accept(visitor Visitor)
GoTypeName() string
}
Encoder types encoder interface
func FixedBytes ¶
type Func ¶
type JSONField ¶
type JSONField struct {
Type JSONFieldType `json:"type"`
Name string `json:"name"`
Inputs []*JSONParam `json:"inputs"`
Outputs []*JSONParam `json:"outputs"`
StateMutability *StateMutability `json:"stateMutability"`
Anonymous *bool `json:"anonymous"`
}
type JSONFieldType ¶
type JSONFieldType string
const ( JSONTypeFunc JSONFieldType = "function" JSONTypeConstructor JSONFieldType = "constructor" JSONTypeReceive JSONFieldType = "receive" JSONTypeFallback JSONFieldType = "fallback" JSONTypeEvent JSONFieldType = "event" JSONTypeError JSONFieldType = "error" )
type StateMutability ¶
type StateMutability string
const ( StateMutabilityPure StateMutability = "pure" StateMutabilityView StateMutability = "view" StateMutabilityNonpayable StateMutability = "nonpayable" StateMutabilityPayable StateMutability = "payable" )
type Transaction ¶
type Transaction interface {
Close()
TX() string
Receipt() <-chan *TransactionReceipt
}
Transaction
type TransactionReceipt ¶
type TransactionReceipt struct {
Error error
Data *client.TransactionReceipt
}
Click to show internal directories.
Click to hide internal directories.