Documentation
¶
Index ¶
- Constants
- Variables
- func LoadABI() (abi.ABI, error)
- type CallbackParams
- type DeductedFee
- type IAsync
- type IAsyncCaller
- func (_IAsync *IAsyncCaller) PendingTasks(opts *bind.CallOpts, pagination TypesPageRequest) (PendingTasksResponse, error)
- func (_IAsync *IAsyncCaller) Plugins(opts *bind.CallOpts, pagination TypesPageRequest) (PluginsResponse, error)
- func (_IAsync *IAsyncCaller) TaskById(opts *bind.CallOpts, taskId uint64) (TaskByIdResponse, error)
- func (_IAsync *IAsyncCaller) Tasks(opts *bind.CallOpts, pagination TypesPageRequest, creator common.Address) (TasksResponse, error)
- type IAsyncCallerRaw
- type IAsyncCallerSession
- func (_IAsync *IAsyncCallerSession) PendingTasks(pagination TypesPageRequest) (PendingTasksResponse, error)
- func (_IAsync *IAsyncCallerSession) Plugins(pagination TypesPageRequest) (PluginsResponse, error)
- func (_IAsync *IAsyncCallerSession) TaskById(taskId uint64) (TaskByIdResponse, error)
- func (_IAsync *IAsyncCallerSession) Tasks(pagination TypesPageRequest, creator common.Address) (TasksResponse, error)
- type IAsyncCreateTask
- type IAsyncCreateTaskIterator
- type IAsyncFilterer
- func (_IAsync *IAsyncFilterer) FilterCreateTask(opts *bind.FilterOpts, taskId []uint64, creator []common.Address) (*IAsyncCreateTaskIterator, error)
- func (_IAsync *IAsyncFilterer) ParseCreateTask(log types.Log) (*IAsyncCreateTask, error)
- func (_IAsync *IAsyncFilterer) WatchCreateTask(opts *bind.WatchOpts, sink chan<- *IAsyncCreateTask, taskId []uint64, ...) (event.Subscription, error)
- type IAsyncRaw
- func (_IAsync *IAsyncRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, ...) error
- func (_IAsync *IAsyncRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
- func (_IAsync *IAsyncRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
- type IAsyncSession
- func (_IAsync *IAsyncSession) AddTask(plugin string, input []byte, maxFee []TypesCoin, callbackParams CallbackParams) (*types.Transaction, error)
- func (_IAsync *IAsyncSession) PendingTasks(pagination TypesPageRequest) (PendingTasksResponse, error)
- func (_IAsync *IAsyncSession) Plugins(pagination TypesPageRequest) (PluginsResponse, error)
- func (_IAsync *IAsyncSession) TaskById(taskId uint64) (TaskByIdResponse, error)
- func (_IAsync *IAsyncSession) Tasks(pagination TypesPageRequest, creator common.Address) (TasksResponse, error)
- type IAsyncTransactor
- type IAsyncTransactorRaw
- type IAsyncTransactorSession
- type PendingTasksResponse
- type Plugin
- type PluginFee
- type PluginsResponse
- type Precompile
- func (p *Precompile) AddTaskMethod(ctx sdk.Context, origin common.Address, stateDB vm.StateDB, method *abi.Method, ...) ([]byte, error)
- func (p *Precompile) Address() ethcmn.Address
- func (p *Precompile) GetCreateTaskEvent(ctx sdk.Context, writerAddress *ethcmn.Address, sdkEvent sdk.Event) (*ethtypes.Log, error)
- func (p *Precompile) IsTransaction(method *abi.Method) bool
- func (p *Precompile) Logger(ctx sdk.Context) log.Logger
- func (p Precompile) PendingTasksMethod(ctx sdk.Context, method *abi.Method, args []interface{}) ([]byte, error)
- func (p Precompile) PluginsMethod(ctx sdk.Context, method *abi.Method, args []any) ([]byte, error)
- func (p *Precompile) RequiredGas(input []byte) uint64
- func (p *Precompile) Run(evm *vm.EVM, contract *vm.Contract, readonly bool) (bz []byte, err error)
- func (p Precompile) TaskByIdMethod(ctx sdk.Context, method *abi.Method, args []interface{}) ([]byte, error)
- func (p Precompile) TasksMethod(ctx sdk.Context, method *abi.Method, args []interface{}) ([]byte, error)
- type Task
- type TaskByIdResponse
- type TaskResponse
- type TaskResult
- type TaskVote
- type TasksInput
- type TasksResponse
- type TypesCoin
- type TypesPageRequest
- type TypesPageResponse
- type TypesTimestamp
Constants ¶
const ( PluginsMethod = "plugins" TaskByIdMethod = "taskById" TasksMethod = "tasks" PendingTasksMethod = "pendingTasks" )
const (
AddTaskMethod = "addTask"
)
const (
// EventCreateTask defines the event type for the x/async CreateTask transaction.
EventCreateTask = "CreateTask"
)
const PrecompileAddress = "0x0000000000000000000000000000000000000903"
Variables ¶
var IAsyncABI = IAsyncMetaData.ABI
IAsyncABI is the input ABI used to generate the binding from. Deprecated: Use IAsyncMetaData.ABI instead.
var IAsyncMetaData = &bind.MetaData{
ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"taskId\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"plugin\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"callbackId\",\"type\":\"uint64\"}],\"name\":\"CreateTask\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"plugin\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structTypes.Coin[]\",\"name\":\"maxFee\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addressValue\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"gasLimit\",\"type\":\"uint64\"}],\"internalType\":\"structCallbackParams\",\"name\":\"callbackParams\",\"type\":\"tuple\"}],\"name\":\"addTask\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"taskId\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"key\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"offset\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"limit\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"countTotal\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"reverse\",\"type\":\"bool\"}],\"internalType\":\"structTypes.PageRequest\",\"name\":\"pagination\",\"type\":\"tuple\"}],\"name\":\"pendingTasks\",\"outputs\":[{\"components\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"nextKey\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"total\",\"type\":\"uint64\"}],\"internalType\":\"structTypes.PageResponse\",\"name\":\"pagination\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"plugin\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"},{\"components\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structTypes.Coin[]\",\"name\":\"pluginCreatorReward\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structTypes.Coin[]\",\"name\":\"executorReward\",\"type\":\"tuple[]\"}],\"internalType\":\"structDeductedFee\",\"name\":\"fee\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"callbackId\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"solver\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"secs\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nanos\",\"type\":\"uint64\"}],\"internalType\":\"structTypes.Timestamp\",\"name\":\"createdAt\",\"type\":\"tuple\"}],\"internalType\":\"structTask[]\",\"name\":\"tasks\",\"type\":\"tuple[]\"}],\"internalType\":\"structPendingTasksResponse\",\"name\":\"response\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"key\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"offset\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"limit\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"countTotal\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"reverse\",\"type\":\"bool\"}],\"internalType\":\"structTypes.PageRequest\",\"name\":\"pagination\",\"type\":\"tuple\"}],\"name\":\"plugins\",\"outputs\":[{\"components\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"nextKey\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"total\",\"type\":\"uint64\"}],\"internalType\":\"structTypes.PageResponse\",\"name\":\"pagination\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"description\",\"type\":\"string\"},{\"components\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structTypes.Coin[]\",\"name\":\"fee\",\"type\":\"tuple[]\"}],\"internalType\":\"structPluginFee\",\"name\":\"fee\",\"type\":\"tuple\"},{\"internalType\":\"int64\",\"name\":\"timeout\",\"type\":\"int64\"}],\"internalType\":\"structPlugin[]\",\"name\":\"plugins\",\"type\":\"tuple[]\"}],\"internalType\":\"structPluginsResponse\",\"name\":\"response\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"taskId\",\"type\":\"uint64\"}],\"name\":\"taskById\",\"outputs\":[{\"components\":[{\"components\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"plugin\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"},{\"components\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structTypes.Coin[]\",\"name\":\"pluginCreatorReward\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structTypes.Coin[]\",\"name\":\"executorReward\",\"type\":\"tuple[]\"}],\"internalType\":\"structDeductedFee\",\"name\":\"fee\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"callbackId\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"solver\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"secs\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nanos\",\"type\":\"uint64\"}],\"internalType\":\"structTypes.Timestamp\",\"name\":\"createdAt\",\"type\":\"tuple\"}],\"internalType\":\"structTask\",\"name\":\"task\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"taskId\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"Voter\",\"type\":\"bytes\"},{\"internalType\":\"enumTaskVoteType\",\"name\":\"vote\",\"type\":\"uint8\"}],\"internalType\":\"structTaskVote[]\",\"name\":\"votes\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"output\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"error_reason\",\"type\":\"string\"}],\"internalType\":\"structTaskResult\",\"name\":\"result\",\"type\":\"tuple\"}],\"internalType\":\"structTaskResponse\",\"name\":\"taskResponse\",\"type\":\"tuple\"}],\"internalType\":\"structTaskByIdResponse\",\"name\":\"response\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"key\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"offset\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"limit\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"countTotal\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"reverse\",\"type\":\"bool\"}],\"internalType\":\"structTypes.PageRequest\",\"name\":\"pagination\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"}],\"name\":\"tasks\",\"outputs\":[{\"components\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"nextKey\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"total\",\"type\":\"uint64\"}],\"internalType\":\"structTypes.PageResponse\",\"name\":\"pagination\",\"type\":\"tuple\"},{\"components\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"plugin\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"},{\"components\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structTypes.Coin[]\",\"name\":\"pluginCreatorReward\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structTypes.Coin[]\",\"name\":\"executorReward\",\"type\":\"tuple[]\"}],\"internalType\":\"structDeductedFee\",\"name\":\"fee\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"callbackId\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"solver\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"secs\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nanos\",\"type\":\"uint64\"}],\"internalType\":\"structTypes.Timestamp\",\"name\":\"createdAt\",\"type\":\"tuple\"}],\"internalType\":\"structTask\",\"name\":\"task\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"taskId\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"Voter\",\"type\":\"bytes\"},{\"internalType\":\"enumTaskVoteType\",\"name\":\"vote\",\"type\":\"uint8\"}],\"internalType\":\"structTaskVote[]\",\"name\":\"votes\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"output\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"error_reason\",\"type\":\"string\"}],\"internalType\":\"structTaskResult\",\"name\":\"result\",\"type\":\"tuple\"}],\"internalType\":\"structTaskResponse[]\",\"name\":\"tasks\",\"type\":\"tuple[]\"}],\"internalType\":\"structTasksResponse\",\"name\":\"response\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
}
IAsyncMetaData contains all meta data concerning the IAsync contract.
Functions ¶
Types ¶
type CallbackParams ¶ added in v0.6.4
CallbackParams is an auto generated low-level Go binding around an user-defined struct.
type DeductedFee ¶ added in v0.6.4
DeductedFee is an auto generated low-level Go binding around an user-defined struct.
type IAsync ¶
type IAsync struct { IAsyncCaller // Read-only binding to the contract IAsyncTransactor // Write-only binding to the contract IAsyncFilterer // Log filterer for contract events }
IAsync is an auto generated Go binding around an Ethereum contract.
type IAsyncCaller ¶
type IAsyncCaller struct {
// contains filtered or unexported fields
}
IAsyncCaller is an auto generated read-only Go binding around an Ethereum contract.
func NewIAsyncCaller ¶
func NewIAsyncCaller(address common.Address, caller bind.ContractCaller) (*IAsyncCaller, error)
NewIAsyncCaller creates a new read-only instance of IAsync, bound to a specific deployed contract.
func (*IAsyncCaller) PendingTasks ¶ added in v0.6.3
func (_IAsync *IAsyncCaller) PendingTasks(opts *bind.CallOpts, pagination TypesPageRequest) (PendingTasksResponse, error)
PendingTasks is a free data retrieval call binding the contract method 0x589ad877.
Solidity: function pendingTasks((bytes,uint64,uint64,bool,bool) pagination) view returns(((bytes,uint64),(uint64,address,string,bytes,((string,uint256)[],(string,uint256)[]),uint64,bytes,(uint64,uint64))[]) response)
func (*IAsyncCaller) Plugins ¶ added in v0.6.3
func (_IAsync *IAsyncCaller) Plugins(opts *bind.CallOpts, pagination TypesPageRequest) (PluginsResponse, error)
Plugins is a free data retrieval call binding the contract method 0x9fada3df.
Solidity: function plugins((bytes,uint64,uint64,bool,bool) pagination) view returns(((bytes,uint64),(string,address,string,((string,uint256)[]),int64)[]) response)
func (*IAsyncCaller) TaskById ¶ added in v0.6.3
func (_IAsync *IAsyncCaller) TaskById(opts *bind.CallOpts, taskId uint64) (TaskByIdResponse, error)
TaskById is a free data retrieval call binding the contract method 0xc7be4a58.
Solidity: function taskById(uint64 taskId) view returns((((uint64,address,string,bytes,((string,uint256)[],(string,uint256)[]),uint64,bytes,(uint64,uint64)),(uint64,bytes,uint8)[],(uint64,bytes,string))) response)
func (*IAsyncCaller) Tasks ¶ added in v0.6.3
func (_IAsync *IAsyncCaller) Tasks(opts *bind.CallOpts, pagination TypesPageRequest, creator common.Address) (TasksResponse, error)
Tasks is a free data retrieval call binding the contract method 0x7c55c233.
Solidity: function tasks((bytes,uint64,uint64,bool,bool) pagination, address creator) view returns(((bytes,uint64),((uint64,address,string,bytes,((string,uint256)[],(string,uint256)[]),uint64,bytes,(uint64,uint64)),(uint64,bytes,uint8)[],(uint64,bytes,string))[]) response)
type IAsyncCallerRaw ¶
type IAsyncCallerRaw struct {
Contract *IAsyncCaller // Generic read-only contract binding to access the raw methods on
}
IAsyncCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
func (*IAsyncCallerRaw) Call ¶
func (_IAsync *IAsyncCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error
Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.
type IAsyncCallerSession ¶
type IAsyncCallerSession struct { Contract *IAsyncCaller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session }
IAsyncCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.
func (*IAsyncCallerSession) PendingTasks ¶ added in v0.6.3
func (_IAsync *IAsyncCallerSession) PendingTasks(pagination TypesPageRequest) (PendingTasksResponse, error)
PendingTasks is a free data retrieval call binding the contract method 0x589ad877.
Solidity: function pendingTasks((bytes,uint64,uint64,bool,bool) pagination) view returns(((bytes,uint64),(uint64,address,string,bytes,((string,uint256)[],(string,uint256)[]),uint64,bytes,(uint64,uint64))[]) response)
func (*IAsyncCallerSession) Plugins ¶ added in v0.6.3
func (_IAsync *IAsyncCallerSession) Plugins(pagination TypesPageRequest) (PluginsResponse, error)
Plugins is a free data retrieval call binding the contract method 0x9fada3df.
Solidity: function plugins((bytes,uint64,uint64,bool,bool) pagination) view returns(((bytes,uint64),(string,address,string,((string,uint256)[]),int64)[]) response)
func (*IAsyncCallerSession) TaskById ¶ added in v0.6.3
func (_IAsync *IAsyncCallerSession) TaskById(taskId uint64) (TaskByIdResponse, error)
TaskById is a free data retrieval call binding the contract method 0xc7be4a58.
Solidity: function taskById(uint64 taskId) view returns((((uint64,address,string,bytes,((string,uint256)[],(string,uint256)[]),uint64,bytes,(uint64,uint64)),(uint64,bytes,uint8)[],(uint64,bytes,string))) response)
func (*IAsyncCallerSession) Tasks ¶ added in v0.6.3
func (_IAsync *IAsyncCallerSession) Tasks(pagination TypesPageRequest, creator common.Address) (TasksResponse, error)
Tasks is a free data retrieval call binding the contract method 0x7c55c233.
Solidity: function tasks((bytes,uint64,uint64,bool,bool) pagination, address creator) view returns(((bytes,uint64),((uint64,address,string,bytes,((string,uint256)[],(string,uint256)[]),uint64,bytes,(uint64,uint64)),(uint64,bytes,uint8)[],(uint64,bytes,string))[]) response)
type IAsyncCreateTask ¶ added in v0.6.3
type IAsyncCreateTask struct { TaskId uint64 Creator common.Address Plugin string CallbackId uint64 Raw types.Log // Blockchain specific contextual infos }
IAsyncCreateTask represents a CreateTask event raised by the IAsync contract.
type IAsyncCreateTaskIterator ¶ added in v0.6.3
type IAsyncCreateTaskIterator struct { Event *IAsyncCreateTask // Event containing the contract specifics and raw log // contains filtered or unexported fields }
IAsyncCreateTaskIterator is returned from FilterCreateTask and is used to iterate over the raw logs and unpacked data for CreateTask events raised by the IAsync contract.
func (*IAsyncCreateTaskIterator) Close ¶ added in v0.6.3
func (it *IAsyncCreateTaskIterator) Close() error
Close terminates the iteration process, releasing any pending underlying resources.
func (*IAsyncCreateTaskIterator) Error ¶ added in v0.6.3
func (it *IAsyncCreateTaskIterator) Error() error
Error returns any retrieval or parsing error occurred during filtering.
func (*IAsyncCreateTaskIterator) Next ¶ added in v0.6.3
func (it *IAsyncCreateTaskIterator) Next() bool
Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.
type IAsyncFilterer ¶
type IAsyncFilterer struct {
// contains filtered or unexported fields
}
IAsyncFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
func NewIAsyncFilterer ¶
func NewIAsyncFilterer(address common.Address, filterer bind.ContractFilterer) (*IAsyncFilterer, error)
NewIAsyncFilterer creates a new log filterer instance of IAsync, bound to a specific deployed contract.
func (*IAsyncFilterer) FilterCreateTask ¶ added in v0.6.3
func (_IAsync *IAsyncFilterer) FilterCreateTask(opts *bind.FilterOpts, taskId []uint64, creator []common.Address) (*IAsyncCreateTaskIterator, error)
FilterCreateTask is a free log retrieval operation binding the contract event 0x44ece3c06003e6bf16f04e4c130ac1d044c320bd0bdfccf2d1cec873ba002a2d.
Solidity: event CreateTask(uint64 indexed taskId, address indexed creator, string plugin, uint64 callbackId)
func (*IAsyncFilterer) ParseCreateTask ¶ added in v0.6.3
func (_IAsync *IAsyncFilterer) ParseCreateTask(log types.Log) (*IAsyncCreateTask, error)
ParseCreateTask is a log parse operation binding the contract event 0x44ece3c06003e6bf16f04e4c130ac1d044c320bd0bdfccf2d1cec873ba002a2d.
Solidity: event CreateTask(uint64 indexed taskId, address indexed creator, string plugin, uint64 callbackId)
func (*IAsyncFilterer) WatchCreateTask ¶ added in v0.6.3
func (_IAsync *IAsyncFilterer) WatchCreateTask(opts *bind.WatchOpts, sink chan<- *IAsyncCreateTask, taskId []uint64, creator []common.Address) (event.Subscription, error)
WatchCreateTask is a free log subscription operation binding the contract event 0x44ece3c06003e6bf16f04e4c130ac1d044c320bd0bdfccf2d1cec873ba002a2d.
Solidity: event CreateTask(uint64 indexed taskId, address indexed creator, string plugin, uint64 callbackId)
type IAsyncRaw ¶
type IAsyncRaw struct {
Contract *IAsync // Generic contract binding to access the raw methods on
}
IAsyncRaw is an auto generated low-level Go binding around an Ethereum contract.
func (*IAsyncRaw) Call ¶
func (_IAsync *IAsyncRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error
Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.
func (*IAsyncRaw) Transact ¶
func (_IAsync *IAsyncRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*IAsyncRaw) Transfer ¶
func (_IAsync *IAsyncRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.
type IAsyncSession ¶
type IAsyncSession struct { Contract *IAsync // Generic contract binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session }
IAsyncSession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.
func (*IAsyncSession) AddTask ¶ added in v0.6.3
func (_IAsync *IAsyncSession) AddTask(plugin string, input []byte, maxFee []TypesCoin, callbackParams CallbackParams) (*types.Transaction, error)
AddTask is a paid mutator transaction binding the contract method 0x71a562f4.
Solidity: function addTask(string plugin, bytes input, (string,uint256)[] maxFee, (address,uint64) callbackParams) returns(uint64 taskId)
func (*IAsyncSession) PendingTasks ¶ added in v0.6.3
func (_IAsync *IAsyncSession) PendingTasks(pagination TypesPageRequest) (PendingTasksResponse, error)
PendingTasks is a free data retrieval call binding the contract method 0x589ad877.
Solidity: function pendingTasks((bytes,uint64,uint64,bool,bool) pagination) view returns(((bytes,uint64),(uint64,address,string,bytes,((string,uint256)[],(string,uint256)[]),uint64,bytes,(uint64,uint64))[]) response)
func (*IAsyncSession) Plugins ¶ added in v0.6.3
func (_IAsync *IAsyncSession) Plugins(pagination TypesPageRequest) (PluginsResponse, error)
Plugins is a free data retrieval call binding the contract method 0x9fada3df.
Solidity: function plugins((bytes,uint64,uint64,bool,bool) pagination) view returns(((bytes,uint64),(string,address,string,((string,uint256)[]),int64)[]) response)
func (*IAsyncSession) TaskById ¶ added in v0.6.3
func (_IAsync *IAsyncSession) TaskById(taskId uint64) (TaskByIdResponse, error)
TaskById is a free data retrieval call binding the contract method 0xc7be4a58.
Solidity: function taskById(uint64 taskId) view returns((((uint64,address,string,bytes,((string,uint256)[],(string,uint256)[]),uint64,bytes,(uint64,uint64)),(uint64,bytes,uint8)[],(uint64,bytes,string))) response)
func (*IAsyncSession) Tasks ¶ added in v0.6.3
func (_IAsync *IAsyncSession) Tasks(pagination TypesPageRequest, creator common.Address) (TasksResponse, error)
Tasks is a free data retrieval call binding the contract method 0x7c55c233.
Solidity: function tasks((bytes,uint64,uint64,bool,bool) pagination, address creator) view returns(((bytes,uint64),((uint64,address,string,bytes,((string,uint256)[],(string,uint256)[]),uint64,bytes,(uint64,uint64)),(uint64,bytes,uint8)[],(uint64,bytes,string))[]) response)
type IAsyncTransactor ¶
type IAsyncTransactor struct {
// contains filtered or unexported fields
}
IAsyncTransactor is an auto generated write-only Go binding around an Ethereum contract.
func NewIAsyncTransactor ¶
func NewIAsyncTransactor(address common.Address, transactor bind.ContractTransactor) (*IAsyncTransactor, error)
NewIAsyncTransactor creates a new write-only instance of IAsync, bound to a specific deployed contract.
func (*IAsyncTransactor) AddTask ¶ added in v0.6.3
func (_IAsync *IAsyncTransactor) AddTask(opts *bind.TransactOpts, plugin string, input []byte, maxFee []TypesCoin, callbackParams CallbackParams) (*types.Transaction, error)
AddTask is a paid mutator transaction binding the contract method 0x71a562f4.
Solidity: function addTask(string plugin, bytes input, (string,uint256)[] maxFee, (address,uint64) callbackParams) returns(uint64 taskId)
type IAsyncTransactorRaw ¶
type IAsyncTransactorRaw struct {
Contract *IAsyncTransactor // Generic write-only contract binding to access the raw methods on
}
IAsyncTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
func (*IAsyncTransactorRaw) Transact ¶
func (_IAsync *IAsyncTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*IAsyncTransactorRaw) Transfer ¶
func (_IAsync *IAsyncTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.
type IAsyncTransactorSession ¶
type IAsyncTransactorSession struct { Contract *IAsyncTransactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session }
IAsyncTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.
func (*IAsyncTransactorSession) AddTask ¶ added in v0.6.3
func (_IAsync *IAsyncTransactorSession) AddTask(plugin string, input []byte, maxFee []TypesCoin, callbackParams CallbackParams) (*types.Transaction, error)
AddTask is a paid mutator transaction binding the contract method 0x71a562f4.
Solidity: function addTask(string plugin, bytes input, (string,uint256)[] maxFee, (address,uint64) callbackParams) returns(uint64 taskId)
type PendingTasksResponse ¶ added in v0.6.3
type PendingTasksResponse struct { Pagination TypesPageResponse Tasks []Task }
PendingTasksResponse is an auto generated low-level Go binding around an user-defined struct.
func (*PendingTasksResponse) FromResponse ¶ added in v0.6.3
func (r *PendingTasksResponse) FromResponse(res *types.QueryPendingTasksResponse) (PendingTasksResponse, error)
FromResponse needed to map QueryPendingTasksResponse to PendingTasksResponse.
type Plugin ¶ added in v0.6.3
type Plugin struct { Id string Creator common.Address Description string Fee PluginFee Timeout int64 }
Plugin is an auto generated low-level Go binding around an user-defined struct.
type PluginFee ¶ added in v0.6.4
type PluginFee struct {
Fee []TypesCoin
}
PluginFee is an auto generated low-level Go binding around an user-defined struct.
type PluginsResponse ¶ added in v0.6.3
type PluginsResponse struct { Pagination TypesPageResponse Plugins []Plugin }
PluginsResponse is an auto generated low-level Go binding around an user-defined struct.
func (*PluginsResponse) FromResponse ¶ added in v0.6.3
func (r *PluginsResponse) FromResponse(res *types.QueryPluginsResponse) (PluginsResponse, error)
type Precompile ¶
type Precompile struct { evmcmn.Precompile // contains filtered or unexported fields }
Precompile defines the precompiled contract for x/async.
func NewPrecompile ¶
func NewPrecompile( asynckeeper asyncmodulekeeper.Keeper, bankKeeper evmcmn.BankKeeper, er *common.EthEventsRegistry, ) (*Precompile, error)
func (*Precompile) AddTaskMethod ¶ added in v0.6.3
func (p *Precompile) AddTaskMethod( ctx sdk.Context, origin common.Address, stateDB vm.StateDB, method *abi.Method, args []interface{}, ) ([]byte, error)
AddTaskMethod constructs MsgAddTask from args, passes it to msg server and packs corresponding abi output.
func (*Precompile) Address ¶
func (p *Precompile) Address() ethcmn.Address
Address implements vm.PrecompiledContract.
func (*Precompile) GetCreateTaskEvent ¶ added in v0.6.3
func (p *Precompile) GetCreateTaskEvent(ctx sdk.Context, writerAddress *ethcmn.Address, sdkEvent sdk.Event) (*ethtypes.Log, error)
GetCreateTaskEvent Map EventCreateTask to eth CreateTask event and write to eth log.
func (*Precompile) IsTransaction ¶
func (p *Precompile) IsTransaction(method *abi.Method) bool
func (*Precompile) Logger ¶
func (p *Precompile) Logger(ctx sdk.Context) log.Logger
Logger returns a precompile-specific logger.
func (Precompile) PendingTasksMethod ¶ added in v0.6.3
func (p Precompile) PendingTasksMethod( ctx sdk.Context, method *abi.Method, args []interface{}, ) ([]byte, error)
PendingTasksMethod constructs QueryPendingTasksRequest from args, passes it to query server and packs response into corresponding abi output.
func (Precompile) PluginsMethod ¶ added in v0.6.3
func (*Precompile) RequiredGas ¶
func (p *Precompile) RequiredGas(input []byte) uint64
RequiredGas implements vm.PrecompiledContract. Subtle: this method shadows the method (Precompile).RequiredGas of Precompile.Precompile.
func (Precompile) TaskByIdMethod ¶ added in v0.6.3
func (p Precompile) TaskByIdMethod( ctx sdk.Context, method *abi.Method, args []interface{}, ) ([]byte, error)
TaskByIdMethod constructs QueryTaskByIdRequest from args, passes it to query server and packs response into corresponding abi output.
func (Precompile) TasksMethod ¶ added in v0.6.3
func (p Precompile) TasksMethod( ctx sdk.Context, method *abi.Method, args []interface{}, ) ([]byte, error)
TasksMethod constructs QueryTasksRequest from args, passes it to query server and packs response into corresponding abi output.
type Task ¶ added in v0.6.3
type Task struct { Id uint64 Creator common.Address Plugin string Input []byte Fee DeductedFee CallbackId uint64 Solver []byte CreatedAt TypesTimestamp }
Task is an auto generated low-level Go binding around an user-defined struct.
type TaskByIdResponse ¶ added in v0.6.3
type TaskByIdResponse struct {
TaskResponse TaskResponse
}
TaskByIdResponse is an auto generated low-level Go binding around an user-defined struct.
func (*TaskByIdResponse) FromResponse ¶ added in v0.6.3
func (r *TaskByIdResponse) FromResponse(res *types.QueryTaskByIdResponse) (TaskByIdResponse, error)
FromResponse needed to map QueryTaskByIdResponse to TaskByIdResponse.
type TaskResponse ¶ added in v0.6.3
type TaskResponse struct { Task Task Votes []TaskVote Result TaskResult }
TaskResponse is an auto generated low-level Go binding around an user-defined struct.
type TaskResult ¶ added in v0.6.3
TaskResult is an auto generated low-level Go binding around an user-defined struct.
type TaskVote ¶ added in v0.6.3
TaskVote is an auto generated low-level Go binding around an user-defined struct.
type TasksInput ¶ added in v0.6.3
type TasksInput struct { Pagination query.PageRequest `abi:"pagination"` Creator common.Address `abi:"creator"` }
TasksInput needed to unmarshal Pagination field and pass it to types.QueryTasksRequest.
type TasksResponse ¶ added in v0.6.3
type TasksResponse struct { Pagination TypesPageResponse Tasks []TaskResponse }
TasksResponse is an auto generated low-level Go binding around an user-defined struct.
func (*TasksResponse) FromResponse ¶ added in v0.6.3
func (r *TasksResponse) FromResponse(res *types.QueryTasksResponse) (TasksResponse, error)
FromResponse needed to map QueryTasksResponse to TasksResponse.
type TypesCoin ¶ added in v0.6.4
TypesCoin is an auto generated low-level Go binding around an user-defined struct.
type TypesPageRequest ¶
TypesPageRequest is an auto generated low-level Go binding around an user-defined struct.
type TypesPageResponse ¶
TypesPageResponse is an auto generated low-level Go binding around an user-defined struct.
type TypesTimestamp ¶ added in v0.6.4
TypesTimestamp is an auto generated low-level Go binding around an user-defined struct.