Skip to content

Commit

Permalink
Merge branch 'main' into move_v2
Browse files Browse the repository at this point in the history
  • Loading branch information
steelgeek091 authored Mar 6, 2025
2 parents 94617ac + 0184cb4 commit eeae135
Show file tree
Hide file tree
Showing 188 changed files with 4,121 additions and 527 deletions.
2 changes: 1 addition & 1 deletion .github/actions/rust-setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ runs:
- run: sudo apt-get update && sudo apt-get install ca-certificates gcc libc6-dev build-essential libsqlite3-dev libprotobuf-dev protobuf-compiler wget cmake make clang g++ libsnappy-dev llvm libclang-dev curl git libpq-dev libssl-dev pkg-config lsof lld --no-install-recommends --assume-yes
shell: bash

- uses: dtolnay/rust-toolchain@1.78.0
- uses: dtolnay/rust-toolchain@1.82.0
with:
components: rustfmt, clippy
2 changes: 1 addition & 1 deletion .github/workflows/check_build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
with:
node-version: '20.3.1'
- name: Cache Node.js modules
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.pnpm-store
key: ${{ runner.OS }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
Expand Down
6 changes: 3 additions & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# ignore everything by default
/*
# /*
# Enable prettier for apps, dapps and sdk
!/infra/dashboard
!/sdk
!/infra/rooch-portal-v1
!/.config
!/*.js
!/docs/website

# ignore generated files
infra
.vscode
.next
node_modules
Expand All @@ -22,4 +22,4 @@ generated
generator
templates
third_party
examples
examples
59 changes: 31 additions & 28 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ tower_governor = { version = "0.4.3", features = ["tracing"] }
pin-project = "1.1.7"
mirai-annotations = "1.12.0"
lru = "0.11.0"
quick_cache = "0.6.9"
quick_cache = "0.6.11"
bs58 = "0.5.1"
dirs-next = "2.0.0"
anstream = { version = "0.3" }
Expand Down Expand Up @@ -345,7 +345,7 @@ revm-primitives = "4.0.0"
ord = "0.18.5"
sled = { version = "0.34.7" }
scopeguard = "1.1"
uuid = { version = "1.11.0", features = ["v4", "fast-rng"] }
uuid = { version = "1.15.1", features = ["v4", "fast-rng"] }
protobuf = { version = "2.28", features = ["with-bytes"] }
redb = { version = "2.1.1" }
rocksdb = { version = "0.23.0", features = ["lz4", "mt_static", "jemalloc"] }
Expand Down
4 changes: 3 additions & 1 deletion apps/minter_manager/Move.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ version = "0.0.1"
MoveStdlib = { local = "../../frameworks/move-stdlib" }
MoveosStdlib = { local = "../../frameworks/moveos-stdlib" }
RoochFramework = { local = "../../frameworks/rooch-framework" }
app_admin = { local = "../app_admin" }

[addresses]
std = "0x1"
moveos_std = "0x2"
rooch_framework = "0x3"
minter_manager = "_"
minter_manager = "_"
app_admin = "_"
Binary file added apps/minter_manager/released/1/package.rpd
Binary file not shown.
14 changes: 14 additions & 0 deletions apps/minter_manager/sources/MinterManager.move
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module minter_manager::minter_manager {
use moveos_std::object::{Self, Object, ObjectID};
use rooch_framework::coin::{Self, Coin, CoinInfo};
use rooch_framework::account_coin_store;
use app_admin::admin::AdminCap;


// =========================== Constants ==========================
Expand Down Expand Up @@ -119,6 +120,19 @@ module minter_manager::minter_manager {
event::emit(MinterCapIssued { recipient, minterCapId });
}

public entry fun issueMinterCapByAdminCap<CoinType: key + store>(
treasuryCapManagerObj: &mut Object<TreasuryCapManager<CoinType>>,
recipient: address,
_admin_cap: &mut Object<AdminCap>,
) {
let minterCapObj = object::new(MinterCap<CoinType> {
managerId: object::id(treasuryCapManagerObj),
});
let minterCapId = object::id(&minterCapObj);
object::transfer(minterCapObj, recipient);
event::emit(MinterCapIssued { recipient, minterCapId });
}

public entry fun revokeMinterCap<CoinType: key + store>(
coinAdmin: &signer,
treasuryCapManagerObj: &mut Object<TreasuryCapManager<CoinType>>,
Expand Down
23 changes: 23 additions & 0 deletions apps/minter_manager/sources/coins/usdt_f.move
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

module minter_manager::usdt_f {
use std::option::some;
use std::string;
use std::string::utf8;
use moveos_std::signer::module_signer;
use minter_manager::minter_manager::setupTreasuryCapManager;
use rooch_framework::coin;

struct USDT has key, store{}

const COIN_URL: vector<u8> = b"<svg id=\"Layer_1\" data-name=\"Layer 1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 339.43 295.27\"><title>tether-usdt-logo</title><path d=\"M62.15,1.45l-61.89,130a2.52,2.52,0,0,0,.54,2.94L167.95,294.56a2.55,2.55,0,0,0,3.53,0L338.63,134.4a2.52,2.52,0,0,0,.54-2.94l-61.89-130A2.5,2.5,0,0,0,275,0H64.45a2.5,2.5,0,0,0-2.3,1.45h0Z\" style=\"fill:#50af95;fill-rule:evenodd\"/><path d=\"M191.19,144.8v0c-1.2.09-7.4,0.46-21.23,0.46-11,0-18.81-.33-21.55-0.46v0c-42.51-1.87-74.24-9.27-74.24-18.13s31.73-16.25,74.24-18.15v28.91c2.78,0.2,10.74.67,21.74,0.67,13.2,0,19.81-.55,21-0.66v-28.9c42.42,1.89,74.08,9.29,74.08,18.13s-31.65,16.24-74.08,18.12h0Zm0-39.25V79.68h59.2V40.23H89.21V79.68H148.4v25.86c-48.11,2.21-84.29,11.74-84.29,23.16s36.18,20.94,84.29,23.16v82.9h42.78V151.83c48-2.21,84.12-11.73,84.12-23.14s-36.09-20.93-84.12-23.15h0Zm0,0h0Z\" style=\"fill:#fff;fill-rule:evenodd\"/></svg>";

fun init() {
let coin_info_obj = coin::register_extend<USDT>(
string::utf8(b"Free Bridged USDT"),
string::utf8(b"USDT.f"),
some(utf8(COIN_URL)),
6,
);
setupTreasuryCapManager(&module_signer<USDT>(), coin_info_obj)
}
}
4 changes: 2 additions & 2 deletions apps/minter_manager/test/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@


# Export your address here
export MINTER_MANAGER="0x0af854fcad035f4134636ff2d7fa22591f8ff2f264f354ac04e53da06e318529" # address #1
export PACKAGE_ADDRESS="0x701c21bf1c8cd5af8c42983890d8ca55e7a820171b8e744c13f2d9998bf76cc3"

# Deploy minter_manager package
cd minter_manager
rooch move publish --named-addresses minter_manager="$MINTER_MANAGER"
rooch move publish --named-addresses minter_manager="$PACKAGE_ADDRESS",app_admin="$PACKAGE_ADDRESS"
Loading

0 comments on commit eeae135

Please sign in to comment.