diff --git a/vm/compiler/src/lib.rs b/vm/compiler/src/lib.rs index 07fa870be8..39e5bdf1ce 100644 --- a/vm/compiler/src/lib.rs +++ b/vm/compiler/src/lib.rs @@ -50,10 +50,10 @@ pub mod shared { pub fn starcoin_framework_named_addresses() -> BTreeMap { let mapping = [ - // ("VMReserved", "0x0"), - // ("Genesis", "0x1"), - // ("StarcoinFramework", "0x1"), - // ("StarcoinAssociation", "0xA550C18"), + ("VMReserved", "0x0"), + ("Genesis", "0x1"), + ("StarcoinFramework", "0x1"), + ("StarcoinAssociation", "0xA550C18"), ("vm", "0x0"), ("vm_reserved", "0x0"), ("std", "0x1"), diff --git a/vm/framework/cached-packages/src/starcoin_framework_sdk_builder.rs b/vm/framework/cached-packages/src/starcoin_framework_sdk_builder.rs index d4ca5e2aca..0cc0595a14 100644 --- a/vm/framework/cached-packages/src/starcoin_framework_sdk_builder.rs +++ b/vm/framework/cached-packages/src/starcoin_framework_sdk_builder.rs @@ -191,6 +191,24 @@ pub enum EntryFunctionCall { proposal_id: u64, }, + /// Once the proposal is agreed, anyone can call the method to make the proposal happen. + DaoFeatuersProposalExecute { + proposal_adderss: AccountAddress, + proposal_id: u64, + }, + + DaoFeatuersProposalExecuteUrgent { + enable: Vec, + disable: Vec, + }, + + /// Entrypoint for the proposal. + DaoFeatuersProposalPropose { + enable: Vec, + disable: Vec, + exec_delay: u64, + }, + /// Once the proposal is agreed, anyone can call the method to make the proposal happen. DaoModifyConfigProposalExecute { token_t: TypeTag, @@ -645,6 +663,18 @@ impl EntryFunctionCall { proposer_address, proposal_id, } => dao_queue_proposal_action(token_t, action_t, proposer_address, proposal_id), + DaoFeatuersProposalExecute { + proposal_adderss, + proposal_id, + } => dao_featuers_proposal_execute(proposal_adderss, proposal_id), + DaoFeatuersProposalExecuteUrgent { enable, disable } => { + dao_featuers_proposal_execute_urgent(enable, disable) + } + DaoFeatuersProposalPropose { + enable, + disable, + exec_delay, + } => dao_featuers_proposal_propose(enable, disable, exec_delay), DaoModifyConfigProposalExecute { token_t, proposer_address, @@ -1331,6 +1361,64 @@ pub fn dao_queue_proposal_action( )) } +/// Once the proposal is agreed, anyone can call the method to make the proposal happen. +pub fn dao_featuers_proposal_execute( + proposal_adderss: AccountAddress, + proposal_id: u64, +) -> TransactionPayload { + TransactionPayload::EntryFunction(EntryFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("dao_featuers_proposal").to_owned(), + ), + ident_str!("execute").to_owned(), + vec![], + vec![ + bcs::to_bytes(&proposal_adderss).unwrap(), + bcs::to_bytes(&proposal_id).unwrap(), + ], + )) +} + +pub fn dao_featuers_proposal_execute_urgent( + enable: Vec, + disable: Vec, +) -> TransactionPayload { + TransactionPayload::EntryFunction(EntryFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("dao_featuers_proposal").to_owned(), + ), + ident_str!("execute_urgent").to_owned(), + vec![], + vec![ + bcs::to_bytes(&enable).unwrap(), + bcs::to_bytes(&disable).unwrap(), + ], + )) +} + +/// Entrypoint for the proposal. +pub fn dao_featuers_proposal_propose( + enable: Vec, + disable: Vec, + exec_delay: u64, +) -> TransactionPayload { + TransactionPayload::EntryFunction(EntryFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("dao_featuers_proposal").to_owned(), + ), + ident_str!("propose").to_owned(), + vec![], + vec![ + bcs::to_bytes(&enable).unwrap(), + bcs::to_bytes(&disable).unwrap(), + bcs::to_bytes(&exec_delay).unwrap(), + ], + )) +} + /// Once the proposal is agreed, anyone can call the method to make the proposal happen. pub fn dao_modify_config_proposal_execute( token_t: TypeTag, @@ -2515,6 +2603,46 @@ mod decoder { } } + pub fn dao_featuers_proposal_execute( + payload: &TransactionPayload, + ) -> Option { + if let TransactionPayload::EntryFunction(script) = payload { + Some(EntryFunctionCall::DaoFeatuersProposalExecute { + proposal_adderss: bcs::from_bytes(script.args().get(0)?).ok()?, + proposal_id: bcs::from_bytes(script.args().get(1)?).ok()?, + }) + } else { + None + } + } + + pub fn dao_featuers_proposal_execute_urgent( + payload: &TransactionPayload, + ) -> Option { + if let TransactionPayload::EntryFunction(script) = payload { + Some(EntryFunctionCall::DaoFeatuersProposalExecuteUrgent { + enable: bcs::from_bytes(script.args().get(0)?).ok()?, + disable: bcs::from_bytes(script.args().get(1)?).ok()?, + }) + } else { + None + } + } + + pub fn dao_featuers_proposal_propose( + payload: &TransactionPayload, + ) -> Option { + if let TransactionPayload::EntryFunction(script) = payload { + Some(EntryFunctionCall::DaoFeatuersProposalPropose { + enable: bcs::from_bytes(script.args().get(0)?).ok()?, + disable: bcs::from_bytes(script.args().get(1)?).ok()?, + exec_delay: bcs::from_bytes(script.args().get(2)?).ok()?, + }) + } else { + None + } + } + pub fn dao_modify_config_proposal_execute( payload: &TransactionPayload, ) -> Option { @@ -3307,6 +3435,18 @@ static SCRIPT_FUNCTION_DECODER_MAP: once_cell::sync::Lazypublic entry fun initialize(framework: &signer, features: vector<u8>) +
public fun initialize(framework: &signer, features: vector<u8>)
 
@@ -943,7 +943,7 @@ Initialized from parameters Implementation -
public entry fun initialize(framework: &signer, features: vector<u8>) {
+
public fun initialize(framework: &signer, features: vector<u8>) {
     assert!(signer::address_of(framework) == @std, error::permission_denied(EFRAMEWORK_SIGNER_NEEDED));
     move_to<Features>(framework, Features { features })
 }
diff --git a/vm/framework/starcoin-framework/doc/dao.md b/vm/framework/starcoin-framework/doc/dao.md
index 845cd7fbd1..665cd9afec 100644
--- a/vm/framework/starcoin-framework/doc/dao.md
+++ b/vm/framework/starcoin-framework/doc/dao.md
@@ -671,7 +671,6 @@ propose a proposal.
     action_delay: u64,
 ) acquires DaoGlobalInfo {
     debug::print(&std::string::utf8(b"dao::proposal | Entered"));
-    debug::print(&signer::address_of(signer));
 
     if (action_delay == 0) {
         action_delay = min_action_delay<TokenT>();
@@ -683,7 +682,9 @@ propose a proposal.
     let start_time = timestamp::now_milliseconds() + voting_delay<TokenT>();
     let quorum_votes = quorum_votes<TokenT>();
 
-    debug::print(&std::string::utf8(b"dao::proposal | Proposal {"));
+    debug::print(&std::string::utf8(b"dao::proposal | Proposal "));
+    debug::print(&proposal_id);
+    debug::print(&start_time);
 
     let proposal = Proposal<TokenT, ActionT> {
         id: proposal_id,
@@ -1265,6 +1266,9 @@ Get the proposal state.
     proposal: &Proposal<TokenT, ActionT>,
     current_time: u64,
 ): u8 {
+    debug::print(&std::string::utf8(b"do_proposal_state | entered "));
+    debug::print(proposal);
+
     if (current_time < proposal.start_time) {
         // Pending
         PENDING
diff --git a/vm/framework/starcoin-framework/doc/dao_features_proposal.md b/vm/framework/starcoin-framework/doc/dao_features_proposal.md
new file mode 100644
index 0000000000..af063761cf
--- /dev/null
+++ b/vm/framework/starcoin-framework/doc/dao_features_proposal.md
@@ -0,0 +1,195 @@
+
+
+
+# Module `0x1::dao_featuers_proposal`
+
+
+
+-  [Struct `FeaturesUpdate`](#0x1_dao_featuers_proposal_FeaturesUpdate)
+-  [Constants](#@Constants_0)
+-  [Function `propose`](#0x1_dao_featuers_proposal_propose)
+-  [Function `execute`](#0x1_dao_featuers_proposal_execute)
+-  [Function `execute_urgent`](#0x1_dao_featuers_proposal_execute_urgent)
+-  [Specification](#@Specification_1)
+
+
+
use 0x1::create_signer;
+use 0x1::dao;
+use 0x1::error;
+use 0x1::features;
+use 0x1::signer;
+use 0x1::starcoin_coin;
+use 0x1::system_addresses;
+use 0x1::vector;
+
+ + + + + +## Struct `FeaturesUpdate` + + + +
struct FeaturesUpdate has copy, drop, store
+
+ + + +
+Fields + + +
+
+enable: vector<u64> +
+
+ +
+
+disable: vector<u64> +
+
+ +
+
+ + +
+ + + +## Constants + + + + + + +
const E_NOT_ANY_FLAGS: u64 = 2;
+
+ + + + + + + +
const E_NOT_AUTHORIZED: u64 = 1;
+
+ + + + + +## Function `propose` + +Entrypoint for the proposal. + + +
public entry fun propose(signer: &signer, enable: vector<u64>, disable: vector<u64>, exec_delay: u64)
+
+ + + +
+Implementation + + +
public entry fun propose(
+    signer: &signer,
+    enable: vector<u64>,
+    disable: vector<u64>,
+    exec_delay: u64,
+) {
+    assert!(
+        !vector::is_empty(&enable) || !vector::is_empty(&disable),
+        error::invalid_argument(E_NOT_ANY_FLAGS)
+    );
+    let action = FeaturesUpdate {
+        enable,
+        disable,
+    };
+    dao::propose<STC, FeaturesUpdate>(signer, action, exec_delay);
+}
+
+ + + +
+ + + +## Function `execute` + +Once the proposal is agreed, anyone can call the method to make the proposal happen. + + +
public entry fun execute(proposal_adderss: address, proposal_id: u64)
+
+ + + +
+Implementation + + +
public entry fun execute(proposal_adderss: address, proposal_id: u64) {
+    let FeaturesUpdate {
+        enable,
+        disable,
+    } = dao::extract_proposal_action<STC, FeaturesUpdate>(
+        proposal_adderss,
+        proposal_id
+    );
+    let starcoin_framework = &create_signer(system_addresses::get_starcoin_framework());
+    features::change_feature_flags_for_next_epoch(starcoin_framework, enable, disable);
+    features::on_new_epoch(starcoin_framework);
+}
+
+ + + +
+ + + +## Function `execute_urgent` + + + +
public entry fun execute_urgent(core_resource: &signer, enable: vector<u64>, disable: vector<u64>)
+
+ + + +
+Implementation + + +
public entry fun execute_urgent(core_resource: &signer, enable: vector<u64>, disable: vector<u64>) {
+    assert!(signer::address_of(core_resource) == @core_resources, error::unauthenticated(E_NOT_AUTHORIZED));
+    let framework = &create_signer(@starcoin_framework);
+    features::change_feature_flags_for_next_epoch(framework, enable, disable);
+    features::on_new_epoch(framework);
+}
+
+ + + +
+ + + +## Specification + + + +
pragma verify = false;
+pragma aborts_if_is_strict;
+pragma aborts_if_is_partial;
+
+ + +[move-book]: https://starcoin.dev/move/book/SUMMARY diff --git a/vm/framework/starcoin-framework/doc/overview.md b/vm/framework/starcoin-framework/doc/overview.md index 932b1a854f..2b57111917 100644 --- a/vm/framework/starcoin-framework/doc/overview.md +++ b/vm/framework/starcoin-framework/doc/overview.md @@ -26,6 +26,7 @@ This is the reference documentation of the Starcoin framework. - [`0x1::consensus_strategy`](consensus_strategy.md#0x1_consensus_strategy) - [`0x1::create_signer`](create_signer.md#0x1_create_signer) - [`0x1::dao`](dao.md#0x1_dao) +- [`0x1::dao_featuers_proposal`](dao_features_proposal.md#0x1_dao_featuers_proposal) - [`0x1::dao_modify_config_proposal`](dao_modify_config_proposal.md#0x1_dao_modify_config_proposal) - [`0x1::dao_treasury_withdraw_proposal`](dao_treasury_withdraw_proposal.md#0x1_dao_treasury_withdraw_proposal) - [`0x1::dao_upgrade_module_proposal`](dao_upgrade_module_proposal.md#0x1_dao_upgrade_module_proposal) diff --git a/vm/framework/starcoin-framework/doc/stc_genesis.md b/vm/framework/starcoin-framework/doc/stc_genesis.md index 3d1f32ebca..b3f87021fe 100644 --- a/vm/framework/starcoin-framework/doc/stc_genesis.md +++ b/vm/framework/starcoin-framework/doc/stc_genesis.md @@ -119,8 +119,10 @@ The module for init Genesis features ); + // Initialize versions initialize_versions(&starcoin_framework_account, stdlib_version); + // Initalize aggreator factorys aggregator_factory::initialize_aggregator_factory(&starcoin_framework_account); // Init global time @@ -332,6 +334,7 @@ The treasury will mint the total_stc_amount to the treasury. stc_transaction_package_validation::extract_submit_upgrade_plan_cap(starcoin_framework); dao_upgrade_module_proposal::plugin<STC>(starcoin_framework, upgrade_plan_cap); + debug::print(&std::string::utf8(b"stc_genesis::initialize_stc | plugin upgrade cap ")); // the following configurations are gov-ed by Dao. @@ -342,6 +345,7 @@ The treasury will mint the total_stc_amount to the treasury. on_chain_config_dao::plugin<STC, stc_transaction_timeout_config::TransactionTimeoutConfig>(starcoin_framework); on_chain_config_dao::plugin<STC, flexi_dag_config::FlexiDagConfig>(starcoin_framework); + debug::print(&std::string::utf8(b"initialize_stc | Exited")); total_stc_coin diff --git a/vm/framework/starcoin-framework/integration-tests/dao/test_dao_features_proposal.exp b/vm/framework/starcoin-framework/integration-tests/dao/test_dao_features_proposal.exp new file mode 100644 index 0000000000..b7decc014d --- /dev/null +++ b/vm/framework/starcoin-framework/integration-tests/dao/test_dao_features_proposal.exp @@ -0,0 +1,47 @@ +processed 13 tasks + +task 4 'run'. lines 9-20: +{ + "gas_used": 1208523, + "status": "Executed" +} + +task 6 'run'. lines 25-50: +{ + "gas_used": 474674, + "status": "Executed" +} + +task 8 'run'. lines 54-68: +{ + "gas_used": 168960, + "status": "Executed" +} + +task 10 'run'. lines 72-88: +{ + "gas_used": 277860, + "status": "Executed" +} + +task 11 'run'. lines 91-105: +{ + "gas_used": 110329, + "status": "Executed" +} + +task 12 'run'. lines 107-121: +{ + "gas_used": 28463, + "status": { + "MoveAbort": { + "location": { + "Module": { + "address": "0x00000000000000000000000000000001", + "name": "dao_featuers_proposal" + } + }, + "abort_code": "262145" + } + } +} diff --git a/vm/framework/starcoin-framework/integration-tests/dao/test_dao_features_proposal.move b/vm/framework/starcoin-framework/integration-tests/dao/test_dao_features_proposal.move new file mode 100644 index 0000000000..fa56701f2d --- /dev/null +++ b/vm/framework/starcoin-framework/integration-tests/dao/test_dao_features_proposal.move @@ -0,0 +1,121 @@ +//# init -n dev + +//# faucet --addr alice --amount 10000000000000000 + +//# faucet --addr bob + +//# block --author 0x1 --timestamp 86400000 + +//# run --signers alice +script { + use std::vector; + use starcoin_framework::dao_featuers_proposal; + + fun proposal(account: &signer) { + let disable = vector::empty(); + vector::push_back(&mut disable, 1); + dao_featuers_proposal::propose(account, vector::empty(), disable, 3600000); + } +} +// check: EXECUTED + + +//# block --author 0x1 --timestamp 86460000 + +//# run --signers alice +script { + use std::vector; + + use starcoin_framework::coin; + use starcoin_framework::dao; + use starcoin_framework::dao_featuers_proposal; + use starcoin_framework::starcoin_coin::STC; + + fun cast_vote_proposal(account: &signer) { + let disable = vector::empty(); + vector::push_back(&mut disable, 1); + let balance = coin::withdraw( + account, + 6370272400000001 + ); + dao::cast_vote( + account, + @alice, + 0, + balance, + true + ); + } +} +// check: EXECUTED + +//# block --author 0x1 --timestamp 90070000 + +//# run --signers alice +script { + use starcoin_framework::starcoin_coin::STC; + use starcoin_framework::dao; + use starcoin_std::debug; + use starcoin_framework::dao_featuers_proposal; + + fun queue_proposal(_account: &signer) { + debug::print(&std::string::utf8(b"queue_proposal | proposal state")); + debug::print(&dao::proposal_state(@alice, 0)); + dao::queue_proposal_action(@alice,0); + + } +} +// check: EXECUTED + +//# block --author 0x1 --timestamp 99000000 + +//# run --signers alice +script { + use std::features; + use starcoin_framework::starcoin_coin::STC; + use starcoin_framework::dao; + use starcoin_std::debug; + use starcoin_framework::dao_featuers_proposal; + + fun execute_proposal(_account: &signer) { + debug::print(&std::string::utf8(b"execute_proposal | proposal state")); + debug::print(&dao::proposal_state(@alice, 0)); + assert!(features::is_enabled(1), 100); + dao_featuers_proposal::execute(@alice,0); + assert!(!features::is_enabled(1), 101); + } +} +// check: EXECUTED + + +//# run --signers core_resources +script { + use std::features; + use std::vector; + use starcoin_framework::dao_featuers_proposal; + + fun test_execute_urgent(starcoin_association: &signer) { + let enable = vector::empty(); + vector::push_back(&mut enable, 1); + assert!(!features::is_enabled(1), 200); + dao_featuers_proposal::execute_urgent(starcoin_association, enable, vector::empty()); + assert!(features::is_enabled(1), 201); + } +} +// check: EXECUTED + +//# run --signers alice +script { + use std::features; + use std::vector; + use starcoin_framework::dao_featuers_proposal; + + fun test_execute_urgent(alice: &signer) { + let disable = vector::empty(); + vector::push_back(&mut disable, 1); + assert!(features::is_enabled(1), 200); + dao_featuers_proposal::execute_urgent(alice, vector::empty(), disable); + assert!(!features::is_enabled(1), 201); + } +} +// check: "abort_code": "262145" \ No newline at end of file diff --git a/vm/framework/starcoin-framework/sources/create_signer.move b/vm/framework/starcoin-framework/sources/create_signer.move index adc70b2ff5..72bb45b726 100644 --- a/vm/framework/starcoin-framework/sources/create_signer.move +++ b/vm/framework/starcoin-framework/sources/create_signer.move @@ -17,6 +17,7 @@ module starcoin_framework::create_signer { friend starcoin_framework::stc_transaction_validation; friend starcoin_framework::block_reward; friend starcoin_framework::transfer_scripts; + friend starcoin_framework::dao_featuers_proposal; public(friend) native fun create_signer(addr: address): signer; } diff --git a/vm/framework/starcoin-framework/sources/stc/dao.move b/vm/framework/starcoin-framework/sources/stc/dao.move index 7e46b909ab..62254abb14 100644 --- a/vm/framework/starcoin-framework/sources/stc/dao.move +++ b/vm/framework/starcoin-framework/sources/stc/dao.move @@ -172,7 +172,6 @@ module starcoin_framework::dao { action_delay: u64, ) acquires DaoGlobalInfo { debug::print(&std::string::utf8(b"dao::proposal | Entered")); - debug::print(&signer::address_of(signer)); if (action_delay == 0) { action_delay = min_action_delay(); @@ -184,7 +183,9 @@ module starcoin_framework::dao { let start_time = timestamp::now_milliseconds() + voting_delay(); let quorum_votes = quorum_votes(); - debug::print(&std::string::utf8(b"dao::proposal | Proposal {")); + debug::print(&std::string::utf8(b"dao::proposal | Proposal ")); + debug::print(&proposal_id); + debug::print(&start_time); let proposal = Proposal { id: proposal_id, @@ -514,6 +515,9 @@ module starcoin_framework::dao { proposal: &Proposal, current_time: u64, ): u8 { + debug::print(&std::string::utf8(b"do_proposal_state | entered ")); + debug::print(proposal); + if (current_time < proposal.start_time) { // Pending PENDING diff --git a/vm/framework/starcoin-framework/sources/stc/dao_features_proposal.move b/vm/framework/starcoin-framework/sources/stc/dao_features_proposal.move new file mode 100644 index 0000000000..4500c34392 --- /dev/null +++ b/vm/framework/starcoin-framework/sources/stc/dao_features_proposal.move @@ -0,0 +1,66 @@ +module starcoin_framework::dao_featuers_proposal { + + use std::error; + use std::features; + use std::signer; + use std::vector; + + use starcoin_framework::create_signer::create_signer; + use starcoin_framework::dao; + use starcoin_framework::starcoin_coin::STC; + use starcoin_framework::system_addresses; + + spec module { + pragma verify = false; // break after enabling v2 compilation scheme + pragma aborts_if_is_strict; + pragma aborts_if_is_partial; + } + + struct FeaturesUpdate has copy, drop, store { + enable: vector, + disable: vector, + } + + const E_NOT_AUTHORIZED: u64 = 1; + const E_NOT_ANY_FLAGS: u64 = 2; + + /// Entrypoint for the proposal. + public entry fun propose( + signer: &signer, + enable: vector, + disable: vector, + exec_delay: u64, + ) { + assert!( + !vector::is_empty(&enable) || !vector::is_empty(&disable), + error::invalid_argument(E_NOT_ANY_FLAGS) + ); + let action = FeaturesUpdate { + enable, + disable, + }; + dao::propose(signer, action, exec_delay); + } + + /// Once the proposal is agreed, anyone can call the method to make the proposal happen. + public entry fun execute(proposal_adderss: address, proposal_id: u64) { + let FeaturesUpdate { + enable, + disable, + } = dao::extract_proposal_action( + proposal_adderss, + proposal_id + ); + let starcoin_framework = &create_signer(system_addresses::get_starcoin_framework()); + features::change_feature_flags_for_next_epoch(starcoin_framework, enable, disable); + features::on_new_epoch(starcoin_framework); + } + + + public entry fun execute_urgent(core_resource: &signer, enable: vector, disable: vector) { + assert!(signer::address_of(core_resource) == @core_resources, error::unauthenticated(E_NOT_AUTHORIZED)); + let framework = &create_signer(@starcoin_framework); + features::change_feature_flags_for_next_epoch(framework, enable, disable); + features::on_new_epoch(framework); + } +} \ No newline at end of file diff --git a/vm/framework/starcoin-framework/sources/stc/stc_genesis.move b/vm/framework/starcoin-framework/sources/stc/stc_genesis.move index 43e4ea2ded..c50abc6422 100644 --- a/vm/framework/starcoin-framework/sources/stc/stc_genesis.move +++ b/vm/framework/starcoin-framework/sources/stc/stc_genesis.move @@ -96,8 +96,10 @@ module starcoin_framework::stc_genesis { features ); + // Initialize versions initialize_versions(&starcoin_framework_account, stdlib_version); + // Initalize aggreator factorys aggregator_factory::initialize_aggregator_factory(&starcoin_framework_account); // Init global time @@ -269,6 +271,7 @@ module starcoin_framework::stc_genesis { stc_transaction_package_validation::extract_submit_upgrade_plan_cap(starcoin_framework); dao_upgrade_module_proposal::plugin(starcoin_framework, upgrade_plan_cap); + debug::print(&std::string::utf8(b"stc_genesis::initialize_stc | plugin upgrade cap ")); // the following configurations are gov-ed by Dao. @@ -279,6 +282,7 @@ module starcoin_framework::stc_genesis { on_chain_config_dao::plugin(starcoin_framework); on_chain_config_dao::plugin(starcoin_framework); + debug::print(&std::string::utf8(b"initialize_stc | Exited")); total_stc_coin