Expand description

Escrow Pallet

The Escrow pallet provides functionality for multi admin accounts, with lockable funds, and options for open contribution to the locked funds.

Overview

The Escrow pallet provides functions for:

  • Creating an Escrow within an AccountId.
  • Assigning and Removing Admins that are allowed to manage the Escrow.
  • Contributing funds to the Escrow.
  • Distributing funds from the Escrow.
  • Enabling and Disabling Open (Non Admin) Contributions to the Locked Escrow Funds
  • Freezing and Thawing the Escrow.
  • Closing the Escrow, and proportionally disbursing the remaining funds back to contributors.

Interface

Dispatchable Functions

  • create_escrow - Creates an Escrow, tied to the calling AccountId.
  • fund_escrow - Transfers funds to the Escrow Account and Locks the transfered amount.
  • payout_escrow - Distributes funds from the otherwise locked Escrow funds in an Account.
  • close_escrow - Closes out an Escrow, by distributing all locked funds out to the contributors, proportionately to their contributions.
  • enable_open_contribution - Enables non admins to contribute to locked funds using the fund_escrow dispatchable.
  • disable_open_contribution - Prevents non admins from contributing to locked funds using the fund_escrow dispatchable.
  • freeze_escrow - Freezes an Escrow, preventing any distributions, contributions, or changes in configuration.
  • thaw_escrow - Removes a freeze from an Escrow, enabling distributions, contributions, and changes in configuration.
  • add_admin - Adds an admin to the Escrow’s admins.
  • remove_admin - Removes an admin from the Escrow’s admins.

Re-exports

pub use pallet::*;

Modules

The module that hosts all the FRAME types needed to add this pallet to a runtime.