Skip to content

Commit

Permalink
Merge branch 'nicolas/abs-534-review-interchain-abstract-testing-setu…
Browse files Browse the repository at this point in the history
…p-for-interchain-v2' of github.com:AbstractSDK/abstract into nicolas/abs-534-review-interchain-abstract-testing-setup-for-interchain-v2
  • Loading branch information
Kayanski committed Oct 11, 2024
2 parents 72a628a + 1116360 commit dcd2071
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion framework/packages/abstract-interface/src/deployment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,17 @@ impl<Chain: CwEnv> Deploy<Chain> for Abstract<Chain> {
) -> Result<Self, AbstractInterfaceError> {
let original_sender = chain.sender().clone();
chain.set_sender(deploy_data);
let admin = chain.sender_addr().to_string();

// Ensure we have expected sender address
let sender_addr = chain.sender_addr();
let hrp = sender_addr.as_str().split_once("1").unwrap().0;
assert_eq!(
sender_addr.as_str(),
native_addrs::creator_address(hrp)?,
"Only predetermined abstract admin can deploy abstract contracts, see `native_addrs.rs`"
);

let admin = sender_addr.to_string();
// upload
let mut deployment = Self::store_on(chain.clone())?;
let blob_code_id = deployment.blob.code_id()?;
Expand Down

0 comments on commit dcd2071

Please sign in to comment.