Skip to content

Commit

Permalink
Serialize DaData
Browse files Browse the repository at this point in the history
  • Loading branch information
yaziciahmet committed Aug 21, 2024
1 parent ae55666 commit 024f878
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions crates/bitcoin-da/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,15 +308,7 @@ impl BitcoinService {
let rollup_name = self.rollup_name.clone();
let da_private_key = self.da_private_key.expect("No private key set");

let blob = match da_data {
DaData::ZKProof(proof) => {
let blob = borsh::to_vec(&proof).expect("Should serialize");
compress_blob(&blob)
}
DaData::SequencerCommitment(commitment) => {
borsh::to_vec(&commitment).expect("Should serialize")
}
};
let blob = borsh::to_vec(da_data).expect("DaData serialize must not fail");

// get all available utxos
let utxos = self.get_utxos().await?;
Expand All @@ -331,6 +323,7 @@ impl BitcoinService {

match da_data {
DaData::ZKProof(_) => {
let blob = compress_blob(&blob);
// create inscribe transactions
let inscription_txs = create_zkproof_transactions(
&rollup_name,
Expand Down

0 comments on commit 024f878

Please sign in to comment.