BUK Treasury

BUK Treasury Contract

The Treasury contract is a Solidity smart contract designed for managing the fund for Buk protocol and other marketplace contracts. This contract controls all kinds of money (cryptocurrency) transactions.


The contract is designed with the following key components:

  • BUK Protocol: Address of the BUK Protocol contract.

  • Roles: Constants for roles like ADMIN and BUK_PROTOCOL.

  • Stable: Stable coin transactions


  • Withdraw stable: Use to withdraw money to specified account

  • Refund stable and other : Use to refund money related to bookings

  • Role-based Access: Different functionalities accessible by admin, BUK Protocol, and NFT owners.

  • Stable Token Transactions: Uses a stable token for transactions in the marketplace.


Public and External Functions:

  • pause: To pause contract, only admin.

  • unpause: To pause contract, only admin.

  • setStableToken: To set stable token.

  • setBukProtocol: Set a new BUK Protocol address.

  • withdrawStableToken: To withdraw stable tokens to specified account, Only admin.

  • withdrawOtherToken: To withdraw other tokens to specified account, Only admin.

  • stableRefund: To refund stable tokens to specified account, only Buk protocol can call this.

  • otherRefund: To refund other tokens to specified account, only Buk protocol can call this.

  • getStableToken: Get the address of the stable token.

Private Functions:

  • \_setStableToken: Set a new stable token address.


  • SetStableToken: Emitted when a new stable token address is set.

  • BukProtocolSet: Emitted when a new BUK Protocol address is set.

  • WithdrawnToken: Emitted when a withdrawn token.

  • Refund: Emitted when a token refunded.

Interface: ITreasury

The ITreasury interface provides a blueprint for the main Treasury contract. It defines the essential functions, events, and data structures that the main contract should implement.

Key Components:

  • Events: Various events like SetStableToken, BukProtocolSet, WithdrawnToken, Refundetc.

  • Functions: Functions like stableRefund, otherRefund, getStableToken, etc.


This project is licensed under the MIT License.

Last updated