ErrSpoofedRealm
untyped stringErrSpoofedRealm is returned when a store write gets a non-current realm.
Value
"spoofed realm"
ErrNilInitializer
untyped stringErrNilInitializer is raised by RegisterInitializer for a nil factory.
Value
"nil initializer"
ErrUpgradeWhileExecuting
untyped stringErrUpgradeWhileExecuting is raised by UpgradeImpl during a group swap.
Value
"cannot upgrade while a group execution is in progress"
ErrInvalidSwapCallback
untyped stringErrInvalidSwapCallback is returned by a round's swap callback for a call it must not pay: not from the pool, outside a round, a second payment, or a delta that is not the round's exact input (e.g. a pool without liquidity owes nothing).
Value
"invalid swap callback"
errImplNotInitialized
untyped stringValue
"implementation is not initialized"
errInvalidImpl
untyped stringValue
"impl is not an IDCAOrder"
errInvalidDomainStore
untyped stringValue
"domainStore is not an IDCAOrderStore"
errNilConfig
untyped stringValue
"config is nil"
errNilValue
untyped stringValue
"%s is nil"
errInvalidConfigType
untyped stringValue
"failed to cast config: %T"
makeErrorWithDetails
func(message string, details string) .uverse.error- OID
- 08e7a5…954e:3
makeErrorWithDetails details
GetConfig
func() *v0.ConfigGetConfig returns a copy of the configuration. Returns: - \*pdca.Config: copy of the stored configuration
- OID
- 08e7a5…954e:5
GetConfig details
GetExecutionFeeRate
func() int64GetExecutionFeeRate returns the execution fee rate new orders snapshot: the share of an order's output sent to the protocol fee realm. An existing order's rate is pdca.Order.ExecutionFeeRate (see GetOrder). Returns: - int64: execution fee rate, in basis points
- OID
- 08e7a5…954e:7
GetExecutionFeeRate details
GetMaxPoolPriceDeviationRate
func() int64GetMaxPoolPriceDeviationRate returns how far, in basis points of price, a pool's price may sit on the favorable side of its swap price limit and still be quoted (see SetMaxPoolPriceDeviationRate); 0 means the check is off. Returns: - int64: rate in basis points
- OID
- 08e7a5…954e:8
GetMaxPoolPriceDeviationRate details
GetMaxPairPriceLimitAge
func() int64GetMaxPairPriceLimitAge returns how long, in seconds, a pair price limit stays usable after it was set (see SetMaxPairPriceLimitAge). Returns: - int64: maximum age in seconds
- OID
- 08e7a5…954e:9
GetMaxPairPriceLimitAge details
GetMaxExecutionCount
func() int64GetMaxExecutionCount returns the maximum executions of a new order. Returns: - int64: maximum executionCount
- OID
- 08e7a5…954e:10
GetMaxExecutionCount details
GetAllowedIntervals
func() []int64GetAllowedIntervals returns the intervals new orders may use. Returns: - \[]int64: allowed intervals in seconds, ascending
- OID
- 08e7a5…954e:11
GetAllowedIntervals details
IsAllowedInterval
func(interval int64) boolIsAllowedInterval reports whether new orders may use interval. Parameters: - interval: round interval, in seconds Returns: - bool: true when interval is allowed
- OID
- 08e7a5…954e:12
IsAllowedInterval details
GetSlotStep
func(interval int64) int64GetSlotStep returns the spacing of the slot offsets new orders may use at interval. Parameters: - interval: round interval, in seconds Returns: - int64: slot step in seconds; 0 when interval is not allowed
- OID
- 08e7a5…954e:13
GetSlotStep details
GetMinExecutionGapRate
func() int64GetMinExecutionGapRate returns the minimum gap between a group's executions. Returns: - int64: minimum gap, in basis points of the group interval
- OID
- 08e7a5…954e:14
GetMinExecutionGapRate details
GetMaxClaimBatchSize
func() int64GetMaxClaimBatchSize returns the most orders one ClaimGroupOrders call examines. Returns: - int64: maximum claim batch size
- OID
- 08e7a5…954e:15
GetMaxClaimBatchSize details
GetNextOrderID
func() uint64GetNextOrderID returns the ID the next created order receives. Returns: - uint64: next order ID
- OID
- 08e7a5…954e:16
GetNextOrderID details
ExistsOrder
func(orderID uint64) boolExistsOrder reports whether an order is active. Finished orders are deleted. Parameters: - orderID: order to look up Returns: - bool: true while the order is active
- OID
- 08e7a5…954e:17
ExistsOrder details
GetOrder
func(orderID uint64) (*v0.Order, .uverse.error)GetOrder returns a copy of an active order. Finished orders are deleted and return an error. Parameters: - orderID: order to look up Returns: - \*pdca.Order: copy of the order - error: non-nil when the order is not active
- OID
- 08e7a5…954e:18
GetOrder details
GetOrders
func() *v0.ReadOnlyTreeGetOrders returns a read-only view of active orders. Returns: - \*rotree.ReadOnlyTree: pdca.OrderKey(orderID) -> \*pdca.Order; each order read from the view is a copy
- OID
- 08e7a5…954e:19
GetOrders details
GetOrdersByOwner
func() *v0.ReadOnlyTreeGetOrdersByOwner returns the read-only owner index of active orders. Iterate the \[pdca.OwnerOrderPrefix(owner), pdca.PrefixEnd(prefix)) range for one owner's orders in ID order. Returns: - \*rotree.ReadOnlyTree: pdca.OwnerOrderKey(owner, orderID) -> uint64 orderID
- OID
- 08e7a5…954e:20
GetOrdersByOwner details
GetOrderIDsByOwner
func(owner .uverse.address, startAfterID uint64, count int) []uint64GetOrderIDsByOwner returns up to count active order IDs of owner, ascending and greater than startAfterID (0 starts from the first). Page by passing the last returned ID. Parameters: - owner: order owner - startAfterID: exclusive lower bound of the returned IDs - count: maximum number of IDs returned Returns: - \[]uint64: active order IDs, ascending
- OID
- 08e7a5…954e:21
GetOrderIDsByOwner details
GetClaimableAmount
func(orderID uint64) int64GetClaimableAmount returns the output an order can claim now, net of the order's execution fee. Parameters: - orderID: order to look up Returns: - int64: output the next Claim pays the owner; 0 when the order is not active
- OID
- 08e7a5…954e:22
GetClaimableAmount details
GetOrderExecutionLogs
func(orderID uint64, count int) ([]*v0.ExecutionLog, .uverse.error)GetOrderExecutionLogs returns copies of up to count of an active order's unreleased execution logs, oldest first: each covers up to three rounds, \[FirstRound, LastRound], and the input the order sells in each. A log is released once all of its rounds executed and the order is claimed; the rounds' swap results are in the DCAGroupExecuted events. Parameters: - orderID: order to look up - count: maximum number of logs returned Returns: - \[]\*pdca.ExecutionLog: copies of the order's unreleased logs - error: non-nil when the order is not active
- OID
- 08e7a5…954e:23
GetOrderExecutionLogs details
GetExecutionLogs
func() *v0.ReadOnlyTreeGetExecutionLogs returns the read-only index of unreleased execution logs. Iterate the \[pdca.ExecutionLogPrefix(orderID), pdca.PrefixEnd(prefix)) range for one order's logs; the key suffix decodes to the first round. Returns: - \*rotree.ReadOnlyTree: pdca.ExecutionLogKey(orderID, firstRound) -> uint64 lastRound
- OID
- 08e7a5…954e:24
GetExecutionLogs details
ExistsGroup
func(groupID string) boolExistsGroup reports whether a group is stored. Parameters: - groupID: pdca.MakeGroupID(inputToken, outputToken, interval, slotOffset) Returns: - bool: true when the group exists
- OID
- 08e7a5…954e:25
ExistsGroup details
GetGroup
func(groupID string) (*v0.Group, .uverse.error)GetGroup returns a copy of a group without its round marks. The copy's round mark tree is empty; read the marks through GetGroupRoundMarks. Parameters: - groupID: group to look up Returns: - \*pdca.Group: copy of the group's fields - error: non-nil when the group does not exist
- OID
- 08e7a5…954e:26
GetGroup details
GetGroups
func() *v0.ReadOnlyTreeGetGroups returns a read-only view of every group. Returns: - \*rotree.ReadOnlyTree: groupID -> \*pdca.Group; each group read from the view is a copy without its round marks, as GetGroup returns
- OID
- 08e7a5…954e:27
GetGroups details
GetGroupRoundMarks
func(groupID string) *v0.ReadOnlyTreeGetGroupRoundMarks returns a read-only view of a group's round marks: one per round at which an unfinalized order ends. Parameters: - groupID: group to look up Returns: - \*rotree.ReadOnlyTree: pdca.RoundKey(round) -> \*pdca.RoundMark; each mark read from the view is a copy. nil when the group does not exist
- OID
- 08e7a5…954e:28
GetGroupRoundMarks details
GetOrdersByGroup
func() *v0.ReadOnlyTreeGetOrdersByGroup returns the read-only group index of active orders. Iterate the \[pdca.GroupOrderPrefix(groupID), pdca.PrefixEnd(prefix)) range for one group's orders in ID order. Returns: - \*rotree.ReadOnlyTree: pdca.GroupOrderKey(groupID, orderID) -> uint64 orderID
- OID
- 08e7a5…954e:29
GetOrdersByGroup details
GetOrderAmountsByGroup
func() *v0.ReadOnlyTreeGetOrderAmountsByGroup returns the read-only group index of orders by executionFeeRate, then amountPerExecution, which a round reads for the smallest order of each fee rate. Iterate the \[pdca.GroupOrderPrefix(groupID), pdca.PrefixEnd(prefix)) range for one group's orders by ascending executionFeeRate, amountPerExecution, then ID, or the \[pdca.GroupOrderFeeRatePrefix(groupID, rate), pdca.PrefixEnd(prefix)) range for the orders of one fee rate. A finished order's entry stays until the order is paid out or a later round of its group removes it. Returns: - \*rotree.ReadOnlyTree: pdca.GroupOrderAmountKey(groupID, executionFeeRate, amountPerExecution, orderID) -> uint64 endRound
- OID
- 08e7a5…954e:30
GetOrderAmountsByGroup details
GetOrderIDsByGroup
func(groupID string, startAfterID uint64, count int) []uint64GetOrderIDsByGroup returns up to count active order IDs of a group, ascending and greater than startAfterID. Page as GetOrderIDsByOwner. Parameters: - groupID: group to look up - startAfterID: exclusive lower bound of the returned IDs - count: maximum number of IDs returned Returns: - \[]uint64: active order IDs, ascending
- OID
- 08e7a5…954e:31
GetOrderIDsByGroup details
GetScheduledGroups
func() *v0.ReadOnlyTreeGetScheduledGroups returns the read-only schedule of groups with input to sell, ordered by next execution timestamp, then group ID. pdca.ScheduleKeyTimestamp decodes a key's timestamp. Returns: - \*rotree.ReadOnlyTree: pdca.ScheduleKey(nextExecutionTimestamp, groupID) -> string groupID
- OID
- 08e7a5…954e:32
GetScheduledGroups details
GetExecutableGroups
func(cursor string, count int) ([]*v0.Group, .uverse.error)GetExecutableGroups returns copies of up to count groups due now, oldest first. Paging: start with cursor "", then pass pdca.FormatScheduleCursor of the last group back until fewer than count groups return. The cursor is a fixed schedule position, so groups executed between pages do not shift it. Parameters: - cursor: "" or "\<nextExecutionTimestamp>|\<groupID>" of the last group seen - count: maximum number of groups returned Returns: - \[]\*pdca.Group: copies of due groups without their round marks; empty while execution is halted - error: non-nil when cursor is malformed
- OID
- 08e7a5…954e:33
GetExecutableGroups details
GetExecutionQuote
func(groupID string) stringGetExecutionQuote returns, as JSON, how the group's next round would trade now: its input, the selected pool, the expected pool output, an estimate of the orders' execution fees on that output and of what is left for the orders, and every candidate pool's quote or ineligibility reason. Orders pay their own snapshotted fee rates when paid out, each rounding its own cumulative fee. The fee and order output totals instead charge executionFeeRate, the highest rate of the orders the round sells (0 when none does), once on the whole output, so they are estimates, not bounds: the fees the orders pay can exceed expectedExecutionFeeAmount by rounding. minAmountsByExecutionFeeRate lists, by ascending fee rate, the smallest order of each rate the round sells. The round reverts unless every listed order is credited at least max(1, minOrderAmountOut) net of its rate; expectedMinOrderAmountOut is the least such output at expectedAmountOut, and minAmountPerExecution the smallest order overall. Keepers set amountOutMin from expectedAmountOut and pass amountIn as expectedAmountIn. Parameters: - groupID: group to quote Returns: - string: JSON quote; "" when the group does not exist
- OID
- 08e7a5…954e:34
GetExecutionQuote details
GetTokenMinAmountPerExecution
func(tokenPath string) int64GetTokenMinAmountPerExecution returns the minimum input per execution the manager set for tokenPath (see SetTokenMinAmountPerExecution). Parameters: - tokenPath: input token path Returns: - int64: minimum in raw token units; 0 when none is set
- OID
- 08e7a5…954e:35
GetTokenMinAmountPerExecution details
GetMinAmountPerExecution
func(tokenPath string) int64GetMinAmountPerExecution returns the minimum input per execution a new order selling tokenPath needs: the larger of GetConfig().MinAmountPerExecution() and GetTokenMinAmountPerExecution(tokenPath). Parameters: - tokenPath: input token path Returns: - int64: effective minimum, in raw token units
- OID
- 08e7a5…954e:36
GetMinAmountPerExecution details
GetTokenMinAmountsPerExecution
func() *v0.ReadOnlyTreeGetTokenMinAmountsPerExecution returns the read-only index of per-token minimums, in key order. Returns: - \*rotree.ReadOnlyTree: tokenPath -> int64
- OID
- 08e7a5…954e:37
GetTokenMinAmountsPerExecution details
GetPairPriceLimit
func(inputToken string, outputToken string) (string, int64)GetPairPriceLimit returns the price limit of selling inputToken for outputToken (see SetPairPriceLimit). Parameters: - inputToken, outputToken: the pair direction Returns: - string: minOutputPerInputX128, decimal Q128; "0" when none is set - int64: unix time the limit was set; 0 when none is set
- OID
- 08e7a5…954e:38
GetPairPriceLimit details
GetPairPriceLimits
func() *v0.ReadOnlyTreeGetPairPriceLimits returns a read-only view of the pair price limits, in key order. Entries are copies. Returns: - \*rotree.ReadOnlyTree: "inputToken:outputToken" -> \*pdca.PairPriceLimit
- OID
- 08e7a5…954e:39
GetPairPriceLimits details
GetPendingExecutionFeeAmount
func(tokenPath string) int64GetPendingExecutionFeeAmount returns the execution fee of tokenPath held by this realm: fees payouts charged, and fees the protocol fee realm could not accept yet. It is forwarded by the next round whose output token is tokenPath, or by CollectPendingExecutionFee. Parameters: - tokenPath: fee token path Returns: - int64: pending execution fee, in raw token units
- OID
- 08e7a5…954e:40
GetPendingExecutionFeeAmount details
GetPendingExecutionFees
func() *v0.ReadOnlyTreeGetPendingExecutionFees returns the read-only index of pending execution fees. A token whose pending fee was forwarded keeps its entry at 0. Returns: - \*rotree.ReadOnlyTree: tokenPath -> int64 pending amount
- OID
- 08e7a5…954e:41
GetPendingExecutionFees details
CreateOrder
func(inputToken string, outputToken string, interval int64, slotOffset int64, amountPerExecution int64, executionCount int64) uint64CreateOrder creates an order that sells amountPerExecution of inputToken for outputToken every interval seconds, executionCount times, and returns its ID. The caller must first approve Address() for amountPerExecution\*executionCount. amountPerExecution must be at least GetMinAmountPerExecution(inputToken), and the pair direction needs a price limit (see SetPairPriceLimit). The order snapshots the execution fee rate in effect (see GetExecutionFeeRate) for its lifetime: the fee is that share of the order's output, deducted when the output is paid out. Later rate changes apply only to orders created afterwards. Orders with the same inputToken, outputToken, interval, and slotOffset share one group and execute together. Each round trades on the pair's best whitelisted pool, chosen at execution time (see GetExecutionQuote). The caller also pays the storage deposit of the order's execution logs, one per three rounds; each is refunded to whoever releases it after all of its rounds execute (see ClaimGroupOrders). Parameters: - inputToken, outputToken: at least one whitelisted direct pool must connect them (see gno.land/r/gnoswap/order/whitelist.AddWhitelistedPool). - interval: one of GetConfig().AllowedIntervals(). - slotOffset: seconds after each interval boundary of the unix epoch at which rounds run, a multiple of GetConfig().SlotStep(interval) in \[0, interval). Boundaries are UTC midnights for daily intervals; weekly boundaries fall on Thursdays 00:00 UTC (1970-01-01 was one), so a Monday slot is 4 days. The first round waits for the next slot, or runs now if it is due. Reverts while the execute operation is halted for DCA in gno.land/r/gnoswap/order/halt.
- OID
- 08e7a5…954e:42
CreateOrder details
CancelOrder
func(orderID uint64) (int64, int64)CancelOrder pays accrued output, refunds unsold input, and closes the order. It returns the refunded input and the output paid by this call. Owner only. Reverts while the withdraw operation is halted.
- OID
- 08e7a5…954e:44
CancelOrder details
Claim
func(orderID uint64) int64Claim pays accrued output to the order owner and returns the amount. Anyone may call it, e.g. a keeper delivering output; proceeds always go to the owner. The order's execution logs whose rounds all executed are released, and their storage deposit is refunded to the caller. Reverts while the withdraw operation is halted.
- OID
- 08e7a5…954e:45
Claim details
ExecuteGroup
func(groupID string, expectedAmountIn int64, amountOutMin int64, minOrderAmountOut int64) (int64, int64)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.
- OID
- 08e7a5…954e:46
ExecuteGroup details
ClaimGroupOrders
func(groupID string, startAfterOrderID uint64, maxOrderCount int) (int, uint64)ClaimGroupOrders pays accrued output to the owners of a group's active orders, as Claim does, so owners receive output without claiming. Anyone may call it; output always goes to the order owner. One call examines at most min(maxOrderCount, maxClaimBatchSize) orders after startAfterOrderID, in ID order. It returns the number of orders paid or completed and the cursor for the next call; repeat until the cursor is 0. Each order's execution logs whose rounds all executed are released and finished orders are deleted; the freed storage deposit is refunded to the caller, so the reward grows with the orders and rounds claimed. Reverts while the withdraw operation is halted.
- OID
- 08e7a5…954e:47
ClaimGroupOrders details
ForceCancelOrder
func(orderID uint64) (int64, int64)ForceCancelOrder closes an order that blocks its group's rounds. As with CancelOrder, accrued output and unsold input go to the order owner; the caller receives nothing but the freed storage deposit of the order's execution logs. It returns the refunded input and the output paid. The order must have rounds left and be, as checked on-chain: - below the minimum per execution a new order of its token needs now (reason below\_min\_amount), or - in a due round that, as quoted now, credits it less than one output unit after its execution fee (no\_order\_output), or - the largest order (by amountPerExecution, ties included) of a due round that no pool can fill as quoted now while a pool fills part of it, with some output, within the price limit (exceeds\_pool\_capacity). A round that needs several orders gone is shrunk one largest order per call. Any other order reverts with "order does not block its group". DCAOrderForceCancelled reports the reason. Only accounts holding the role assigned to the ForceCancelOrder selector in gno.land/r/gnoswap/order/keeper (DCAKeeperRole at deployment). Reverts while the withdraw operation is halted.
- OID
- 08e7a5…954e:48
ForceCancelOrder details
CollectPendingExecutionFee
func(tokenPath string) (int64, int64)CollectPendingExecutionFee forwards the execution fee pending for tokenPath (see GetPendingExecutionFeeAmount) to the protocol fee realm and returns the amount forwarded and the amount left pending. Payouts keep each order's execution fee as pending, and every round forwards the pending fee of its output token; this forwards it when no round of that output token runs. If the protocol fee realm rejects it, for example while its collection is halted, the fee stays pending. Anyone may call it: the fee only moves to the protocol fee realm. Reverts while the withdraw operation is halted.
- OID
- 08e7a5…954e:49
CollectPendingExecutionFee details
SetExecutionFeeRate
func(executionFeeRate int64)SetExecutionFeeRate sets the share of an order's output, in basis points (0 to 1000, at most 10%), sent to the protocol fee realm. Orders created afterwards snapshot it; existing orders keep their rate. Admin or governance only.
- OID
- 08e7a5…954e:50
SetExecutionFeeRate details
SetOrderLimits
func(minAmountPerExecution int64, maxExecutionCount int64)SetOrderLimits sets the minimum input per execution and the maximum executions per order. Admin or governance only.
- OID
- 08e7a5…954e:51
SetOrderLimits details
AddAllowedInterval
func(interval int64)AddAllowedInterval allows new orders to use interval, in seconds (one minute to one year). The interval starts with a single slot, offset 0 (see SetSlotStep). Admin or governance only.
- OID
- 08e7a5…954e:52
AddAllowedInterval details
RemoveAllowedInterval
func(interval int64)RemoveAllowedInterval stops new orders from using interval. Existing orders and groups of that interval keep running until they finish; its slot step is dropped, and re-adding it starts from a single slot. At least one interval must stay allowed. Admin or governance only.
- OID
- 08e7a5…954e:53
RemoveAllowedInterval details
SetMinExecutionGapRate
func(minExecutionGapRate int64)SetMinExecutionGapRate sets the minimum gap between two executions of a group, in basis points of its interval (0 to 10000), so a late execution is not followed right away by the next one. Admin or governance only.
- OID
- 08e7a5…954e:54
SetMinExecutionGapRate details
SetMaxClaimBatchSize
func(maxClaimBatchSize int64)SetMaxClaimBatchSize caps the orders one ClaimGroupOrders call examines, bounding its gas. Admin or governance only.
- OID
- 08e7a5…954e:55
SetMaxClaimBatchSize details
SetMaxPoolPriceDeviationRate
func(maxPoolPriceDeviationRate int64)SetMaxPoolPriceDeviationRate sets how far, in basis points of price, a pool's price may sit on the favorable side of its swap price limit (see SetPairPriceLimit) and still be quoted, 0 to 10000; 0 disables the check. A pool further away is ineligible without a quote: its quote or swap would walk every tick between its price and the limit, which an empty or manipulated pool far from the oracle price makes unbounded. v0 starts at 2000 (20%). Admin or governance only.
- OID
- 08e7a5…954e:56
SetMaxPoolPriceDeviationRate details
SetMaxPairPriceLimitAge
func(maxPairPriceLimitAge int64)SetMaxPairPriceLimitAge sets how long, in seconds, a pair price limit stays usable after the pool manager set it (see SetPairPriceLimit), 60 to 604800. Under an older limit every pool is ineligible (code price\_limit\_stale), so rounds stop until the limit is refreshed instead of trading at a stale price. v0 starts at 3600 (one hour). Admin or governance only.
- OID
- 08e7a5…954e:57
SetMaxPairPriceLimitAge details
SetSlotStep
func(interval int64, slotStep int64)SetSlotStep sets the spacing, in seconds, of the slot offsets new orders may use at interval: slotStep must divide the interval, and the interval then has interval/slotStep slots. slotStep == interval allows offset 0 only. Existing groups keep their slot, even one the new step no longer allows; only new orders are checked. Finer steps split each pair's orders into more groups, so each round sells less in more swaps. Admin or governance only.
- OID
- 08e7a5…954e:58
SetSlotStep details
SetTokenMinAmountPerExecution
func(tokenPath string, minAmountPerExecution int64)SetTokenMinAmountPerExecution sets the minimum input per execution of new orders selling tokenPath, in raw token units, applied on top of the global minimum (see SetOrderLimits); 0 removes it. The pool manager derives it from an oracle price, so every order is worth a set value per round whatever the token's decimals. Existing orders are unaffected. Admin, governance, or accounts holding the role assigned to the SetTokenMinAmountPerExecution selector in gno.land/r/gnoswap/order/keeper (PoolManagerRole at deployment).
- OID
- 08e7a5…954e:59
SetTokenMinAmountPerExecution details
SetPairPriceLimit
func(inputToken string, outputToken string, minOutputPerInputX128 string)SetPairPriceLimit sets the least pool output, before the execution fee, that rounds selling inputToken for outputToken accept per unit of input: minOutputPerInputX128 is raw outputToken units per raw inputToken unit, in Q128 fixed point, as a decimal string. "0" removes the limit. Every quote and round of the pair direction passes the limit to the pool as its swap price limit, adjusted for the pool's fee tier, so each unit of input fills at a rate of at least the limit and a swap crosses only the ticks up to it. A pool whose price is past the limit is skipped, and a round that cannot be filled within it reverts. A pair direction without a limit cannot be quoted, executed, or receive new orders. The limit applies from the next quote or round, to existing orders too. Its update time is recorded but not checked on-chain. Admin, governance, or accounts holding the role assigned to the SetPairPriceLimit selector in gno.land/r/gnoswap/order/keeper (PoolManagerRole at deployment).
- OID
- 08e7a5…954e:60
SetPairPriceLimit details
currentAddress
.uverse.addressValue
<gnolang.StringValue>
kvStore
*v1.kvStore- OID
- 08e7a5…954e:81
kvStore details
versionManager
*v1.versionManager- OID
- 08e7a5…954e:85
versionManager details
implementation
*v0.dcaOrderImpl- OID
- 0782ac…7c8d:97
implementation details
init.69
func()- OID
- 08e7a5…954e:65
init.69 details
initializeDomainStore
func(int, rlm .uverse.realm, kvStore v1.KVStore) interface{...}- OID
- 08e7a5…954e:67
initializeDomainStore details
Address
func() .uverse.address- OID
- 08e7a5…954e:68
Address details
getImplementation
func() v0.IDCAOrder- OID
- 08e7a5…954e:69
getImplementation details
updateImplementation
func() .uverse.error- OID
- 08e7a5…954e:70
updateImplementation details
NewBPTreeN
func(fanout int) *v0.BPTreeNewBPTreeN allocates an empty B+tree in the order/dca realm. Implementations create the store trees through it, so the trees are owned by the realm that stores them.
- OID
- 08e7a5…954e:71
NewBPTreeN details
StoreKey
typeStoreKey is a key of the DCA KV store.
Value
dca.StoreKey
StoreKeyOrders
dca.StoreKeyStore layout. Tree keys are built by the pdca key helpers. orders OrderKey -> *Order ordersByOwner OwnerOrderKey -> orderID groups groupID -> *Group scheduledGroups ScheduleKey -> groupID, groups with orderAmount > 0 only nextOrderID uint64 config *Config executing true while ExecuteGroup is inside its pool swap ordersByGroup GroupOrderKey -> orderID, active orders only pendingExecutionFees tokenPath -> int64, fees not yet sent to protocol_fee executionLogs ExecutionLogKey -> lastRound uint64, unreleased logs of active orders orderAmountsByGroup GroupOrderAmountKey -> endRound, orders by executionFeeRate, then amountPerExecution tokenMinAmountsPerExecution tokenPath -> int64, per-token minimum input per execution pairPriceLimits PairKey -> *PairPriceLimit, minimum pool output per input of a pair direction
Value
<gnolang.StringValue>
StoreKeyOrdersByOwner
dca.StoreKeyStore layout. Tree keys are built by the pdca key helpers. orders OrderKey -> *Order ordersByOwner OwnerOrderKey -> orderID groups groupID -> *Group scheduledGroups ScheduleKey -> groupID, groups with orderAmount > 0 only nextOrderID uint64 config *Config executing true while ExecuteGroup is inside its pool swap ordersByGroup GroupOrderKey -> orderID, active orders only pendingExecutionFees tokenPath -> int64, fees not yet sent to protocol_fee executionLogs ExecutionLogKey -> lastRound uint64, unreleased logs of active orders orderAmountsByGroup GroupOrderAmountKey -> endRound, orders by executionFeeRate, then amountPerExecution tokenMinAmountsPerExecution tokenPath -> int64, per-token minimum input per execution pairPriceLimits PairKey -> *PairPriceLimit, minimum pool output per input of a pair direction
Value
<gnolang.StringValue>
StoreKeyGroups
dca.StoreKeyStore layout. Tree keys are built by the pdca key helpers. orders OrderKey -> *Order ordersByOwner OwnerOrderKey -> orderID groups groupID -> *Group scheduledGroups ScheduleKey -> groupID, groups with orderAmount > 0 only nextOrderID uint64 config *Config executing true while ExecuteGroup is inside its pool swap ordersByGroup GroupOrderKey -> orderID, active orders only pendingExecutionFees tokenPath -> int64, fees not yet sent to protocol_fee executionLogs ExecutionLogKey -> lastRound uint64, unreleased logs of active orders orderAmountsByGroup GroupOrderAmountKey -> endRound, orders by executionFeeRate, then amountPerExecution tokenMinAmountsPerExecution tokenPath -> int64, per-token minimum input per execution pairPriceLimits PairKey -> *PairPriceLimit, minimum pool output per input of a pair direction
Value
<gnolang.StringValue>
StoreKeyScheduledGroups
dca.StoreKeyStore layout. Tree keys are built by the pdca key helpers. orders OrderKey -> *Order ordersByOwner OwnerOrderKey -> orderID groups groupID -> *Group scheduledGroups ScheduleKey -> groupID, groups with orderAmount > 0 only nextOrderID uint64 config *Config executing true while ExecuteGroup is inside its pool swap ordersByGroup GroupOrderKey -> orderID, active orders only pendingExecutionFees tokenPath -> int64, fees not yet sent to protocol_fee executionLogs ExecutionLogKey -> lastRound uint64, unreleased logs of active orders orderAmountsByGroup GroupOrderAmountKey -> endRound, orders by executionFeeRate, then amountPerExecution tokenMinAmountsPerExecution tokenPath -> int64, per-token minimum input per execution pairPriceLimits PairKey -> *PairPriceLimit, minimum pool output per input of a pair direction
Value
<gnolang.StringValue>
StoreKeyNextOrderID
dca.StoreKeyStore layout. Tree keys are built by the pdca key helpers. orders OrderKey -> *Order ordersByOwner OwnerOrderKey -> orderID groups groupID -> *Group scheduledGroups ScheduleKey -> groupID, groups with orderAmount > 0 only nextOrderID uint64 config *Config executing true while ExecuteGroup is inside its pool swap ordersByGroup GroupOrderKey -> orderID, active orders only pendingExecutionFees tokenPath -> int64, fees not yet sent to protocol_fee executionLogs ExecutionLogKey -> lastRound uint64, unreleased logs of active orders orderAmountsByGroup GroupOrderAmountKey -> endRound, orders by executionFeeRate, then amountPerExecution tokenMinAmountsPerExecution tokenPath -> int64, per-token minimum input per execution pairPriceLimits PairKey -> *PairPriceLimit, minimum pool output per input of a pair direction
Value
<gnolang.StringValue>
StoreKeyConfig
dca.StoreKeyStore layout. Tree keys are built by the pdca key helpers. orders OrderKey -> *Order ordersByOwner OwnerOrderKey -> orderID groups groupID -> *Group scheduledGroups ScheduleKey -> groupID, groups with orderAmount > 0 only nextOrderID uint64 config *Config executing true while ExecuteGroup is inside its pool swap ordersByGroup GroupOrderKey -> orderID, active orders only pendingExecutionFees tokenPath -> int64, fees not yet sent to protocol_fee executionLogs ExecutionLogKey -> lastRound uint64, unreleased logs of active orders orderAmountsByGroup GroupOrderAmountKey -> endRound, orders by executionFeeRate, then amountPerExecution tokenMinAmountsPerExecution tokenPath -> int64, per-token minimum input per execution pairPriceLimits PairKey -> *PairPriceLimit, minimum pool output per input of a pair direction
Value
<gnolang.StringValue>
StoreKeyExecuting
dca.StoreKeyStore layout. Tree keys are built by the pdca key helpers. orders OrderKey -> *Order ordersByOwner OwnerOrderKey -> orderID groups groupID -> *Group scheduledGroups ScheduleKey -> groupID, groups with orderAmount > 0 only nextOrderID uint64 config *Config executing true while ExecuteGroup is inside its pool swap ordersByGroup GroupOrderKey -> orderID, active orders only pendingExecutionFees tokenPath -> int64, fees not yet sent to protocol_fee executionLogs ExecutionLogKey -> lastRound uint64, unreleased logs of active orders orderAmountsByGroup GroupOrderAmountKey -> endRound, orders by executionFeeRate, then amountPerExecution tokenMinAmountsPerExecution tokenPath -> int64, per-token minimum input per execution pairPriceLimits PairKey -> *PairPriceLimit, minimum pool output per input of a pair direction
Value
<gnolang.StringValue>
StoreKeyOrdersByGroup
dca.StoreKeyStore layout. Tree keys are built by the pdca key helpers. orders OrderKey -> *Order ordersByOwner OwnerOrderKey -> orderID groups groupID -> *Group scheduledGroups ScheduleKey -> groupID, groups with orderAmount > 0 only nextOrderID uint64 config *Config executing true while ExecuteGroup is inside its pool swap ordersByGroup GroupOrderKey -> orderID, active orders only pendingExecutionFees tokenPath -> int64, fees not yet sent to protocol_fee executionLogs ExecutionLogKey -> lastRound uint64, unreleased logs of active orders orderAmountsByGroup GroupOrderAmountKey -> endRound, orders by executionFeeRate, then amountPerExecution tokenMinAmountsPerExecution tokenPath -> int64, per-token minimum input per execution pairPriceLimits PairKey -> *PairPriceLimit, minimum pool output per input of a pair direction
Value
<gnolang.StringValue>
StoreKeyPendingExecutionFees
dca.StoreKeyStore layout. Tree keys are built by the pdca key helpers. orders OrderKey -> *Order ordersByOwner OwnerOrderKey -> orderID groups groupID -> *Group scheduledGroups ScheduleKey -> groupID, groups with orderAmount > 0 only nextOrderID uint64 config *Config executing true while ExecuteGroup is inside its pool swap ordersByGroup GroupOrderKey -> orderID, active orders only pendingExecutionFees tokenPath -> int64, fees not yet sent to protocol_fee executionLogs ExecutionLogKey -> lastRound uint64, unreleased logs of active orders orderAmountsByGroup GroupOrderAmountKey -> endRound, orders by executionFeeRate, then amountPerExecution tokenMinAmountsPerExecution tokenPath -> int64, per-token minimum input per execution pairPriceLimits PairKey -> *PairPriceLimit, minimum pool output per input of a pair direction
Value
<gnolang.StringValue>
StoreKeyExecutionLogs
dca.StoreKeyStore layout. Tree keys are built by the pdca key helpers. orders OrderKey -> *Order ordersByOwner OwnerOrderKey -> orderID groups groupID -> *Group scheduledGroups ScheduleKey -> groupID, groups with orderAmount > 0 only nextOrderID uint64 config *Config executing true while ExecuteGroup is inside its pool swap ordersByGroup GroupOrderKey -> orderID, active orders only pendingExecutionFees tokenPath -> int64, fees not yet sent to protocol_fee executionLogs ExecutionLogKey -> lastRound uint64, unreleased logs of active orders orderAmountsByGroup GroupOrderAmountKey -> endRound, orders by executionFeeRate, then amountPerExecution tokenMinAmountsPerExecution tokenPath -> int64, per-token minimum input per execution pairPriceLimits PairKey -> *PairPriceLimit, minimum pool output per input of a pair direction
Value
<gnolang.StringValue>
StoreKeyOrderAmountsByGroup
dca.StoreKeyStore layout. Tree keys are built by the pdca key helpers. orders OrderKey -> *Order ordersByOwner OwnerOrderKey -> orderID groups groupID -> *Group scheduledGroups ScheduleKey -> groupID, groups with orderAmount > 0 only nextOrderID uint64 config *Config executing true while ExecuteGroup is inside its pool swap ordersByGroup GroupOrderKey -> orderID, active orders only pendingExecutionFees tokenPath -> int64, fees not yet sent to protocol_fee executionLogs ExecutionLogKey -> lastRound uint64, unreleased logs of active orders orderAmountsByGroup GroupOrderAmountKey -> endRound, orders by executionFeeRate, then amountPerExecution tokenMinAmountsPerExecution tokenPath -> int64, per-token minimum input per execution pairPriceLimits PairKey -> *PairPriceLimit, minimum pool output per input of a pair direction
Value
<gnolang.StringValue>
StoreKeyTokenMinAmountsPerExecution
dca.StoreKeyStore layout. Tree keys are built by the pdca key helpers. orders OrderKey -> *Order ordersByOwner OwnerOrderKey -> orderID groups groupID -> *Group scheduledGroups ScheduleKey -> groupID, groups with orderAmount > 0 only nextOrderID uint64 config *Config executing true while ExecuteGroup is inside its pool swap ordersByGroup GroupOrderKey -> orderID, active orders only pendingExecutionFees tokenPath -> int64, fees not yet sent to protocol_fee executionLogs ExecutionLogKey -> lastRound uint64, unreleased logs of active orders orderAmountsByGroup GroupOrderAmountKey -> endRound, orders by executionFeeRate, then amountPerExecution tokenMinAmountsPerExecution tokenPath -> int64, per-token minimum input per execution pairPriceLimits PairKey -> *PairPriceLimit, minimum pool output per input of a pair direction
Value
<gnolang.StringValue>
StoreKeyPairPriceLimits
dca.StoreKeyStore layout. Tree keys are built by the pdca key helpers. orders OrderKey -> *Order ordersByOwner OwnerOrderKey -> orderID groups groupID -> *Group scheduledGroups ScheduleKey -> groupID, groups with orderAmount > 0 only nextOrderID uint64 config *Config executing true while ExecuteGroup is inside its pool swap ordersByGroup GroupOrderKey -> orderID, active orders only pendingExecutionFees tokenPath -> int64, fees not yet sent to protocol_fee executionLogs ExecutionLogKey -> lastRound uint64, unreleased logs of active orders orderAmountsByGroup GroupOrderAmountKey -> endRound, orders by executionFeeRate, then amountPerExecution tokenMinAmountsPerExecution tokenPath -> int64, per-token minimum input per execution pairPriceLimits PairKey -> *PairPriceLimit, minimum pool output per input of a pair direction
Value
<gnolang.StringValue>
dcaOrderStore
typeValue
dca.dcaOrderStore
NewDCAOrderStore
func(kvStore v1.KVStore) v0.IDCAOrderStoreNewDCAOrderStore wraps the domain KV store.
- OID
- 08e7a5…954e:73
NewDCAOrderStore details
NewSwapCallback
func(int, rlm .uverse.realm, tokenIn string, zeroForOne bool, maxAmountIn int64) func(...)NewSwapCallback returns the callback of one round's pool.Swap. It pays the pool the round input, at most maxAmountIn of tokenIn, from the escrow. The callback is declared in this realm, so it transfers as the escrow itself: the escrow never grants an allowance for a swap. That makes the callback a payment capability, so it is guarded on creation and on use: - only the escrow's own current realm can create one, so only code the proxy hands its realm to (the active implementation) can; - only the pool can invoke it (cur.Previous()); the pool's swap lock admits no other swap while a round's swap runs; - it pays only while a round is executing, once, and only an exact-input delta of the sold token: positive input, no positive output, at most maxAmountIn. zeroForOne is the swap direction: it selects which pool delta is tokenIn.
- OID
- 08e7a5…954e:74
NewSwapCallback details
RegisterInitializer
func(initializer func(...))RegisterInitializer registers an implementation version. Each version calls it from init with a factory that receives the shared store. Only packages under this realm's path may register, and the first registration becomes active. A nil initializer is rejected here, instead of panicking later when the version is activated.
- OID
- 08e7a5…954e:76
RegisterInitializer details
UpgradeImpl
func(packagePath string)UpgradeImpl activates a previously registered version by package path. Admin or governance only.
- OID
- 08e7a5…954e:78
UpgradeImpl details
GetImplementationPackagePath
func() stringGetImplementationPackagePath returns the active implementation path.
- OID
- 08e7a5…954e:79