Documentation
¶
Index ¶
- Constants
- func ConvertToStringArray(arg interface{}, argPosition int) ([]string, error)
- func EmitEventWithArguments(ctx sdk.Context, p cmn.Precompile, stateDB vm.StateDB, eventType string, ...) error
- func ExecuteMsg(ctx sdk.Context, origin common.Address, contract *vm.Contract, _ vm.StateDB, ...) ([]byte, error)
- func ParseAddressFrom(args []interface{}, argIndex int) (common.Address, error)
- func ParseStringFrom(args []interface{}, argIndex int) (string, error)
Constants ¶
View Source
const (
ErrDifferentOrigin = "tx origin address %s does not match the sender address %s"
)
Variables ¶
This section is empty.
Functions ¶
func ConvertToStringArray ¶
ConvertToStringArray converts an interface value to a string array. It handles both direct []string types and []interface{} that contains strings. argPosition is used in error messages to identify which argument had the issue.
func EmitEventWithArguments ¶
func EmitEventWithArguments( ctx sdk.Context, p cmn.Precompile, stateDB vm.StateDB, eventType string, senderAddress common.Address, packedArguments ...interface{}, ) error
EmitEventWithArguments creates a new event with the specified event type, sender address, and additional arguments. It properly handles indexed topics and non-indexed data.
func ExecuteMsg ¶
func ExecuteMsg( ctx sdk.Context, origin common.Address, contract *vm.Contract, _ vm.StateDB, method *abi.Method, args []interface{}, msgCreator func([]interface{}) (interface{}, common.Address, error), msgHandler func(ctx sdk.Context, msg interface{}) error, errorPrefix string, ) ([]byte, error)
ExecuteMsg is a helper function that handles the common pattern of executing a message
func ParseAddressFrom ¶
func ParseStringFrom ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.