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"
errImplNotInitialized
untyped stringValue
"implementation is not initialized"
errInvalidImpl
untyped stringValue
"impl is not an ILimitOrder"
errInvalidDomainStore
untyped stringValue
"domainStore is not an ILimitOrderStore"
errNilConfig
untyped stringValue
"config is nil"
errImplDoesNotSupportTargetedCleanup
untyped stringValue
"implementation does not support targeted expired-order cleanup"
errImplDoesNotSupportFeeCollection
untyped stringValue
"implementation does not support pending execution fee collection"
errInvalidSwapCallback
untyped stringValue
"invalid swap callback"
errNilValue
untyped stringValue
"%s is nil"
errInvalidConfigType
untyped stringValue
"failed to cast config: %T"
GetConfig
func() *v0.ConfigGetConfig returns a detached copy of the current global configuration. Returns: - \*plimit.Config: copy of the stored configuration
- OID
- 0a3476…6398:3
GetConfig details
GetExecutionFeeRate
func() int64GetExecutionFeeRate returns the execution fee rate snapshotted into new orders. Returns: - int64: execution fee rate, in basis points of gross output
- OID
- 0a3476…6398:5
GetExecutionFeeRate details
GetMaxSlippageBps
func() int64GetMaxSlippageBps returns the slippage cap for new orders. Returns: - int64: maximum slippage, in basis points
- OID
- 0a3476…6398:6
GetMaxSlippageBps details
GetMinMakingAmount
func() int64GetMinMakingAmount returns the minimum input amount for new orders. Returns: - int64: minimum makingAmount, in raw token units
- OID
- 0a3476…6398:7
GetMinMakingAmount details
GetOrderDeadlines
func() (int64, int64)GetOrderDeadlines returns the allowed order duration range for new orders. Returns: - int64: shortest allowed expiresAt - createdAt, in seconds - int64: longest allowed expiresAt - createdAt, in seconds
- OID
- 0a3476…6398:8
GetOrderDeadlines details
GetMaxCleanupBatchSize
func() int64GetMaxCleanupBatchSize returns the most orders one CleanupExpiredOrders call examines. Returns: - int64: maximum cleanup batch size
- OID
- 0a3476…6398:9
GetMaxCleanupBatchSize details
GetNextOrderID
func() uint64GetNextOrderID returns the ID the next created order receives. Returns: - uint64: next order ID
- OID
- 0a3476…6398:10
GetNextOrderID details
ExistsOrder
func(orderID uint64) boolExistsOrder reports whether an order is pending. Settled orders are deleted. Parameters: - orderID: order to look up Returns: - bool: true while the order is pending
- OID
- 0a3476…6398:11
ExistsOrder details
GetOrder
func(orderID uint64) *v0.OrderGetOrder returns a detached pending order, or nil after it is settled. Parameters: - orderID: order to look up Returns: - \*plimit.Order: copy of the order; nil when it is not pending
- OID
- 0a3476…6398:12
GetOrder details
GetOrders
func() *v0.ReadOnlyTreeGetOrders returns a live read-only view of pending orders. Returns: - \*rotree.ReadOnlyTree: plimit.OrderKey(orderID) -> \*plimit.Order; each order read from the view is detached from stored state
- OID
- 0a3476…6398:13
GetOrders details
GetOrdersByOwner
func() *v0.ReadOnlyTreeGetOrdersByOwner returns the read-only owner index of pending orders. Iterate the \[plimit.OwnerOrderPrefix(owner), plimit.PrefixEnd(prefix)) range for one owner's orders in ID order, choosing the page size. Returns: - \*rotree.ReadOnlyTree: plimit.OwnerOrderKey(owner, orderID) -> uint64 orderID
- OID
- 0a3476…6398:14
GetOrdersByOwner details
GetPendingExecutionFeeAmount
func(tokenPath string) int64GetPendingExecutionFeeAmount returns execution fees held for tokenPath until the protocol fee realm accepts them. A later fill with the same output token retries collection. Parameters: - tokenPath: fee token path Returns: - int64: pending execution fee, in raw token units
- OID
- 0a3476…6398:15
GetPendingExecutionFeeAmount details
GetPendingExecutionFees
func() *v0.ReadOnlyTreeGetPendingExecutionFees returns the read-only index of pending execution fees. Returns: - \*rotree.ReadOnlyTree: tokenPath -> int64 pending amount
- OID
- 0a3476…6398:16
GetPendingExecutionFees details
expiredOrderCleanup
typeValue
limit.expiredOrderCleanup
pendingExecutionFeeCollector
typeValue
limit.pendingExecutionFeeCollector
CreateOrder
func(tokenIn string, tokenOut string, makingAmount int64, takingAmount int64, slippageBps int64, expiresAt int64, baseToken string) uint64CreateOrder escrows makingAmount of tokenIn for takingAmount of tokenOut. Each fill supplies its pool fee tier and price limit. slippageBps=0 enforces the making/taking ratio or better. expiresAt must be positive and within the configured duration bounds. The execution fee rate is snapshotted into each new order. baseToken must be tokenIn (Sell) or tokenOut (Buy); it is emitted only as creation metadata and does not affect the order's execution terms. The caller must first approve Address() for makingAmount. Reverts while execution is halted for Limit orders.
- OID
- 0a3476…6398:17
CreateOrder details
CancelOrder
func(orderID uint64) int64CancelOrder refunds the remaining input and removes the order from the indexes. A past-deadline refund uses the expired event. It returns the refunded input. Owner only. Reverts while withdrawals are halted for limit orders.
- OID
- 0a3476…6398:19
CancelOrder details
ExecuteOrder
func(orderID uint64, maxAmountIn int64, poolFee uint32, sqrtPriceLimitX96 string) (int64, int64)ExecuteOrder fills up to maxAmountIn through the order's token pair at poolFee. A nonzero sqrtPriceLimitX96 stops at that pool price and may leave input unspent in escrow. Zero requires maxAmountIn to be consumed in full. The order's minimum owner-net output is enforced on the actual input. Returns actual input and pool output before the order's execution fee; the owner is paid immediately after that fee is deducted. The immediate caller must be authorized for ExecuteOrder by the shared keeper policy. Reverts while execution or withdrawals are halted for limit orders.
- OID
- 0a3476…6398:20
ExecuteOrder details
CollectPendingExecutionFee
func(tokenPath string) (int64, int64)CollectPendingExecutionFee forwards fees pending for tokenPath to the protocol fee realm without another fill. Anyone may call it; the caller receives nothing. Returns the amount forwarded and the amount left pending. Reverts while withdrawals are halted for Limit orders.
- OID
- 0a3476…6398:21
CollectPendingExecutionFee details
CleanupExpiredOrders
func(startAfterOrderID uint64, maxOrders int) (int, uint64)CleanupExpiredOrders refunds pending orders after their deadline. Anyone may call it. One call examines at most min(maxOrders, maxCleanupBatchSize) orders after startAfterOrderID, in ID order. It returns the number of orders expired and the cursor for the next call; repeat until the cursor is 0. Reverts while withdrawals are halted for limit orders.
- OID
- 0a3476…6398:22
CleanupExpiredOrders details
CleanupExpiredOrdersByIDs
func(orderIDs string) (int, string)CleanupExpiredOrdersByIDs refunds only the named expired orders. orderIDs is a strictly increasing comma-separated list of positive decimal order IDs. Existing unexpired or underfunded orders are returned for retry. Reverts while withdrawals are halted for limit orders.
- OID
- 0a3476…6398:23
CleanupExpiredOrdersByIDs details
SetExecutionFeeRate
func(executionFeeRate int64)SetExecutionFeeRate sets the execution fee rate snapshotted into new orders, in basis points of gross output. Admin or governance only.
- OID
- 0a3476…6398:24
SetExecutionFeeRate details
SetMinMakingAmount
func(minMakingAmount int64)SetMinMakingAmount sets the minimum input amount for new orders, in raw token units. Existing orders are unaffected. Admin or governance only.
- OID
- 0a3476…6398:25
SetMinMakingAmount details
SetOrderDeadlines
func(minDuration int64, maxDuration int64)SetOrderDeadlines sets the allowed order duration range for new orders, in seconds. Admin or governance only.
- OID
- 0a3476…6398:26
SetOrderDeadlines details
SetMaxCleanupBatchSize
func(maxCleanupBatchSize int64)SetMaxCleanupBatchSize caps the orders one CleanupExpiredOrders call examines, bounding its gas. Admin or governance only.
- OID
- 0a3476…6398:27
SetMaxCleanupBatchSize details
SetMaxSlippageBps
func(maxSlippageBps int64)SetMaxSlippageBps sets the slippage cap for new orders in \[0, 10000] bps. Existing orders keep their slippage. Admin or governance only.
- OID
- 0a3476…6398:28
SetMaxSlippageBps details
currentAddress
.uverse.addressValue
<gnolang.StringValue>
kvStore
*v1.kvStore- OID
- 0a3476…6398:50
kvStore details
versionManager
*v1.versionManager- OID
- 0a3476…6398:54
versionManager details
implementation
*v0.limitOrderImpl- OID
- 02abcb…6ef9:45
implementation details
init.41
func()- OID
- 0a3476…6398:33
init.41 details
initializeDomainStore
func(int, .uverse.realm, kvStore v1.KVStore) interface{...}- OID
- 0a3476…6398:35
initializeDomainStore details
Address
func() .uverse.address- OID
- 0a3476…6398:36
Address details
getImplementation
func() v0.ILimitOrder- OID
- 0a3476…6398:37
getImplementation details
updateImplementation
func() .uverse.error- OID
- 0a3476…6398:38
updateImplementation details
NewBPTreeN
func(fanout int) *v0.BPTreeNewBPTreeN allocates an empty B+tree in the order/limit realm. Implementations create the store trees through it, so the trees are owned by the realm that stores them.
- OID
- 0a3476…6398:39
NewBPTreeN details
StoreKey
typeStoreKey is a key of the limit order KV store.
Value
limit.StoreKey
StoreKeyOrders
limit.StoreKeyStore layout. Tree keys are built by the plimit key helpers. orders OrderKey -> *Order, pending orders only ordersByOwner OwnerOrderKey -> orderID, pending orders only pendingExecutionFees tokenPath -> int64, held until the protocol fee collector accepts them nextOrderID uint64 config *Config
Value
<gnolang.StringValue>
StoreKeyOrdersByOwner
limit.StoreKeyStore layout. Tree keys are built by the plimit key helpers. orders OrderKey -> *Order, pending orders only ordersByOwner OwnerOrderKey -> orderID, pending orders only pendingExecutionFees tokenPath -> int64, held until the protocol fee collector accepts them nextOrderID uint64 config *Config
Value
<gnolang.StringValue>
StoreKeyPendingExecutionFees
limit.StoreKeyStore layout. Tree keys are built by the plimit key helpers. orders OrderKey -> *Order, pending orders only ordersByOwner OwnerOrderKey -> orderID, pending orders only pendingExecutionFees tokenPath -> int64, held until the protocol fee collector accepts them nextOrderID uint64 config *Config
Value
<gnolang.StringValue>
StoreKeyNextOrderID
limit.StoreKeyStore layout. Tree keys are built by the plimit key helpers. orders OrderKey -> *Order, pending orders only ordersByOwner OwnerOrderKey -> orderID, pending orders only pendingExecutionFees tokenPath -> int64, held until the protocol fee collector accepts them nextOrderID uint64 config *Config
Value
<gnolang.StringValue>
StoreKeyConfig
limit.StoreKeyStore layout. Tree keys are built by the plimit key helpers. orders OrderKey -> *Order, pending orders only ordersByOwner OwnerOrderKey -> orderID, pending orders only pendingExecutionFees tokenPath -> int64, held until the protocol fee collector accepts them nextOrderID uint64 config *Config
Value
<gnolang.StringValue>
limitOrderStore
typeValue
limit.limitOrderStore
NewLimitOrderStore
func(kvStore v1.KVStore) v0.ILimitOrderStoreNewLimitOrderStore wraps the domain KV store.
- OID
- 0a3476…6398:41
NewLimitOrderStore details
NewSwapCallback
func(int, rlm .uverse.realm, tokenIn string, zeroForOne bool, maxAmountIn int64) func(...)NewSwapCallback binds payment to this proxy's custody, the order's input token and its input budget. Only code already executing in the proxy's current realm context can create it. The closure is declared here so pool callbacks retain proxy custody rather than paying from an implementation realm.
- OID
- 0a3476…6398:42
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 before its version path is registered.
- OID
- 0a3476…6398:44
RegisterInitializer details
UpgradeImpl
func(packagePath string)UpgradeImpl activates a previously registered version by package path. Admin or governance only.
- OID
- 0a3476…6398:46
UpgradeImpl details
GetImplementationPackagePath
func() stringGetImplementationPackagePath returns the active implementation path.
- OID
- 0a3476…6398:47