-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update template to a new version (#87)
* fix state path * add local state to gitignore * update abstract * update documentation in deploy script * update readme * use new account id query * add comment * add wasm just action * commit wasms * fix adapter wasming * bump versions * re-compile wasms * rename template message generation * update app template to 0.17 * update wasms * formatting * wasms * Fix publish-schemas * formatting * recompile all * clean up testing logic * Publish to proper schemas dir * Publish 0.17.1 * Bump to 0.17.2 * osmosis cw-staking fix * bump to 0.18 * rebuild wasms * Update wasms * bump cw-orch to 0.15 * formatting * undo cw-orch bump to template * rebuilt wasms new weird error * Apps schema updates (#20) * bump version * updated schemas * fix publish-schema script * rebuild wasms * fix docs * aftermerge fixes * update wasms * Update optimizer and add wasms to gitattributes (#56) * update optimizer version * add wasms to top-level git attributes as binaries. * update the wasms * remove template_app wasm * Add/circle ci (#62) * add circe-ci config * run tickle on push for testing * add remote docker setup * add wasm-all-ci * add scripts to volume * commit lock file * Update WASM artifacts [skip ci] * try copy content of artifacts folder * remove all artifacts and re-run * Update WASM artifacts [skip ci] * add comments on tickle job * remove use of `just` and wasm modules as well * attempt to fix modules build * Update WASM artifacts for $GHA_Event [skip ci] * use pwd dirname for cp command * fix typo * add integrations and framework mounts * Update WASM artifacts for $GHA_Event [skip ci] * add debugging * remove container before mounting to ensure its fresh * restructure container mounting * print root dir * fix * cp to root of container * Update WASM artifacts for $GHA_Event [skip ci] * re-enable framework builds * allow manual trigger of wasm builds * update name of ci job * add coverage build for modules * formatting * do changes in modules dir * update coverage trigger * update equal statement * update url for coverage trigger * use gh-action meta instead of event * add gha_meta parameter * add gha_meta to wasm build command * make build manual for now * formatting * update actions * fix typo * fix typo * use gh action * fix typo * test new project * comment out meta comparison * test now * add github parameters * make coverage run conditional * test wasm builder * comment out if-else * update branch * set branch * only run for PRs that merge to main * add pass to give green CI * remove use of action trigger * concat url * add echa * update json format * cleanup * ignore cargo lock files * remove them from git * update to try out codecov * allow execution of modules cov script * add docker setup step * remove docker steps * add go install * Use on-liner for go install * don't install go in different terminal * test * update go install * test * try other syntax * try with source * touch bash.rs file * update go install * echo bashrc * bashrc -> bash_profile * add llvm-cov install * add install of build essentials * attempt with sudo * test * install libclang-dev * do one job to test thesis * try with larger runner * trigger ci * remove all-features flag from coverage run * uncomment all install commands --------- Co-authored-by: CircleCI <[email protected]> * Add version control to abstract app in instantiation (#63) * update version_control * small test * fix integrations * changelog update * fix clippy * fix clippy * rebuilt wasms * renames * rm all wasms --------- Co-authored-by: cyberhoward <[email protected]> Co-authored-by: CyberHoward <[email protected]> * ABS-166: Create accountability module (#47) * create initial structure * create initial state * create handlers and msg * create execute handler * update names update state * update handlers * add vote handler logic * fix handler compiler errors * refactor, cleanup * update execute msg, more refactors * create wasm test update toml * create wasm test and setup for e2e * create integration tests * add more tests * add friend test cases * add vote cases * updates * integrate adairrr feedback * update charge_penalty logic * rebuilt wasms * rebuilt wasms * fix tests and cleanup * clippy * integrate PR feedback * add impl methods on Vote and Friend * update tests * fix tests, refactor, cleanup * integrate Buckram feedback * add admin strike functionality and add challenge status * update charge_penalty logic * fix failing tests * fix flaxy test, add remainder attribute * update to Timestamp use EndKind enum for user input * add Timestamp to Checkin and vote_status * update contract logic * remodel state, fix new ownership errors * update charge penalty math and state * fix tests intergrate feedback * update composite key and field names * update test after composite keys change * remove redundant * update comments * update responses * add transfer msg * clippy * clippy more * run release_build * Update modules/contracts/apps/challenge/src/handlers/execute.rs Co-authored-by: Mykhailo Donchenko <[email protected]> * Update modules/contracts/apps/challenge/src/handlers/execute.rs Co-authored-by: Mykhailo Donchenko <[email protected]> * integrate buckram feedback * generate schema * bump osmosis-test-tube * integrate buckram123 feedback * bump chrono * bump chrono again * chrono to 0.4.23 * chrono to 0.4.27 * chrono to 0.4.23 * croncat version bump --------- Co-authored-by: Mykhailo Donchenko <[email protected]> Co-authored-by: Buckram <[email protected]> * Multiple stake targets for cw-staking adapter (#70) * astroport * kujira * osmosis progress * osmosis * wyndex progress * wyndex * fix error * deps fixes * fix tests * typos * fix compile * trait fixes * tests fix * rebuild wasms fix tests * update changelog * updated versions * updated versions * update justfile * update justfile * update just push * fix errors * update .gitignore * juno-local setup * Update app-template/example.env Co-authored-by: CyberHoward <[email protected]> * Update app-template/examples/test-local.rs Co-authored-by: CyberHoward <[email protected]> --------- Co-authored-by: cyberhoward <[email protected]> Co-authored-by: adairrr <[email protected]> Co-authored-by: CyberHoward <[email protected]> Co-authored-by: CircleCI <[email protected]> Co-authored-by: 0xmovses <[email protected]>
- Loading branch information
1 parent
cd81ad2
commit e90e662
Showing
14 changed files
with
192 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,4 @@ Cargo.lock | |
.vscode | ||
.idea | ||
|
||
typescript/node_modules | ||
state.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3849868a9cbe2fb82bc7375148784233506ac2e70ed424b33d20061c65ca8c6e app.wasm | ||
fd0a2c3713d9b714e278c5a10932960857fafcc560baf9661ea9eb8142ff90a8 app.wasm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2a2a39252752ccfff03ad02dca930b6f1831afefb001590fe980867658571b17 /target/wasm32-unknown-unknown/release/app.wasm | ||
401a106d68adbe57c4b83758e8b31f83dc404cb1bac4b64589c6df6b0a181ac9 /target/wasm32-unknown-unknown/release/app.wasm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,64 @@ | ||
//! Deploys the module to the Abstract platform by uploading it and registering it on the version control contract. | ||
//! | ||
//! This should be used for mainnet/testnet deployments in combination with our front-end at https://app.abstract.money | ||
//! | ||
//! **Requires you to have an account and namespace registered** | ||
//! | ||
//! The mnemonic used to register the module must be the same as the owner of the account that claimed the namespace. | ||
//! | ||
//! Read our docs to learn how: https://docs.abstract.money/4_get_started/5_account_creation.html | ||
//! | ||
//! ## Example | ||
//! | ||
//! ```bash | ||
//! $ just deploy uni-6 osmo-test-5 | ||
//! ``` | ||
|
||
use abstract_interface::AppDeployer; | ||
use app::{ | ||
contract::{APP_ID, APP_VERSION}, | ||
AppInterface, | ||
}; | ||
use clap::Parser; | ||
use cw_orch::{ | ||
anyhow, | ||
daemon::ChainInfo, | ||
prelude::{networks::parse_network, DaemonBuilder}, | ||
tokio::runtime::Runtime, | ||
}; | ||
|
||
use abstract_interface::AppDeployer; | ||
use app::{contract::APP_ID, AppInterface}; | ||
use semver::Version; | ||
|
||
const CONTRACT_VERSION: &str = env!("CARGO_PKG_VERSION"); | ||
fn deploy(networks: Vec<ChainInfo>) -> anyhow::Result<()> { | ||
// run for each requested network | ||
for network in networks { | ||
let version: Version = APP_VERSION.parse().unwrap(); | ||
let rt = Runtime::new()?; | ||
let chain = DaemonBuilder::default() | ||
.handle(rt.handle()) | ||
.chain(network) | ||
.build()?; | ||
|
||
fn main() -> anyhow::Result<()> { | ||
dotenv().ok(); | ||
env_logger::init(); | ||
let chain = parse_network("juno-1"); | ||
use dotenv::dotenv; | ||
let version: Version = CONTRACT_VERSION.parse().unwrap(); | ||
let rt = Runtime::new()?; | ||
let chain = DaemonBuilder::default() | ||
.chain(chain) | ||
.handle(rt.handle()) | ||
.build()?; | ||
let app = AppInterface::new(APP_ID, chain); | ||
let app = AppInterface::new(APP_ID, chain); | ||
app.deploy(version)?; | ||
|
||
app.deploy(version)?; | ||
// Create an account on our front-end to install the module! | ||
// https://app.abstract.money | ||
} | ||
Ok(()) | ||
} | ||
|
||
#[derive(Parser, Default, Debug)] | ||
#[command(author, version, about, long_about = None)] | ||
struct Arguments { | ||
/// Network Id to deploy on | ||
#[arg(short, long, value_delimiter = ' ', num_args = 1..)] | ||
network_ids: Vec<String>, | ||
} | ||
|
||
fn main() { | ||
dotenv::dotenv().ok(); | ||
env_logger::init(); | ||
let args = Arguments::parse(); | ||
let networks = args.network_ids.iter().map(|n| parse_network(n)).collect(); | ||
deploy(networks).unwrap(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
//! Deploys Abstract and the App module to a local Junod instance. See how to spin up a local chain here: https://docs.junonetwork.io/developer-guides/junod-local-dev-setup | ||
//! You can also start a juno container by running `just juno-local`. | ||
//! | ||
//! Ensure the local juno is running before executing this script. | ||
//! | ||
//! # Run | ||
//! | ||
//! `cargo run --example test-local` | ||
|
||
use abstract_core::objects::gov_type::GovernanceDetails; | ||
use abstract_interface::{Abstract, AppDeployer, VCExecFns}; | ||
use app::{ | ||
contract::{APP_ID, APP_VERSION}, | ||
msg::AppInstantiateMsg, | ||
AppInterface, | ||
}; | ||
use cw_orch::{ | ||
anyhow, | ||
deploy::Deploy, | ||
prelude::{networks::LOCAL_JUNO, Daemon, TxHandler}, | ||
tokio::runtime::Runtime, | ||
}; | ||
use semver::Version; | ||
use speculoos::{assert_that, prelude::BooleanAssertions}; | ||
|
||
const LOCAL_MNEMONIC: &str = "clip hire initial neck maid actor venue client foam budget lock catalog sweet steak waste crater broccoli pipe steak sister coyote moment obvious choose"; | ||
|
||
fn main() -> anyhow::Result<()> { | ||
dotenv::dotenv().ok(); | ||
env_logger::init(); | ||
|
||
let version: Version = APP_VERSION.parse().unwrap(); | ||
let runtime = Runtime::new()?; | ||
|
||
let daemon = Daemon::builder() | ||
.chain(LOCAL_JUNO) | ||
.mnemonic(LOCAL_MNEMONIC) | ||
.handle(runtime.handle()) | ||
.build() | ||
.unwrap(); | ||
// Deploy abstract locally | ||
let abstract_deployment = Abstract::deploy_on(daemon.clone(), daemon.sender().to_string())?; | ||
|
||
let app = AppInterface::new(APP_ID, daemon.clone()); | ||
|
||
// Create account | ||
let account = abstract_deployment.account_factory.create_default_account( | ||
GovernanceDetails::Monarchy { | ||
monarch: daemon.sender().into_string(), | ||
}, | ||
)?; | ||
|
||
// Claim namespace | ||
abstract_deployment | ||
.version_control | ||
.claim_namespace(account.id()?, "my-namespace".to_owned())?; | ||
|
||
// Deploy | ||
app.deploy(version)?; | ||
|
||
// Install app | ||
account.install_app(app, &AppInstantiateMsg {}, None)?; | ||
|
||
assert_that!(account.manager.is_module_installed(APP_ID).unwrap()).is_true(); | ||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters