af_faucet/
lib.rs

1#![cfg_attr(all(doc, not(doctest)), feature(doc_cfg))]
2
3//! Move types for `AftermathFaucet` used in development
4
5use af_sui_pkg_sdk::sui_pkg_sdk;
6use sui_framework_sdk::coin::TreasuryCap;
7use sui_framework_sdk::object::{ID, UID};
8
9sui_pkg_sdk!(faucet {
10    module faucet {
11        /* ================= Events ================= */
12        struct CreatedFaucet has copy, drop {
13            id: ID
14        }
15
16        struct AddedCoin<!phantom T> has copy, drop {
17            default_mint_amount: u64,
18        }
19
20        struct RemovedCoin<!phantom T> has copy, drop {}
21
22        struct SetDefaultMintAmount<!phantom T> has copy, drop {
23            default_mint_amount: u64,
24        }
25
26        struct MintedCoin<!phantom T> has copy, drop {
27            amount: u64,
28            user: address
29        }
30
31        struct BurnedCoin<!phantom T> has copy, drop {
32            amount: u64,
33            user: address
34        }
35
36        //**************************************************************************************************
37        // Faucet
38        //**************************************************************************************************
39
40        /// Type that marks the capability to:
41        ///   - Remove TreasuryCap's from the Faucet; only if needed if these TreasuryCaps
42        ///     need to be moved to a new Faucet address while Devnet remains live .
43        struct AdminCap has key { id: UID }
44
45        struct Faucet has key {
46            id: UID,
47        }
48
49        struct FaucetCoin<!phantom T> has store {
50            treasury_cap: TreasuryCap<T>,
51            default_mint_amount: u64
52        }
53    }
54});