x 3 лет назад
Родитель
Сommit
c0ae682fd0
3 измененных файлов с 9 добавлено и 7 удалено
  1. 1 0
      Cargo.lock
  2. 3 2
      example/dao2/src/main.rs
  3. 5 5
      example/dao2/src/schema.rs

+ 1 - 0
Cargo.lock

@@ -1302,6 +1302,7 @@ dependencies = [
 name = "darkfi-sdk"
 version = "0.3.0"
 dependencies = [
+ "blake3",
  "bs58",
  "darkfi-serial",
  "halo2_gadgets",

+ 3 - 2
example/dao2/src/main.rs

@@ -42,8 +42,9 @@ async fn main() -> BoxResult<()> {
     )?;
 
     println!("wakie wakie young wagie");
-    schema::schema().await?;
-    return Ok(());
+
+    //schema::schema().await?;
+    //return Ok(());
 
     // =============================
     // Initialize a dummy blockchain

+ 5 - 5
example/dao2/src/schema.rs

@@ -192,9 +192,6 @@ pub async fn schema() -> Result<()> {
     let dao_approval_ratio_quot = 1;
     let dao_approval_ratio_base = 2;
 
-    // Lookup table for smart contract states
-    let mut states = StateRegistry::new();
-
     // Initialize ZK binary table
     let mut zk_bins = ZkContractTable::new();
 
@@ -252,14 +249,17 @@ pub async fn schema() -> Result<()> {
 
     ///////////////////////////////////////////////////
 
+    // Lookup table for smart contract states
+    let mut states = StateRegistry::new();
+
     let money_state = money::state::State::new(cashier_signature_public, faucet_signature_public);
     states.register(*money::CONTRACT_ID, money_state);
 
-    /////////////////////////////////////////////////////
-
     let dao_state = dao::State::new();
     states.register(*dao::CONTRACT_ID, dao_state);
 
+    /////////////////////////////////////////////////////
+
     /////////////////////////////////////////////////////
     ////// Create the DAO bulla
     /////////////////////////////////////////////////////