Skip to content

feat: update ClearingQueue library #366

Description

@bekauz

Description

A few changes are needed to the clearing queue library (#357).

Obligation ordering

First, the library should enforce a strict ordering of the withdrawal obligations being registered based on the id field.

In addition to that, a new query should be exposed that returns the latest registered withdrawal obligation id.

Single denom

The clearing queue should operate in a single denom mode.
The denom should be configured during the instantiation.

As a result, the RegisterObligation function can be simplified:

    /// validates and enqueues a new withdrawal obligation
    RegisterObligation {
        /// where the payout is to be routed
        recipient: String,
        /// what is owed to the recipient
        payout_coins: Vec<Coin>, // this can become payout_amount: Uint128
        /// some unique identifier for the request
        id: Uint64,
    },

During the settlement requests, the library should construct the coin to be paid out by looking at a given obligation payout_amount and applying the configured denom to that amount.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions