Documentation ¶
Index ¶
- func AddCall[OutType CallReturnType](mc *batch.MultiCaller, contract *Contract, output *OutType, method string, ...)
- func AddCallRaw(mc *batch.MultiCaller, contract *Contract, output any, method string, ...)
- func Call[retType CallReturnType](contract *Contract, opts *bind.CallOpts, method string, params ...interface{}) (retType, error)
- func DecodeAbi(abiEncoded string) (*abi.ABI, error)
- func EncodeAbiStr(abiStr string) (string, error)
- func GetValueForUint256[ValueType FormattedUint256Type](value ValueType) *big.Int
- type CallReturnType
- type Contract
- type FormattedUint256Field
- type FormattedUint256Type
- type FormattedUint8Field
- type FormattedUint8Type
- type SimpleField
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCall ¶
func AddCall[OutType CallReturnType](mc *batch.MultiCaller, contract *Contract, output *OutType, method string, args ...any)
This is a helper for adding calls to multicall that has strongly-typed output and can take in RP contracts
func AddCallRaw ¶
This is a helper for adding calls to multicall that has untyped output and can take in RP contracts Only use this in situations where the output type is unique (such as a struct for a specific contract view)
func Call ¶
func Call[retType CallReturnType](contract *Contract, opts *bind.CallOpts, method string, params ...interface{}) (retType, error)
Calls a contract method
func EncodeAbiStr ¶
zlib-compress and base64-encode an ABI JSON string
func GetValueForUint256 ¶
func GetValueForUint256[ValueType FormattedUint256Type](value ValueType) *big.Int
Converts the value to a *big.Int; useful for transactions that require formattable types
Types ¶
type CallReturnType ¶
type FormattedUint256Field ¶
type FormattedUint256Field[ValueType FormattedUint256Type] struct { // contains filtered or unexported fields }
A field that is stored as a uint256 in the contracts, but represents a more well-defined type
func NewFormattedUint256Field ¶
func NewFormattedUint256Field[ValueType FormattedUint256Type](contract *Contract, getterName string, args ...any) *FormattedUint256Field[ValueType]
Creates a new FormattedUint256Type instance
func (*FormattedUint256Field[ValueType]) AddToQuery ¶
func (f *FormattedUint256Field[ValueType]) AddToQuery(mc *batch.MultiCaller)
Adds a query to the field's value to the multicall
func (*FormattedUint256Field[ValueType]) Formatted ¶
func (f *FormattedUint256Field[ValueType]) Formatted() ValueType
Gets the value after it's been queried, converted to the more well-defined type
func (*FormattedUint256Field[ValueType]) Raw ¶
func (f *FormattedUint256Field[ValueType]) Raw() *big.Int
Gets the raw value after it's been queried
type FormattedUint256Type ¶
type FormattedUint256Type interface { time.Time | uint32 | uint64 | int64 | float64 | time.Duration }
A collection of legal types for FormattedUint256Field
type FormattedUint8Field ¶
type FormattedUint8Field[ValueType FormattedUint8Type] struct { // contains filtered or unexported fields }
A field that is stored as a uint8 in the contracts, but represents a more well-defined type
func NewFormattedUint8Field ¶
func NewFormattedUint8Field[ValueType FormattedUint8Type](contract *Contract, getterName string, args ...any) *FormattedUint8Field[ValueType]
Creates a new FormattedUint8Type instance
func (*FormattedUint8Field[ValueType]) AddToQuery ¶
func (f *FormattedUint8Field[ValueType]) AddToQuery(mc *batch.MultiCaller)
Adds a query to the field's value to the multicall
func (*FormattedUint8Field[ValueType]) Formatted ¶
func (f *FormattedUint8Field[ValueType]) Formatted() ValueType
Gets the value after it's been queried, converted to the more well-defined type
func (*FormattedUint8Field[ValueType]) Raw ¶
func (f *FormattedUint8Field[ValueType]) Raw() uint8
Gets the raw value after it's been queried
type FormattedUint8Type ¶
type FormattedUint8Type interface { types.MinipoolStatus | types.MinipoolDeposit | types.ProposalState | types.ProtocolDaoProposalState }
A collection of legal types for FormattedUint8Field
type SimpleField ¶
type SimpleField[ValueType CallReturnType] struct { // contains filtered or unexported fields }
A field where the underlying value type is the same as the type stored in the contracts
func NewSimpleField ¶
func NewSimpleField[ValueType CallReturnType](contract *Contract, getterName string, args ...any) *SimpleField[ValueType]
Creates a new SimpleField instance
func (*SimpleField[ValueType]) AddToQuery ¶
func (f *SimpleField[ValueType]) AddToQuery(mc *batch.MultiCaller)
Adds a query to the field's value to the multicall
func (*SimpleField[ValueType]) Get ¶
func (f *SimpleField[ValueType]) Get() ValueType
Gets the field's value after it's been queried