Documentation
¶
Index ¶
- func AbiHeadWords(t abi.Type) int
- func CalldataBytesContent(calldata []byte, method abi.Method, argIndex int) (start, length int, err error)
- func CalldataBytesEncoded(calldata []byte, method abi.Method, argIndex int) (start, length int, err error)
- func CalldataStaticWord(method abi.Method, argIndex int) (start, length int, err error)
- type ByteRange
- type PackedCallsLayout
- type Path
- func (p *Path) ABI(contractABI *abi.ABI, method string) *Path
- func (p *Path) ArgBytesData(argName string) *Path
- func (p *Path) ArgBytesDataIndex(argIndex int) *Path
- func (p *Path) ArgBytesEncoded(argName string) *Path
- func (p *Path) ArgSlot(argName string) *Path
- func (p *Path) ArgSlotIndex(argIndex int) *Path
- func (p *Path) AsSelector() Selector
- func (p *Path) CallData(i int) *Path
- func (p *Path) EncodedCallData(i int) *Path
- func (p *Path) EncodedCallsPayload() *Path
- func (p *Path) Resolve(payload *v3.CallsPayload) ([]ByteRange, error)
- func (p *Path) Slice(offset uint32, size uint32) *Path
- func (p *Path) String() string
- type RangeSelector
- type Selector
- type Span
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AbiHeadWords ¶
AbiHeadWords returns the number of 32-byte words this type occupies in the ABI calldata head. Dynamic types (bytes, string, slice, and tuples/arrays that contain them) occupy 1 word (offset); static types use their encoded size.
func CalldataBytesContent ¶
func CalldataBytesContent(calldata []byte, method abi.Method, argIndex int) (start, length int, err error)
CalldataBytesContent returns the raw bytes/string content (excludes length word and padding).
Types ¶
type ByteRange ¶
ByteRange identifies a contiguous slice of one call's calldata (data field) in a CallsPayload.
type PackedCallsLayout ¶
func ParsePackedCalls ¶
func ParsePackedCalls(packed []byte) (*PackedCallsLayout, error)
ParsePackedCalls parses the packed calls layout from the packed payload.calls data.
type Path ¶
type Path struct {
// contains filtered or unexported fields
}
func (*Path) ArgBytesData ¶
func (*Path) ArgBytesDataIndex ¶
func (*Path) ArgBytesEncoded ¶
func (*Path) ArgSlotIndex ¶
func (*Path) AsSelector ¶
func (*Path) EncodedCallData ¶
func (*Path) EncodedCallsPayload ¶
type RangeSelector ¶
type RangeSelector struct {
Range ByteRange
}
RangeSelector is a Selector backed by a fixed ByteRange (validated on Resolve).
func NewRangeSelector ¶
func NewRangeSelector(callIndex, offset, size int) RangeSelector
NewRangeSelector returns a Selector for an explicit call index, offset, and size within that call's data.
func (RangeSelector) Resolve ¶
func (r RangeSelector) Resolve(payload *v3.CallsPayload) ([]ByteRange, error)
func (RangeSelector) String ¶
func (r RangeSelector) String() string