Skip to content

Commit

Permalink
feat(law): impl from<Object> on ObjectResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
bdeneux committed Mar 24, 2023
1 parent 9a9874e commit 17e31d1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions contracts/cw-law-stone/src/msg.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use crate::state::Object;
use cosmwasm_schema::{cw_serde, QueryResponses};
use cosmwasm_std::Binary;
#[allow(unused_imports)]
Expand Down Expand Up @@ -50,3 +51,12 @@ pub struct ProgramResponse {
/// The `cw-storage` contract address on which the law program is stored.
pub storage_address: String,
}

impl From<Object> for ProgramResponse {
fn from(o: Object) -> Self {
ProgramResponse {
object_id: o.object_id,
storage_address: o.storage_address,
}
}
}

0 comments on commit 17e31d1

Please sign in to comment.