Эх сурвалжийг харах

contract/deployooor: Include deployment instruction payload in params

parazyd 2 жил өмнө
parent
commit
8dbd5a1785

+ 3 - 0
src/contract/deployooor/src/client/deploy_v1.rs

@@ -38,6 +38,8 @@ pub struct DeployCallBuilder {
     pub deploy_keypair: Keypair,
     /// WASM bincode to deploy
     pub wasm_bincode: Vec<u8>,
+    /// Serialized deployment payload instruction
+    pub deploy_ix: Vec<u8>,
     /// `DeriveContractID` zkas circuit ZkBinary
     pub derivecid_zkbin: ZkBinary,
     /// Proving key for the `DeriveContractID` zk circuit
@@ -59,6 +61,7 @@ impl DeployCallBuilder {
         let params = DeployParamsV1 {
             wasm_bincode: self.wasm_bincode.clone(),
             public_key: self.deploy_keypair.public,
+            ix: self.deploy_ix.clone(),
         };
 
         let debris = DeployCallDebris { params, proofs: vec![proof] };

+ 2 - 0
src/contract/deployooor/src/model.rs

@@ -29,6 +29,8 @@ pub struct DeployParamsV1 {
     pub wasm_bincode: Vec<u8>,
     /// Public key used to sign the transaction and derive the `ContractId`
     pub public_key: PublicKey,
+    /// Serialized deployment payload instruction
+    pub ix: Vec<u8>,
 }
 
 /// State update for `Deploy::Deploy`