├── .DS_Store ├── sources ├── .DS_Store ├── example.move ├── test.move ├── firoll.move └── game.move ├── tests └── firoll_tests.move ├── .gitignore ├── text ├── Move.lock ├── Move.toml ├── README.md └── note.txt /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoctorNasa/sui_token/HEAD/.DS_Store -------------------------------------------------------------------------------- /sources/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoctorNasa/sui_token/HEAD/sources/.DS_Store -------------------------------------------------------------------------------- /tests/firoll_tests.move: -------------------------------------------------------------------------------- 1 | /* 2 | #[test_only] 3 | module firoll::firoll_tests { 4 | // uncomment this line to import the module 5 | // use firoll::firoll; 6 | 7 | const ENotImplemented: u64 = 0; 8 | 9 | #[test] 10 | fun test_firoll() { 11 | // pass 12 | } 13 | 14 | #[test, expected_failure(abort_code = ::firoll::firoll_tests::ENotImplemented)] 15 | fun test_firoll_fail() { 16 | abort ENotImplemented 17 | } 18 | } 19 | */ 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by hello 2 | 3 | ### Rust ### 4 | # Generated by Cargo 5 | # will have compiled files and executables 6 | debug/ 7 | target/ 8 | 9 | # Ignore specific file in the build directory 10 | build/output.json 11 | 12 | # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries 13 | # More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html 14 | Cargo.lock 15 | 16 | # These are backup files generated by rustfmt 17 | **/*.rs.bk 18 | 19 | # MSVC Windows builds of rustc generate these, which store debugging information 20 | *.pdb 21 | 22 | # Ignore IDE and editor specific files 23 | .vscode/ 24 | .idea/ 25 | *.sublime-workspace 26 | 27 | # End -------------------------------------------------------------------------------- /text: -------------------------------------------------------------------------------- 1 | sui client call --package \ 2 | --module \ 3 | --function \ 4 | --args "" \ 5 | --gas-budget 6 | 7 | ==== 8 | sui client call --package 0x369a5f1412b8318a9d19f9907cb8f7eb70f78a30bbd88052caafab94371e521d \ 9 | --module firoll \ 10 | --function mint \ 11 | --args 0xf91ff19530f8b905775553e2337a76d39774e27cc0ce100c9faeb87d3c10691c 100000000000 \ 12 | --gas-budget 50000000 13 | 14 | ==== 15 | sui client call --package 0x369a5f1412b8318a9d19f9907cb8f7eb70f78a30bbd88052caafab94371e521d \ 16 | --module firoll \ 17 | --function mint \ 18 | --args "0xf91ff19530f8b905775553e2337a76d39774e27cc0ce100c9faeb87d3c10691c 100000000000 " \ 19 | --gas-budget 50000000 20 | -------------------------------------------------------------------------------- /Move.lock: -------------------------------------------------------------------------------- 1 | # @generated by Move, please check-in and do not edit manually. 2 | 3 | [move] 4 | version = 2 5 | manifest_digest = "D9A32F9649B5570B5EFA419F669A6F7B39AFB323B9E3ECBFED5D03D1A33F70A8" 6 | deps_digest = "F8BBB0CCB2491CA29A3DF03D6F92277A4F3574266507ACD77214D37ECA3F3082" 7 | dependencies = [ 8 | { name = "Sui" }, 9 | ] 10 | 11 | [[move.package]] 12 | name = "MoveStdlib" 13 | source = { git = "https://github.com/MystenLabs/sui.git", rev = "framework/testnet", subdir = "crates/sui-framework/packages/move-stdlib" } 14 | 15 | [[move.package]] 16 | name = "Sui" 17 | source = { git = "https://github.com/MystenLabs/sui.git", rev = "framework/testnet", subdir = "crates/sui-framework/packages/sui-framework" } 18 | 19 | dependencies = [ 20 | { name = "MoveStdlib" }, 21 | ] 22 | 23 | [move.toolchain-version] 24 | compiler-version = "1.25.0" 25 | edition = "2024.beta" 26 | flavor = "sui" 27 | 28 | [env] 29 | 30 | [env.devnet] 31 | chain-id = "d29677eb" 32 | original-published-id = "0x86f99337e5174c305760057734136a1e8cac71c03301c3fba6a144af98529b32" 33 | latest-published-id = "0x86f99337e5174c305760057734136a1e8cac71c03301c3fba6a144af98529b32" 34 | published-version = "1" 35 | -------------------------------------------------------------------------------- /Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "firoll" 3 | edition = "2024.beta" 4 | # license = "" # e.g., "MIT", "GPL", "Apache 2.0" 5 | # authors = ["..."] # e.g., ["Joe Smith (joesmith@noemail.com)", "John Snow (johnsnow@noemail.com)"] 6 | 7 | [dependencies] 8 | Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "framework/testnet" } 9 | 10 | # For remote import, use the `{ git = "...", subdir = "...", rev = "..." }`. 11 | # Revision can be a branch, a tag, and a commit hash. 12 | # MyRemotePackage = { git = "https://some.remote/host.git", subdir = "remote/path", rev = "main" } 13 | 14 | # For local dependencies use `local = path`. Path is relative to the package root 15 | # Local = { local = "../path/to" } 16 | 17 | # To resolve a version conflict and force a specific version for dependency 18 | # override use `override = true` 19 | # Override = { local = "../conflicting/version", override = true } 20 | 21 | [addresses] 22 | firoll = "0x0" 23 | 24 | # Named addresses will be accessible in Move as `@name`. They're also exported: 25 | # for example, `std = "0x1"` is exported by the Standard Library. 26 | # alice = "0xA11CE" 27 | 28 | [dev-dependencies] 29 | # The dev-dependencies section allows overriding dependencies for `--test` and 30 | # `--dev` modes. You can introduce test-only dependencies here. 31 | # Local = { local = "../path/to/dev-build" } 32 | 33 | [dev-addresses] 34 | # The dev-addresses section allows overwriting named addresses for the `--test` 35 | # and `--dev` modes. 36 | # alice = "0xB0B" 37 | 38 | -------------------------------------------------------------------------------- /sources/example.move: -------------------------------------------------------------------------------- 1 | // module artfi::artfi { 2 | 3 | // use std::option; 4 | // use sui::coin; // https://github.com/MystenLabs/sui/blob/main/crates/sui-framework/docs/coin.md 5 | // use sui::transfer; // https://github.com/MystenLabs/sui/blob/main/crates/sui-framework/docs/transfer.md 6 | // use sui::url::{Self, Url}; // https://github.com/MystenLabs/sui/blob/main/crates/sui-framework/docs/url.md 7 | // use sui::tx_context::{Self, TxContext}; // https://github.com/MystenLabs/sui/blob/main/crates/sui-framework/docs/tx_context.md 8 | 9 | // /// The type identifier of coin. The coin will have a type tag of kind: 10 | // /// `Coin` 11 | // struct ARTFI has drop {} 12 | 13 | 14 | // /// Module initializer is called once on module publish. A treasury cap is sent to the 15 | // /// publisher, who then controls minting and burning 16 | // fun init(witness: ARTFI, ctx: &mut TxContext) { 17 | // // Get a treasury cap for the coin and give it to the transaction sender 18 | // let (treasury_cap, metadata) = coin::create_currency( 19 | // witness, 9, 20 | // b"ARTFI", 21 | // b"ARTFI", 22 | // b"ARTFI is native coin of artfitoken.io", 23 | // /*icon_url=*/option::some(url::new_unsafe_from_bytes(b"https://arweave.net/dG1ec3skYBn7kZ1rWVmiC8QCotv4c7v2FlmQCw4DOgw")), 24 | // /*ctx=*/ctx); 25 | // transfer::public_freeze_object(metadata); 26 | // coin::mint_and_transfer(&mut treasury_cap, 1000000000000000000, tx_context::sender(ctx), ctx); 27 | // transfer::public_transfer(treasury_cap, tx_context::sender(ctx)); 28 | // } 29 | 30 | 31 | // #[test_only] 32 | // /// Wrapper of module initializer for testing 33 | // public fun test_init(ctx: &mut TxContext) { 34 | // init(ARTFI {}, ctx) 35 | // } 36 | // } -------------------------------------------------------------------------------- /sources/test.move: -------------------------------------------------------------------------------- 1 | // // forked from https://github.com/MystenLabs/sui/blob/main/sui_programmability/examples/move_tutorial/sources/my_module.move 2 | // Copyright (c) Mysten Labs, Inc. 3 | // SPDX-License-Identifier: Apache-2.0 4 | // module firoll::firoll { 5 | // // Part 1: imports 6 | // use sui::object::{Self, UID}; 7 | // use sui::transfer; 8 | // use sui::tx_context::{Self, TxContext}; 9 | 10 | // // Part 2: struct definitions 11 | // struct Sword has key, store { 12 | // id: UID, 13 | // magic: u64, 14 | // strength: u64, 15 | // } 16 | 17 | // struct fiRoll has key, store { 18 | // id: UID, 19 | // swords_created: u64, 20 | // } 21 | 22 | // // Part 3: module initializer to be executed when this module is published 23 | // fun init(ctx: &mut TxContext) { 24 | // let admin = firoll { 25 | // id: object::new(ctx), 26 | // swords_created: 0, 27 | // }; 28 | // // transfer the firoll object to the module/package publisher 29 | // transfer::transfer(admin, tx_context::sender(ctx)); 30 | // } 31 | 32 | // // Part 4: accessors required to read the struct attributes 33 | // public fun magic(self: &Sword): u64 { 34 | // self.magic 35 | // } 36 | 37 | // public fun strength(self: &Sword): u64 { 38 | // self.strength 39 | // } 40 | 41 | // public fun swords_created(self: &firoll): u64 { 42 | // self.swords_created 43 | // } 44 | 45 | // // part 5: public/entry functions (introduced later in the tutorial) 46 | // public entry fun sword_create(firoll: &mut firoll, magic: u64, strength: u64, recipient: address, ctx: &mut TxContext) { 47 | // // create a sword 48 | // let sword = Sword { 49 | // id: object::new(ctx), 50 | // magic: magic, 51 | // strength: strength, 52 | // }; 53 | // firoll.swords_created = firoll.swords_created + 1; 54 | // transfer::transfer(sword, recipient); 55 | // } -------------------------------------------------------------------------------- /sources/firoll.move: -------------------------------------------------------------------------------- 1 | module firoll::firoll { 2 | use std::option; 3 | use sui::coin::{Self, TreasuryCap, Coin, CoinMetadata}; 4 | use sui::transfer; 5 | use sui::tx_context::{Self, TxContext}; 6 | use sui::url; 7 | use sui::balance::{Self, Balance}; 8 | use sui::object; 9 | 10 | const IconUrl: vector = b"https://bafybeiecppfzpgx7xosf7h4a2zistip2d4lawqkwsp2dtp3ucmjpmnb6tq.ipfs.nftstorage.link/"; 11 | 12 | /// Shared object used to attach the lockers 13 | public struct Registry has key { 14 | id: UID, 15 | metadata: CoinMetadata 16 | } 17 | 18 | /// Marker struct for the FIROLL coin 19 | public struct FIROLL has drop {} 20 | 21 | /// Struct representing a lock with start and final dates and balances 22 | public struct Firoll has store { 23 | start_date: u64, 24 | final_date: u64, 25 | original_balance: u64, 26 | balance: Balance 27 | } 28 | 29 | /// Module initializer called once on module publish 30 | fun init(witness: FIROLL, ctx: &mut TxContext) { 31 | let ascii_url = std::ascii::string(IconUrl); 32 | let icon_url = url::new_unsafe(ascii_url); 33 | 34 | // Declare 'treasury' as mutable 35 | let (mut treasury, metadata) = coin::create_currency( 36 | witness, 9, b"PRO", b"FIROLL", b"FiRoll Coin for bet gaming protocol", option::some(icon_url), ctx 37 | ); 38 | transfer::public_freeze_object(metadata); 39 | coin::mint_and_transfer(&mut treasury, 1000000000000000000, tx_context::sender(ctx), ctx); 40 | 41 | // Send the treasury capability to the deployer 42 | transfer::public_transfer(treasury, tx_context::sender(ctx)); 43 | } 44 | 45 | /// Mint and transfer coins to a recipient 46 | public entry fun mint_and_transfer( 47 | treasury: &mut coin::TreasuryCap, amount: u64, recipient: address, ctx: &mut TxContext 48 | ) { 49 | coin::mint_and_transfer(treasury, amount, recipient, ctx); 50 | } 51 | 52 | /// Destroy the coin `c` and decrease the total supply in `cap` accordingly 53 | public entry fun burn( 54 | cap: &mut TreasuryCap, c: Coin, amount: u64, ctx: &mut TxContext 55 | ): u64 { 56 | let coin_balance_ref = sui::coin::balance(&c); 57 | let coin_balance = sui::balance::value(coin_balance_ref); 58 | assert!(coin_balance >= amount, 0); // Add a descriptive error message here 59 | coin::burn(cap, c) 60 | } 61 | 62 | /// Wrapper of module initializer for testing 63 | #[test_only] 64 | public fun test_init(ctx: &mut TxContext) { 65 | init(FIROLL {}, ctx) 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # Deploy Token on SUI Chain using Move 2024 3 | 4 | ## Could you please give me a Star! :star: :star: :star: THANK YOU SO MUCH 5 | 6 | ## Overview 7 | This README provides a guide on how to deploy a token on the Sui blockchain using the updated Move 2024 language features. 8 | 9 | ## Requirements 10 | - Sui client (Make sure it's the latest version to avoid compatibility issues) 11 | - Move 2024 compiler 12 | 13 | ## Step-by-Step Guide 14 | 15 | ### 1. Create a New Sui Wallet 16 | Create a new address that will act as your wallet on the Sui network. 17 | ```bash 18 | sui client new-address ed25519 19 | ``` 20 | 21 | ### 2. Create a New Move Package 22 | Initialize a new Move package to start your project. 23 | ```bash 24 | sui move new my_first_package 25 | ``` 26 | 27 | ### 3. Update Your Move.toml 28 | Ensure your `Move.toml` specifies the 2024 edition: 29 | ```toml 30 | edition = "2024.beta" 31 | ``` 32 | 33 | ### 4. Develop Your Token Contract 34 | Implement your token logic in Move. Below is a basic example of a token module using Move 2024 features: 35 | 36 | ```move 37 | module firoll::firoll { 38 | use std::option; 39 | use sui::coin; 40 | use sui::transfer; 41 | use sui::tx_context::{Self, TxContext}; 42 | 43 | public struct FIROLL has drop {} 44 | 45 | fun init(witness: FIROLL, ctx: &mut TxContext) { 46 | let (treasury, metadata) = coin::create_currency(witness, 9, b"PE", b"FIROLL", b"", option::none(), ctx); 47 | transfer::public_freeze_object(metadata); 48 | transfer::public_transfer(treasury, tx_context::sender(ctx)) 49 | } 50 | 51 | public entry fun mint( 52 | treasury: &mut coin::TreasuryCap, amount: u64, recipient: address, ctx: &mut TxContext 53 | ) { 54 | coin::mint_and_transfer(treasury, amount, recipient, ctx) 55 | } 56 | } 57 | ``` 58 | 59 | ### 5. Publish Your Package 60 | Publish your package to the Sui blockchain. 61 | ```bash 62 | sui client publish --gas-budget 100000000 --skip-dependency-verification 63 | ``` 64 | 65 | ### 6. Mint Tokens 66 | Execute the mint function to issue new tokens to a specified address. 67 | ```bash 68 | sui client call --package --module firoll --function mint --args 1000000 --gas-budget 300000000 69 | ``` 70 | 71 | ### 7. Handling Updates and Migrations 72 | To update your Move code or migrate to a newer version, use: 73 | ```bash 74 | sui move migrate 75 | ``` 76 | 77 | ## Troubleshooting 78 | - Ensure your client and server versions match. 79 | - Check for network protocol compatibility. 80 | 81 | For more detailed commands and outputs, refer to the Move documentation and Sui developer resources. 82 | ## Read more 83 | here: https://medium.com/@roongroj777/deploy-token-on-sui-move-2024-edition-1a51d2d71ebd 84 | 85 | ## Please Give Me a Star! :star: :star: :star: 86 | If you find this repository useful, please consider giving it a star on GitHub. Your support is a big thank you to me and motivates me to continue developing and sharing more great content! 87 | 88 | :star: Star us on GitHub — it helps! 89 | -------------------------------------------------------------------------------- /sources/game.move: -------------------------------------------------------------------------------- 1 | module game::betting { 2 | use std::option; 3 | use sui::coin::{Self, TreasuryCap, Coin, CoinMetadata}; 4 | use sui::transfer; 5 | use sui::tx_context::{Self, TxContext}; 6 | use sui::balance::{Self, Balance}; 7 | use sui::object; 8 | use sui::url; 9 | 10 | const IconUrl: vector = b"https://bafybeiecppfzpgx7xosf7h4a2zistip2d4lawqkwsp2dtp3ucmjpmnb6tq.ipfs.nftstorage.link/"; 11 | 12 | /// Shared object used to manage betting schedules 13 | public struct Registry has key { 14 | id: UID, 15 | metadata: CoinMetadata, 16 | schedules: vector, 17 | bets: vector 18 | } 19 | 20 | /// Struct representing a betting schedule 21 | public struct Schedule has store { 22 | id: u64, 23 | teamAId: u64, 24 | teamARate: u64, 25 | teamBId: u64, 26 | teamBRate: u64, 27 | status: bool, 28 | teamWin: u64 29 | } 30 | 31 | /// Struct representing a bet 32 | public struct Bet has store { 33 | id: u64, 34 | player: address, 35 | scheduleId: u64, 36 | teamId: u64, 37 | amount: u64, 38 | timestamp: u64, 39 | fulfill: bool 40 | } 41 | 42 | /// Create a new schedule 43 | public entry fun create_schedule( 44 | registry: &mut Registry, schedule_id: u64, teamAId: u64, teamARate: u64, teamBId: u64, teamBRate: u64, ctx: &mut TxContext 45 | ) { 46 | assert!(schedule_id > 0, 0); 47 | assert!(teamAId > 0, 0); 48 | assert!(teamARate > 0, 0); 49 | assert!(teamBId > 0, 0); 50 | assert!(teamBRate > 0, 0); 51 | 52 | let schedule = Schedule { 53 | id: schedule_id, 54 | teamAId, 55 | teamARate, 56 | teamBId, 57 | teamBRate, 58 | status: false, 59 | teamWin: 0 60 | }; 61 | 62 | vector::push_back(&mut registry.schedules, schedule); 63 | } 64 | 65 | /// Open a schedule 66 | public entry fun open_schedule(registry: &mut Registry, schedule_id: u64) { 67 | let mut schedule = vector::find_mut(&mut registry.schedules, |s| s.id == schedule_id).unwrap(); 68 | schedule.status = true; 69 | } 70 | 71 | /// Close a schedule and set the winning team 72 | public entry fun close_schedule(registry: &mut Registry, schedule_id: u64, teamWin: u64) { 73 | let mut schedule = vector::find_mut(&mut registry.schedules, |s| s.id == schedule_id).unwrap(); 74 | schedule.status = false; 75 | schedule.teamWin = teamWin; 76 | } 77 | 78 | /// Place a bet on a schedule 79 | public entry fun place_bet( 80 | registry: &mut Registry, bet_id: u64, schedule_id: u64, team_id: u64, amount: u64, player: address, ctx: &mut TxContext 81 | ) { 82 | let schedule = vector::find(®istry.schedules, |s| s.id == schedule_id).unwrap(); 83 | assert!(schedule.status, 0); 84 | 85 | let bet = Bet { 86 | id: bet_id, 87 | player, 88 | scheduleId: schedule_id, 89 | teamId: team_id, 90 | amount, 91 | timestamp: tx_context::timestamp(ctx), 92 | fulfill: false 93 | }; 94 | 95 | vector::push_back(&mut registry.bets, bet); 96 | coin::transfer(ctx, player, amount); 97 | } 98 | 99 | /// Collect the prize for a winning bet 100 | public entry fun collect_prize( 101 | registry: &mut Registry, bet_id: u64, schedule_id: u64, ctx: &mut TxContext 102 | ) { 103 | let schedule = vector::find(®istry.schedules, |s| s.id == schedule_id).unwrap(); 104 | assert!(!schedule.status, 0); 105 | 106 | let mut bet = vector::find_mut(&mut registry.bets, |b| b.id == bet_id).unwrap(); 107 | assert!(bet.player == tx_context::sender(ctx), 0); 108 | assert!(!bet.fulfill, 0); 109 | 110 | let rate = if bet.teamId == schedule.teamAId { 111 | schedule.teamARate 112 | } else { 113 | schedule.teamBRate 114 | }; 115 | 116 | assert!(rate > 0, 0); 117 | 118 | if bet.teamId == schedule.teamWin { 119 | let prize_amount = bet.amount * rate / 100; 120 | let total = bet.amount + prize_amount; 121 | coin::transfer(ctx, bet.player, total); 122 | bet.fulfill = true; 123 | } else { 124 | // Add appropriate handling for a losing bet 125 | } 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /note.txt: -------------------------------------------------------------------------------- 1 | Successfully verified dependencies on-chain against source. 2 | Transaction Digest: 986Jrt3hiQhwfwUeyQKPDEQSgH3MdLQW4QVWguXmPJbz 3 | ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ 4 | │ Transaction Data │ 5 | ├──────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ 6 | │ Sender: 0xf91ff19530f8b905775553e2337a76d39774e27cc0ce100c9faeb87d3c10691c │ 7 | │ Gas Owner: 0xf91ff19530f8b905775553e2337a76d39774e27cc0ce100c9faeb87d3c10691c │ 8 | │ Gas Budget: 100000000 MIST │ 9 | │ Gas Price: 1000 MIST │ 10 | │ Gas Payment: │ 11 | │ ┌── │ 12 | │ │ ID: 0x05757f75a14fa4c234f26808f2c214d62b439f35b65a2e3b719201fdc8c104a6 │ 13 | │ │ Version: 12 │ 14 | │ │ Digest: GgJmjr8ATT1UhBHAeSYxLiHL3MXaYh8Zyspvp5icBTbN │ 15 | │ └── │ 16 | │ │ 17 | │ Transaction Kind: Programmable │ 18 | │ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ 19 | │ │ Input Objects │ │ 20 | │ ├──────────────────────────────────────────────────────────────────────────────────────────────────────────┤ │ 21 | │ │ 0 Pure Arg: Type: address, Value: "0xf91ff19530f8b905775553e2337a76d39774e27cc0ce100c9faeb87d3c10691c" │ │ 22 | │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │ 23 | │ ╭─────────────────────────────────────────────────────────────────────────╮ │ 24 | │ │ Commands │ │ 25 | │ ├─────────────────────────────────────────────────────────────────────────┤ │ 26 | │ │ 0 Publish: │ │ 27 | │ │ ┌ │ │ 28 | │ │ │ Dependencies: │ │ 29 | │ │ │ 0x0000000000000000000000000000000000000000000000000000000000000001 │ │ 30 | │ │ │ 0x0000000000000000000000000000000000000000000000000000000000000002 │ │ 31 | │ │ └ │ │ 32 | │ │ │ │ 33 | │ │ 1 TransferObjects: │ │ 34 | │ │ ┌ │ │ 35 | │ │ │ Arguments: │ │ 36 | │ │ │ Result 0 │ │ 37 | │ │ │ Address: Input 0 │ │ 38 | │ │ └ │ │ 39 | │ ╰─────────────────────────────────────────────────────────────────────────╯ │ 40 | │ │ 41 | │ Signatures: │ 42 | │ eWWKwmxZ3SOCUz6Cz7SpbQO8glmyqSW/D9KwcwzEh7CaUpu6oDitOoMh2TOeQfnqxHllWdBdxVlcTsz7LDa0Bg== │ 43 | │ │ 44 | ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ 45 | ╭───────────────────────────────────────────────────────────────────────────────────────────────────╮ 46 | │ Transaction Effects │ 47 | ├───────────────────────────────────────────────────────────────────────────────────────────────────┤ 48 | │ Digest: 986Jrt3hiQhwfwUeyQKPDEQSgH3MdLQW4QVWguXmPJbz │ 49 | │ Status: Success │ 50 | │ Executed Epoch: 160 │ 51 | │ │ 52 | │ Created Objects: │ 53 | │ ┌── │ 54 | │ │ ID: 0x96826992047885dd868598ef56630c9bb7dd18bf9ebe0b7f0943af02d4bfac4e │ 55 | │ │ Owner: Account Address ( 0xf91ff19530f8b905775553e2337a76d39774e27cc0ce100c9faeb87d3c10691c ) │ 56 | │ │ Version: 13 │ 57 | │ │ Digest: HMwWttMC9Ha14KZmz7VBT1ARyTYfbEHWZ6iyxqF2MJ7a │ 58 | │ └── │ 59 | │ ┌── │ 60 | │ │ ID: 0x9aca28ac03bbd9715a42b6f94f12da8945567bae016f3c4adbe9719eae771a9c │ 61 | │ │ Owner: Account Address ( 0xf91ff19530f8b905775553e2337a76d39774e27cc0ce100c9faeb87d3c10691c ) │ 62 | │ │ Version: 13 │ 63 | │ │ Digest: 3aBMP5HY4XwzZ2zVaMukdhGH1pcicw3s427QdcVKd9fm │ 64 | │ └── │ 65 | │ ┌── │ 66 | │ │ ID: 0xb00dd0111d441b900ca6b8f52668e611c53e783da83423cd827abaa8ddb5c026 │ 67 | │ │ Owner: Immutable │ 68 | │ │ Version: 1 │ 69 | │ │ Digest: 5eNwgPxQs2KKmVKLp6wCFV4KELc4eLxth5PbFATT98Bi │ 70 | │ └── │ 71 | │ ┌── │ 72 | │ │ ID: 0xb7862ad1458c7e09432c524d7ade7535b9396ea598096cd80c97c6798285b5dd │ 73 | │ │ Owner: Account Address ( 0xf91ff19530f8b905775553e2337a76d39774e27cc0ce100c9faeb87d3c10691c ) │ 74 | │ │ Version: 13 │ 75 | │ │ Digest: 4Y6sqamEoM9kRkP3W9XZ62tDdbQHxnaFYUgfvCpALXRK │ 76 | │ └── │ 77 | │ ┌── │ 78 | │ │ ID: 0xfe98c80bebf013f9351e68fdbe80bd791362fb37558353b0407640c148391551 │ 79 | │ │ Owner: Immutable │ 80 | │ │ Version: 13 │ 81 | │ │ Digest: 2Bk1DRJVpinaAtYmtL9UEvDMZU9m5NH5ZLKD2tT3iyJt │ 82 | │ └── │ 83 | │ Mutated Objects: │ 84 | │ ┌── │ 85 | │ │ ID: 0x05757f75a14fa4c234f26808f2c214d62b439f35b65a2e3b719201fdc8c104a6 │ 86 | │ │ Owner: Account Address ( 0xf91ff19530f8b905775553e2337a76d39774e27cc0ce100c9faeb87d3c10691c ) │ 87 | │ │ Version: 13 │ 88 | │ │ Digest: GcrwPUCqVDvd9MUYh5ZW4mRZzaLnu9p5NHV9xsmLuxsg │ 89 | │ └── │ 90 | │ Gas Object: │ 91 | │ ┌── │ 92 | │ │ ID: 0x05757f75a14fa4c234f26808f2c214d62b439f35b65a2e3b719201fdc8c104a6 │ 93 | │ │ Owner: Account Address ( 0xf91ff19530f8b905775553e2337a76d39774e27cc0ce100c9faeb87d3c10691c ) │ 94 | │ │ Version: 13 │ 95 | │ │ Digest: GcrwPUCqVDvd9MUYh5ZW4mRZzaLnu9p5NHV9xsmLuxsg │ 96 | │ └── │ 97 | │ Gas Cost Summary: │ 98 | │ Storage Cost: 19281200 MIST │ 99 | │ Computation Cost: 1000000 MIST │ 100 | │ Storage Rebate: 978120 MIST │ 101 | │ Non-refundable Storage Fee: 9880 MIST │ 102 | │ │ 103 | │ Transaction Dependencies: │ 104 | │ 37dSNXvd6vZkxpdjRqo5m18bmdfBppCcrmu2cmtThMho │ 105 | │ 3AKSFMi8W8QxjztQL7W1iPQLwSb3CPNRwamVHvAWXit2 │ 106 | ╰───────────────────────────────────────────────────────────────────────────────────────────────────╯ 107 | ╭─────────────────────────────╮ 108 | │ No transaction block events │ 109 | ╰─────────────────────────────╯ 110 | 111 | ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ 112 | │ Object Changes │ 113 | ├─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ 114 | │ Created Objects: │ 115 | │ ┌── │ 116 | │ │ ObjectID: 0x96826992047885dd868598ef56630c9bb7dd18bf9ebe0b7f0943af02d4bfac4e │ 117 | │ │ Sender: 0xf91ff19530f8b905775553e2337a76d39774e27cc0ce100c9faeb87d3c10691c │ 118 | │ │ Owner: Account Address ( 0xf91ff19530f8b905775553e2337a76d39774e27cc0ce100c9faeb87d3c10691c ) │ 119 | │ │ ObjectType: 0x2::package::UpgradeCap │ 120 | │ │ Version: 13 │ 121 | │ │ Digest: HMwWttMC9Ha14KZmz7VBT1ARyTYfbEHWZ6iyxqF2MJ7a │ 122 | │ └── │ 123 | │ ┌── │ 124 | │ │ ObjectID: 0x9aca28ac03bbd9715a42b6f94f12da8945567bae016f3c4adbe9719eae771a9c │ 125 | │ │ Sender: 0xf91ff19530f8b905775553e2337a76d39774e27cc0ce100c9faeb87d3c10691c │ 126 | │ │ Owner: Account Address ( 0xf91ff19530f8b905775553e2337a76d39774e27cc0ce100c9faeb87d3c10691c ) │ 127 | │ │ ObjectType: 0x2::coin::Coin<0xb00dd0111d441b900ca6b8f52668e611c53e783da83423cd827abaa8ddb5c026::firoll::FIROLL> │ 128 | │ │ Version: 13 │ 129 | │ │ Digest: 3aBMP5HY4XwzZ2zVaMukdhGH1pcicw3s427QdcVKd9fm │ 130 | │ └── │ 131 | │ ┌── │ 132 | │ │ ObjectID: 0xb7862ad1458c7e09432c524d7ade7535b9396ea598096cd80c97c6798285b5dd │ 133 | │ │ Sender: 0xf91ff19530f8b905775553e2337a76d39774e27cc0ce100c9faeb87d3c10691c │ 134 | │ │ Owner: Account Address ( 0xf91ff19530f8b905775553e2337a76d39774e27cc0ce100c9faeb87d3c10691c ) │ 135 | │ │ ObjectType: 0x2::coin::TreasuryCap<0xb00dd0111d441b900ca6b8f52668e611c53e783da83423cd827abaa8ddb5c026::firoll::FIROLL> │ 136 | │ │ Version: 13 │ 137 | │ │ Digest: 4Y6sqamEoM9kRkP3W9XZ62tDdbQHxnaFYUgfvCpALXRK │ 138 | │ └── │ 139 | │ ┌── │ 140 | │ │ ObjectID: 0xfe98c80bebf013f9351e68fdbe80bd791362fb37558353b0407640c148391551 │ 141 | │ │ Sender: 0xf91ff19530f8b905775553e2337a76d39774e27cc0ce100c9faeb87d3c10691c │ 142 | │ │ Owner: Immutable │ 143 | │ │ ObjectType: 0x2::coin::CoinMetadata<0xb00dd0111d441b900ca6b8f52668e611c53e783da83423cd827abaa8ddb5c026::firoll::FIROLL> │ 144 | │ │ Version: 13 │ 145 | │ │ Digest: 2Bk1DRJVpinaAtYmtL9UEvDMZU9m5NH5ZLKD2tT3iyJt │ 146 | │ └── │ 147 | │ Mutated Objects: │ 148 | │ ┌── │ 149 | │ │ ObjectID: 0x05757f75a14fa4c234f26808f2c214d62b439f35b65a2e3b719201fdc8c104a6 │ 150 | │ │ Sender: 0xf91ff19530f8b905775553e2337a76d39774e27cc0ce100c9faeb87d3c10691c │ 151 | │ │ Owner: Account Address ( 0xf91ff19530f8b905775553e2337a76d39774e27cc0ce100c9faeb87d3c10691c ) │ 152 | │ │ ObjectType: 0x2::coin::Coin<0x2::sui::SUI> │ 153 | │ │ Version: 13 │ 154 | │ │ Digest: GcrwPUCqVDvd9MUYh5ZW4mRZzaLnu9p5NHV9xsmLuxsg │ 155 | │ └── │ 156 | │ Published Objects: │ 157 | │ ┌── │ 158 | │ │ PackageID: 0xb00dd0111d441b900ca6b8f52668e611c53e783da83423cd827abaa8ddb5c026 │ 159 | │ │ Version: 1 │ 160 | │ │ Digest: 5eNwgPxQs2KKmVKLp6wCFV4KELc4eLxth5PbFATT98Bi │ 161 | │ │ Modules: firoll │ 162 | │ └── │ 163 | ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ 164 | ╭───────────────────────────────────────────────────────────────────────────────────────────────────╮ 165 | │ Balance Changes │ 166 | ├───────────────────────────────────────────────────────────────────────────────────────────────────┤ 167 | │ ┌── │ 168 | │ │ Owner: Account Address ( 0xf91ff19530f8b905775553e2337a76d39774e27cc0ce100c9faeb87d3c10691c ) │ 169 | │ │ CoinType: 0x2::sui::SUI │ 170 | │ │ Amount: -19303080 │ 171 | │ └── │ 172 | │ ┌── │ 173 | │ │ Owner: Account Address ( 0xf91ff19530f8b905775553e2337a76d39774e27cc0ce100c9faeb87d3c10691c ) │ 174 | │ │ CoinType: 0xb00dd0111d441b900ca6b8f52668e611c53e783da83423cd827abaa8ddb5c026::firoll::FIROLL │ 175 | │ │ Amount: 1000000000000000000 │ 176 | │ └── │ 177 | ╰───────────────────────────────────────────────────────────────────────────────────────────────────╯ 178 | ❯ sui --move-call sui::coin::destroy_zero coins.0 179 | --move-call PACKAGE_ADDR::MODULE::FUNCTION "" FUNC_ARG1 FUNC_ARG2 ... 180 | 181 | sui client call --package $PACKAGE_ID --module "firoll" 182 | --function "burn" --args $TREASURY_CAP_OBJECT_ID $COIN_OBJECT_ID --gas-budget 50000000 183 | # burn all 184 | sui client call --package 0xb00dd0111d441b900ca6b8f52668e611c53e783da83423cd827abaa8ddb5c026 --module "firoll" --function "burn" --args 0xb7862ad1458c7e09432c524d7ade7535b9396ea598096cd80c97c6798285b5dd 0x9aca28ac03bbd9715a42b6f94f12da8945567bae016f3c4adbe9719eae771a9c --gas-budget 50000000 185 | 186 | sui client ptb \ 187 | --move-call 0xb00dd0111d441b900ca6b8f52668e611c53e783da83423cd827abaa8ddb5c026::firoll::burn \ 188 | --args 0x2::coin::TreasuryCap0xb00dd0111d441b900ca6b8f52668e611c53e783da83423cd827abaa8ddb5c026::firoll::FIROLL \ 189 | --gas-budget 20000000 190 | 191 | 192 | sui client ptb \ 193 | --move-call 0xb00dd0111d441b900ca6b8f52668e611c53e783da83423cd827abaa8ddb5c026::firoll::burn "111111" FIROLL \ 194 | --gas-budget 50000000 195 | 196 | sui client call --package 0x86f99337e5174c305760057734136a1e8cac71c03301c3fba6a144af98529b32 \ 197 | --module firoll \ 198 | --function burn \ 199 | --args 0xd470aab282f15ee36f3e83eeca7291034cea2f5e401ddf824d938a8c63954648 \ 200 | 0x16ea148e1f0e530de36ed9f689cf2bffb1d5745ae4f9fb961b2381f198419b15 \ 201 | 100000000000000000 \ 202 | --gas-budget 1000000 203 | 204 | --------------------------------------------------------------------------------