Procházet zdrojové kódy

Revert "daod/ example: removed unnecessary Header from CallData"

This reverts commit 8a42c51f6003ccb82e90de3927a8b79cd9c92cbc.
lunar-mining před 3 roky
rodič
revize
dbd99fcdc7

+ 6 - 1
bin/daod/src/example_contract/foo/validate.rs

@@ -31,7 +31,7 @@ impl From<DarkFiError> for Error {
 }
 
 pub struct CallData {
-    pub public_value: pallas::Base,
+    pub header: Header,
 }
 
 impl CallDataBase for CallData {
@@ -44,6 +44,11 @@ impl CallDataBase for CallData {
     }
 }
 
+#[derive(Clone, SerialEncodable, SerialDecodable)]
+pub struct Header {
+    pub public_c: pallas::Base,
+}
+
 pub fn state_transition(
     states: &StateRegistry,
     func_call_index: usize,

+ 3 - 1
bin/daod/src/example_contract/foo/wallet.rs

@@ -56,7 +56,9 @@ impl Builder {
             .expect("Example::foo() proving error!)");
         proofs.push(input_proof);
 
-        let call_data = CallData { public_value: c };
+        let header = Header { public_c: c };
+
+        let call_data = CallData { header };
 
         FuncCall {
             contract_id: "Example".to_string(),