Skip to content

Commit

Permalink
Update deploy_all bin (#75)
Browse files Browse the repository at this point in the history
* ping url, write json log

* clippy

* Changed account id structure (#58)

* Changed account id structure

* Corrected tests

* formatting

* Cleanup and test

* Changelog

* Corrected imports

* Fixed tests

* improve ChainName construction strictness

* fix tests

* Cleanup and storage key shortening

* fix test

* clippy fix

* remove osmosis remenant

* bump cw-orch

* Hot fix for cw-orch 0.16.0

* Moved from_str to trait

* bump cw-orch

* fix tests

* formatting

* rm unused import

---------

Co-authored-by: cyberhoward <[email protected]>
Co-authored-by: CyberHoward <[email protected]>

* Update WASM artifacts [skip ci]

---------

Co-authored-by: Kayanski <[email protected]>
Co-authored-by: cyberhoward <[email protected]>
Co-authored-by: CyberHoward <[email protected]>
Co-authored-by: CircleCI <[email protected]>
  • Loading branch information
5 people authored Sep 13, 2023
1 parent cf6919f commit dbe5c53
Show file tree
Hide file tree
Showing 32 changed files with 101 additions and 41 deletions.
Binary file modified framework/artifacts/abstract_account_factory.wasm
Binary file not shown.
Binary file modified framework/artifacts/abstract_ans_host.wasm
Binary file not shown.
Binary file modified framework/artifacts/abstract_ibc_client.wasm
Binary file not shown.
Binary file modified framework/artifacts/abstract_manager.wasm
Binary file not shown.
Binary file modified framework/artifacts/abstract_module_factory.wasm
Binary file not shown.
Binary file modified framework/artifacts/abstract_proxy.wasm
Binary file not shown.
Binary file modified framework/artifacts/abstract_version_control.wasm
Binary file not shown.
14 changes: 7 additions & 7 deletions framework/artifacts/checksums.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
5824378334e2e396d9be0c440586f888cf6178835df03545ae187ec6c65c7645 abstract_account_factory.wasm
54113a905952f057274ff4604bb8fb92142165519d1e207af43dc79d0ac10eaa abstract_ans_host.wasm
9878c274815952e984cde42941651299d3e6f7ec97748c6d5047128f5954068e abstract_ibc_client.wasm
9bb139319016d649e9f1b8f13f0ac5e639c54b4c671282e8abf917482297d589 abstract_manager.wasm
edf9d130124fe2b6b632a99b7bfba595353a24a3a8158297f3cdbc6238b4db94 abstract_module_factory.wasm
cdfb6089ac5e57b108979f083063890bdd744a8db2b8443f5215fde212a3f588 abstract_proxy.wasm
455e8d471a1d2c314e44daa563ab38575b811b392d54589d3715dbefbedc390e abstract_version_control.wasm
0cc1d3f7a070438229dfafbe42b96b790aecd41e82bd8952894da2dab894dbed abstract_account_factory.wasm
ce8ac8230e325f2c82539d5ae36b5790a0e5a0725878dea84f3afa94bbc45b75 abstract_ans_host.wasm
d590f4ffae505c026c2d7dd6a0e9e57314b3f6d73e3be491b1cf2853f8809230 abstract_ibc_client.wasm
4d32a9240baa9631380e781ef6e8b347d508f5726dd2f6f50c45b544d63546df abstract_manager.wasm
5deb5812f9c673580025dce3b1d4f50d0bd0b9d7a5395a12b85c9f6133280bc4 abstract_module_factory.wasm
b068d3b0a3a1ff8567a56412b5bde14ce09315b7cda0de9f8fa40b2f61b850cb abstract_proxy.wasm
39018b13f88613f678174cb1c1f2eb72230cd303db9f1718b6ce0d304e91f82b abstract_version_control.wasm
14 changes: 7 additions & 7 deletions framework/artifacts/checksums_intermediate.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
34f0275a4eaae7f43193e1b78c4fba6c0903f1c5712e5a6b1c55d22f9fd04a2a target/wasm32-unknown-unknown/release/abstract_account_factory.wasm
c1985ba17b676866f03278f2b519afcd657bf2b1fffb2647ea12e32f8fe4dd70 target/wasm32-unknown-unknown/release/abstract_ans_host.wasm
09d4898239e1eb0abb10b549b5fd58438e24a008085a73535540915d61c106dd target/wasm32-unknown-unknown/release/abstract_ibc_client.wasm
126a5e31e50182fdc2f1d0974ee17b4144697b11ddb8317ca7e27b6b6c287218 target/wasm32-unknown-unknown/release/abstract_manager.wasm
4c4d09b5ea1a2eb0823b3229c37330f64675b06e789b30a5b505d7fb360df119 target/wasm32-unknown-unknown/release/abstract_module_factory.wasm
33890a3cf0867a5ace2545b153ac0bc754dca278f2400d0aaf01f81d01bf6ad3 target/wasm32-unknown-unknown/release/abstract_proxy.wasm
a45ed760d72f403e38c9ef3f4dd7b4a7807540c41525e2f5f56f74782eca4975 target/wasm32-unknown-unknown/release/abstract_version_control.wasm
e0be0c362d9a283506984a10dd27eecbae5b24dab49278276f7ee0cd7ec528d9 target/wasm32-unknown-unknown/release/abstract_account_factory.wasm
e8bcea0f17af9eab9f3e3c4ead149f0741eb3372323c5eb8fdd65f90bebeb62b target/wasm32-unknown-unknown/release/abstract_ans_host.wasm
f0b808d9cc2e1f23ae767ea25aa07538b8f6d137d16a29490b7b16d26e125691 target/wasm32-unknown-unknown/release/abstract_ibc_client.wasm
1936187d48173fef14cd00121c83414b6f325ce44aedf2b18af63537f1c88549 target/wasm32-unknown-unknown/release/abstract_manager.wasm
6e4fbeb9b373a4d95fa2fadb1aaf6eb631831f7a453e6473d8682fa0cdfcc707 target/wasm32-unknown-unknown/release/abstract_module_factory.wasm
3a1e9f5588462650e268920223f1cbe89fd5b379fa33bbdabce88f6a498dff09 target/wasm32-unknown-unknown/release/abstract_proxy.wasm
bb55273114f004e75d15ed86b42782b039c4cb256b58dc1be7ec9e4637464c95 target/wasm32-unknown-unknown/release/abstract_version_control.wasm
2 changes: 2 additions & 0 deletions framework/contracts/native/ans-host/src/queries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,8 @@ fn load_pool_metadata_entry(

#[cfg(test)]
mod test {
use std::str::FromStr;

use abstract_core::ans_host::*;
use abstract_core::objects::chain_name::ChainName;
use abstract_core::objects::PoolType;
Expand Down
3 changes: 2 additions & 1 deletion framework/scripts/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ tokio = { workspace = true }
log = "0.4.14"
anyhow = { workspace = true }
serde_json = "1.0.79"
reqwest = { version = "0.11.9" }
reqwest = { version = "0.11.9"}
dotenv = "0.15.0"
env_logger = "0.10.0"
url = "2.4.1"

cosmos-sdk-proto = { version = "0.19.0", features = [
"grpc-transport",
Expand Down
54 changes: 52 additions & 2 deletions framework/scripts/src/bin/full_deploy.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
use std::{fs, net::TcpStream, path::Path};

use abstract_core::objects::gov_type::GovernanceDetails;
use abstract_interface::Abstract;

use abstract_interface_scripts::assert_wallet_balance;
use abstract_interface_scripts::{assert_wallet_balance, DeploymentStatus};
use clap::Parser;
use cw_orch::{
deploy::Deploy,
Expand All @@ -21,12 +23,34 @@ fn full_deploy(networks: Vec<ChainInfo>) -> anyhow::Result<()> {
let networks = rt.block_on(assert_wallet_balance(&networks));

for network in networks {
let urls = network.grpc_urls.to_vec();
for url in urls {
rt.block_on(ping_grpc(url))?;
}

let chain = DaemonBuilder::default()
.handle(rt.handle())
.chain(network.clone())
.build()?;

let sender = chain.sender();
let deployment = Abstract::deploy_on(chain, sender.to_string())?;
let deployment = Abstract::deploy_on(chain.clone(), sender.to_string())?;

let mut deployment_status = DeploymentStatus {
chain_id: network.chain_id.to_string(),
success: false, // Default to false
};

match Abstract::deploy_on(chain, sender.to_string()) {
Ok(_) => {
deployment_status.success = true;
write_deployment(&deployment_status)?;
}
Err(e) => {
write_deployment(&deployment_status)?;
return Err(e.into());
}
}

// Create the Abstract Account because it's needed for the fees for the dex module
deployment
Expand All @@ -38,6 +62,32 @@ fn full_deploy(networks: Vec<ChainInfo>) -> anyhow::Result<()> {
Ok(())
}

async fn ping_grpc(url_str: &str) -> anyhow::Result<()> {
let parsed_url = url::Url::parse(url_str)?;

let host = parsed_url
.host_str()
.ok_or_else(|| anyhow::anyhow!("No host in url"))?;

let port = parsed_url.port_or_known_default().ok_or_else(|| {
anyhow::anyhow!(
"No port in url, and no default for scheme {:?}",
parsed_url.scheme()
)
})?;
let socket_addr = format!("{}:{}", host, port);

let _ = TcpStream::connect(socket_addr);
Ok(())
}

fn write_deployment(status: &DeploymentStatus) -> anyhow::Result<()> {
let path = Path::new("scripts").join("deployments.json");
let status_str = serde_json::to_string_pretty(status)?;
fs::write(path, status_str)?;
Ok(())
}

#[derive(Parser, Default, Debug)]
#[command(author, version, about, long_about = None)]
struct Arguments {
Expand Down
7 changes: 7 additions & 0 deletions framework/scripts/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use cw_orch::{
*,
},
};
use serde::{Deserialize, Serialize};

const GAS_TO_DEPLOY: u64 = 60_000_000;
pub const SUPPORTED_CHAINS: &[ChainInfo] =
Expand All @@ -21,6 +22,12 @@ pub const NEUTRON_1: ChainInfo = ChainInfo {
fcd_url: None,
};

#[derive(Debug, Serialize, Deserialize)]
pub struct DeploymentStatus {
pub chain_id: String,
pub success: bool,
}

pub async fn assert_wallet_balance<'a>(mut chains: &'a [ChainInfo<'a>]) -> &'a [ChainInfo<'a>] {
if chains.is_empty() {
chains = SUPPORTED_CHAINS;
Expand Down
Binary file modified modules/artifacts/abstract_challenge_app.wasm
Binary file not shown.
Binary file modified modules/artifacts/abstract_cw_staking-juno.wasm
Binary file not shown.
Binary file modified modules/artifacts/abstract_cw_staking-kujira.wasm
Binary file not shown.
Binary file modified modules/artifacts/abstract_cw_staking-neutron.wasm
Binary file not shown.
Binary file modified modules/artifacts/abstract_cw_staking-osmosis.wasm
Binary file not shown.
Binary file modified modules/artifacts/abstract_cw_staking-terra.wasm
Binary file not shown.
Binary file modified modules/artifacts/abstract_cw_staking.wasm
Binary file not shown.
Binary file modified modules/artifacts/abstract_dca_app.wasm
Binary file not shown.
Binary file modified modules/artifacts/abstract_dex_adapter-juno.wasm
Binary file not shown.
Binary file modified modules/artifacts/abstract_dex_adapter-kujira.wasm
Binary file not shown.
Binary file modified modules/artifacts/abstract_dex_adapter-neutron.wasm
Binary file not shown.
Binary file modified modules/artifacts/abstract_dex_adapter-osmosis.wasm
Binary file not shown.
Binary file modified modules/artifacts/abstract_dex_adapter-terra.wasm
Binary file not shown.
Binary file modified modules/artifacts/abstract_dex_adapter.wasm
Binary file not shown.
Binary file modified modules/artifacts/abstract_etf.wasm
Binary file not shown.
Binary file modified modules/artifacts/abstract_tendermint_staking_adapter.wasm
Binary file not shown.
34 changes: 17 additions & 17 deletions modules/artifacts/checksums.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
0ec46a48443e75c4044bc04f7d3eac24bf095ae5788da3a9e6f6aff62b3a6191 abstract_challenge_app.wasm
532b7240e2745f1da11204d111604208be3f92e46a621f4ce858a03df0c33788 abstract_cw_staking-juno.wasm
1ba7a16b8678a0e2bad5db9d06669d4a18bdbcfb959704070dac718658b77a73 abstract_cw_staking-kujira.wasm
1da8f20f2b9c1409f7ad2a34ec2d9b1ed308566832f19ebb9ff1d4a82f855c10 abstract_cw_staking-neutron.wasm
74d4e16ae7d926918764f26ee8fac243888c4c60188e45313b4c9d88b4566dc7 abstract_cw_staking-osmosis.wasm
88ef7e6a6c43ff20d96e5cba5a033bfa4b71ff5a27657f347b7bba675afc5519 abstract_cw_staking-terra.wasm
4ab6a4d3b7767a4cd46b066d9c1f2811e802779a1865a11664d36457eb922e97 abstract_cw_staking.wasm
da04f32c08f5f0fa2ea3eb096fb567c8d2e2e8e06c0e4b31d9fd21d96da14e3a abstract_dca_app.wasm
ccd8b844f22509d3c4b2afde2aeae478489c0395e0ee9d1212df48cb5c433cb9 abstract_dex_adapter-juno.wasm
deeb3a15992659d9272cdf86dd031c9c5feac1f1abfb669632b4a774841af7d1 abstract_dex_adapter-kujira.wasm
3d3702c8aba5ca5bc684d716a46fe6232b572f641792b4eab51d713578154fb9 abstract_dex_adapter-neutron.wasm
3ac6b728389f05c890073c5f54bec656a47b9e83f45c44dec893ff733dc0b883 abstract_dex_adapter-osmosis.wasm
a17059cc1383f71ce3c399f5688721e1cb730a616f91623a039f109711ba775b abstract_dex_adapter-terra.wasm
196bd679b7ada101ce6eb37f5b9245bb256007f8cb19e478ad4fa8b7193fb40d abstract_dex_adapter.wasm
8ffa1b2a3821db046cef08da77cd9be3dfe895ae418e5802183939647ac76c67 abstract_etf.wasm
6950834655eb0535b38f04e2817999210148a680ba434c12b4b1f698a9655f15 abstract_tendermint_staking_adapter.wasm
10e852204bc28f0886e8fd2c81b2b1f05f5a8be4d9f323c871ae44f0c74124d3 croncat_app.wasm
1a3ee301c8853ce190fbc9b799d1a50ce6b6e3e9d7554aeee81d9c21b3d70eb3 abstract_challenge_app.wasm
2c895e4869e66e508db234b330399e582d25846dcf1376decc4ee7403b44ef8c abstract_cw_staking-juno.wasm
67b606a46c2b9fb7434071fceba8fa6ec361b1f97c47073a801610307b3a7a29 abstract_cw_staking-kujira.wasm
749913582c93fdf62840affb66d854515cbc7132ffafed7c33debdfd6819b57b abstract_cw_staking-neutron.wasm
b49fb0d033eaaa4d8dc4b4905adeece2893facca04d1a102fa1260cfd2aa3fe5 abstract_cw_staking-osmosis.wasm
816936c1684b664cb5d145333db471f85714bb3a2a8ddadeec819c34705d0f27 abstract_cw_staking-terra.wasm
6a4ff18d26ffe95446eebfac95143c051ddef48ce168ef93bc6ef8b0ac6638c2 abstract_cw_staking.wasm
ecbcc415c298fc3807b336b36ce089880f4035429c6b037bcea20a0522df47b9 abstract_dca_app.wasm
53ef01a6a871883f1ffdc145d0a6dae750096523ec8bdaf55e8aede7a6a01610 abstract_dex_adapter-juno.wasm
61c8e86840e4a5ef027e7cc782ee48eb7e9d3398a667e6ee28f4c1ba4553bcd5 abstract_dex_adapter-kujira.wasm
841b1066db1e298ab86405a3331cd7069cc7080859fd3ab7baf696064d2b6b99 abstract_dex_adapter-neutron.wasm
2a4e697e072648c81414deb75e66bbda3b4c338af21e70d516ec72d99246d2b6 abstract_dex_adapter-osmosis.wasm
45b9ace46f5c5476b2da873c02876feb8043752ede6188388aa9dc3fa36e7b28 abstract_dex_adapter-terra.wasm
d4304455af1cfe68f0a3710d694d1ed180635edf8f9b769980000a64c939fa66 abstract_dex_adapter.wasm
13c6d4cfdd7ee84ba0fc95b71a270790a33ba233e4fa0b01a2ff4e720ad50d33 abstract_etf.wasm
9f9fe7cffad22bf065de2c1e6450a7e02a65d3544e583b3c7fdd1c19af7bca1c abstract_tendermint_staking_adapter.wasm
e93bdb7ece81db31bd3f5e000588ebe058c3e1e0365d1524dd4ad6f0328b4b45 croncat_app.wasm
14 changes: 7 additions & 7 deletions modules/artifacts/checksums_intermediate.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
0ced48307c1b225b3ad80affa8116061b5282e25dd00339178d47818eb3744e5 target/wasm32-unknown-unknown/release/abstract_challenge_app.wasm
4ac9807ef85cb49b1833806702b5195e65744af76db8b490e8acbb5d0c63a728 target/wasm32-unknown-unknown/release/abstract_cw_staking.wasm
80166da60c09fe9cad73f18870a0b4675523b34a41a5833433a56e31c21f2d40 target/wasm32-unknown-unknown/release/abstract_dca_app.wasm
9be0995a2dbff62f0101189362f85a25dec45ddfbc417c9d93545dc98cfa9b07 target/wasm32-unknown-unknown/release/abstract_dex_adapter.wasm
04f8e8894190e762e98d80309650b0df8ccbcce1d655f2e03215b0622ee7f9ba target/wasm32-unknown-unknown/release/abstract_etf.wasm
3290043a8be44d63b5abc9b86231f8a0b98bd82286cf24bbbf1f9bcf717c3fbc target/wasm32-unknown-unknown/release/abstract_tendermint_staking_adapter.wasm
f4407c14b82dd969f93471bb43e4000fa9697c200ff0dca923a56c69cbd22357 target/wasm32-unknown-unknown/release/croncat_app.wasm
e873935418ae0f698173e51a07ef01ca0030b8f42dba5168c428c9e2fe0f71dd target/wasm32-unknown-unknown/release/abstract_challenge_app.wasm
2589fd55bdce30175b563f439d15445b20afe0d349a8f80d991c05d32b4bc0dd target/wasm32-unknown-unknown/release/abstract_cw_staking.wasm
9aa96ae8ce798979aafcb2b6ccfac13d1bd66e105cd2787cb0c7c99378af0456 target/wasm32-unknown-unknown/release/abstract_dca_app.wasm
86f6b716ecfbd94c2e556b885df0715df60ab327d1c9c7d9d708f6ac879626eb target/wasm32-unknown-unknown/release/abstract_dex_adapter.wasm
89b014c4ba48d21cc3cbe0de8e00c13d651b68c2e6e88f8b249f2f541acd1f03 target/wasm32-unknown-unknown/release/abstract_etf.wasm
2c56759faa35207bc9e50a39bec0abbf34a95475813bea6bf1c80357c5991665 target/wasm32-unknown-unknown/release/abstract_tendermint_staking_adapter.wasm
21f7cb05c93fdec0398a69c3401344e00d21669bd91058f4cc5a2e1d0cfc8c30 target/wasm32-unknown-unknown/release/croncat_app.wasm
Binary file modified modules/artifacts/croncat_app.wasm
Binary file not shown.

0 comments on commit dbe5c53

Please sign in to comment.