ExecuteGroup
Ask AI
ExecuteGroup runs the next round of a group once it is due. Only accounts holding the DCA keeper role in gno.land/r/gnoswap/order/keeper may call it: the ExecuteGroup selector is assigned to DCAKeeperRole at deployment, and admin or governance grants the role or reassigns it. It returns the round input and the output credited to the orders, before their execution fees, which each order pays when paid out.
Parameters:
- groupID: see GetExecutableGroups.
- amountOutMin: minimum pool output, before the execution fee; 0 disables it.
- expectedAmountIn: the group orderAmount amountOutMin was quoted for. The round reverts if the orderAmount differs; 0 is accepted only with amountOutMin 0.
- minOrderAmountOut: the least output every order of the round must be credited after its own execution fee rate (see GetExecutionQuote), in the output token's smallest unit; 0 means 1. The round reverts when its smallest order would receive less.
Pool selection: among the pair's whitelisted pools (one per fee tier), the pool with the best quote for the full round is used. The round swaps on that pool directly through gno.land/r/gnoswap/pool, without the router, so no router fee is charged. The swap's price limit comes from the pair price limit (see SetPairPriceLimit), so no unit of input is sold below it, whatever amountOutMin is. The round reverts when no whitelisted pool can fill it within the limit.
Reverts while the execute or withdraw operation is halted.
Command
# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.
gnokey maketx call -pkgpath "gno.land/r/gnoswap/order/dca" -func "ExecuteGroup" -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "onyx-1" -remote "https://rpc.onyx.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.onyx.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/gnoswap/order/dca" -func "ExecuteGroup" -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "onyx-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.onyx.testnets.gno.land" call.tx