ソースを参照

contract/money: Add no-entrypoint feature needed for composing contracts.

parazyd 3 年 前
コミット
371011959c
2 ファイル変更5 行追加0 行削除
  1. 4 0
      src/contract/money/Cargo.toml
  2. 1 0
      src/contract/money/src/lib.rs

+ 4 - 0
src/contract/money/Cargo.toml

@@ -16,3 +16,7 @@ darkfi-serial = { path = "../../serial", features = ["derive", "crypto"] }
 # so the wasm32-unknown-unknown target is enabled.
 [target.'cfg(target_arch = "wasm32")'.dependencies]
 getrandom = { version = "0.2.8", features = ["custom"] }
+
+[features]
+default = []
+no-entrypoint = []

+ 1 - 0
src/contract/money/src/lib.rs

@@ -48,6 +48,7 @@ impl From<u8> for MoneyFunction {
 pub mod state;
 use state::{MoneyTransferParams, MoneyTransferUpdate};
 
+#[cfg(not(feature = "no-entrypoint"))]
 define_contract!(
     init: init_contract,
     exec: process_instruction,