Skip to content

Commit

Permalink
update ER to include transfers to other chains
Browse files Browse the repository at this point in the history
  • Loading branch information
vedhavyas committed Feb 6, 2024
1 parent 5eb4ab4 commit 161f192
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/pallet-domains/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ pub(crate) fn create_dummy_receipt(
execution_trace,
execution_trace_root,
block_fees: Default::default(),
transfers: Default::default(),
}
}

Expand Down
1 change: 1 addition & 0 deletions crates/sp-domains-fraud-proof/src/bundle_equivocation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ mod test {
execution_trace: vec![],
execution_trace_root: Default::default(),
block_fees: Default::default(),
transfers: Default::default(),
},
estimated_bundle_weight: Default::default(),
bundle_extrinsics_root: Default::default(),
Expand Down
4 changes: 4 additions & 0 deletions crates/sp-domains/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,8 @@ pub struct ExecutionReceipt<Number, Hash, DomainNumber, DomainHash, Balance> {
/// Compute and Domain storage fees are shared across operators and Consensus
/// storage fees are given to the consensus block author.
pub block_fees: BlockFees<Balance>,
/// List of transfers from this Domain to other chains
pub transfers: BTreeMap<ChainId, Balance>,
}

impl<Number, Hash, DomainNumber, DomainHash, Balance>
Expand Down Expand Up @@ -510,6 +512,7 @@ impl<
execution_trace: sp_std::vec![genesis_state_root],
execution_trace_root: Default::default(),
block_fees: Default::default(),
transfers: Default::default(),
}
}

Expand Down Expand Up @@ -546,6 +549,7 @@ impl<
execution_trace,
execution_trace_root,
block_fees: Default::default(),
transfers: Default::default(),
}
}
}
Expand Down
1 change: 1 addition & 0 deletions domains/client/domain-operator/src/aux_schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ mod tests {
execution_trace: Default::default(),
execution_trace_root: Default::default(),
block_fees: Default::default(),
transfers: Default::default(),
}
}

Expand Down
3 changes: 3 additions & 0 deletions domains/client/domain-operator/src/domain_block_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,8 @@ where
execution_trace: trace,
execution_trace_root: sp_core::H256(trace_root),
block_fees,
// TODO: Fetch transfers from the runtime
transfers: Default::default(),
};

Ok(DomainBlockResult {
Expand Down Expand Up @@ -973,6 +975,7 @@ mod tests {
execution_trace: sp_std::vec![],
execution_trace_root: Default::default(),
block_fees: Default::default(),
transfers: Default::default(),
}
}

Expand Down

0 comments on commit 161f192

Please sign in to comment.