Skip to content

Commit

Permalink
use DefaultNobound
Browse files Browse the repository at this point in the history
  • Loading branch information
pgherveou committed Feb 8, 2024
1 parent c8e6464 commit a496295
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions drink/src/session/record.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ type ContractExecResult<R> = pallet_contracts::ContractExecResult<BalanceOf<R>,
/// By `result` we mean the full result (enriched with some context information) of the contract
/// interaction, like `ContractExecResult`. By `return` we mean the return value of the contract
/// execution, like a value returned from a message or the address of a newly instantiated contract.
#[derive(frame_support::DefaultNoBound)]
pub struct Record<Config: pallet_contracts::Config> {
/// The results of contract instantiation.
deploy_results: Vec<ContractInstantiateResult<Config>>,
Expand All @@ -37,18 +38,6 @@ pub struct Record<Config: pallet_contracts::Config> {
event_batches: Vec<EventBatch<Config>>,
}

impl<Config: pallet_contracts::Config> Default for Record<Config> {
fn default() -> Self {
Self {
deploy_results: Vec::new(),
deploy_returns: Vec::new(),
call_results: Vec::new(),
call_returns: Vec::new(),
event_batches: Vec::new(),
}
}
}

// API for `Session` to record results and events related to contract interaction.
impl<Config: pallet_contracts::Config> Record<Config> {
pub(super) fn push_deploy_result(&mut self, result: ContractInstantiateResult<Config>) {
Expand Down

0 comments on commit a496295

Please sign in to comment.