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
FROM --platform=linux/amd64 rust:1.72 as base | |
# Install dependencies | |
RUN apt-get update && apt-get install -y \ | |
curl \ | |
wget \ | |
gcc \ | |
libclang-dev \ | |
ca-certificates \ | |
--no-install-recommends \ |
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
#!/usr/bin/env bash | |
if [[ $(arch) == "arm64" ]]; then | |
image="cosmwasm/workspace-optimizer-arm64" | |
else | |
image="cosmwasm/workspace-optimizer" | |
fi | |
# Optimized builds | |
docker run --rm -v "$(pwd)":/code \ |
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
pub struct Deployment<'a, Chain: BootEnvironment> { | |
pub chain: &'a Chain, | |
pub version: Version, | |
pub ans_host: AnsHost<Chain>, | |
pub version_control: VersionControl<Chain>, | |
pub os_factory: OSFactory<Chain>, | |
pub module_factory: ModuleFactory<Chain>, | |
pub ibc_client: IbcClient<Chain>, | |
} |
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
/// One of the scripts that deploys my contracts | |
/// Just look at the readability compared to a bash script! | |
pub async fn script() -> anyhow::Result<()> { | |
let (config, sender) = &get_configuration().await?; | |
let (memory, os_factory, version_control, module_factory) = | |
get_native_contracts(config, sender)?; | |
let (manager, proxy) = get_core_contracts(config, sender, None)?; | |
let (liquidity_interface, subscription) = get_add_ons(config, sender)?; | |
let (dex_api, staking_api) = get_apis(config, sender)?; |
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
#![allow(unused)] | |
use std::marker::PhantomData; | |
/// Goal: Create a generic interface to perform integration tests and live tests/deployments with minimal syntax. | |
/// | |
/// Why: This would give developers the ability to easily interact with their contracts in different environments without much syntax changes. | |
/// It also speeds up development by replacing time-consuming and error-prone bash/typescript deployment scripts and it would speed up | |
/// the testing process as the contract calls are much more concise and easy to read. | |
use serde::Serialize; |
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
fn main() { | |
println!("Hello World!") | |
} |