Skip to content

Commit

Permalink
Merge pull request #12 from SolarRepublic/final-integration
Browse files Browse the repository at this point in the history
Final integration
  • Loading branch information
blake-regalia authored Aug 5, 2024
2 parents d9abb00 + cb85125 commit 54fe07c
Show file tree
Hide file tree
Showing 24 changed files with 1,650 additions and 871 deletions.
11 changes: 0 additions & 11 deletions .cargo/config

This file was deleted.

1 change: 1 addition & 0 deletions .cargo/config
12 changes: 12 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[alias]
# Temporarily removed the backtraces feature from the unit-test run due to compilation errors in
# the cosmwasm-std package:
# cosmwasm-std = { git = "https://github.com/scrtlabs/cosmwasm", branch = "secret" }
# unit-test = "test --lib --features backtraces"
unit-test = "test --lib"
integration-test = "test --test integration"
schema = "run --example schema"

[features]
gas_tracking = []
gas_evaporation = []
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ overflow-checks = true
#default = ["debug-print"]
backtraces = ["cosmwasm-std/backtraces"]
gas_tracking = []
gas_evaporation = []

# debug-print = ["cosmwasm-std/debug-print"]
[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ _compile:
.PHONY: compile-integration _compile-integration
compile-integration: _compile-integration contract.wasm.gz
_compile-integration:
DWB_CAPACITY=8 BTBE_CAPACITY=8 RUSTFLAGS='-C link-arg=-s' cargo build --features "gas_tracking" --release --target wasm32-unknown-unknown
DWB_CAPACITY=64 BTBE_CAPACITY=64 RUSTFLAGS='-C link-arg=-s' cargo build --features "gas_tracking" --release --target wasm32-unknown-unknown
@# The following line is not necessary, may work only on linux (extra size optimization)
wasm-opt -Oz ./target/wasm32-unknown-unknown/release/*.wasm --all-features -o ./contract.wasm

Expand Down
10 changes: 5 additions & 5 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ use std::path::Path;
fn main() {
// config parameters
let dwb_capacity = env::var("DWB_CAPACITY").unwrap_or_else(|_| "64".to_string());
let btbe_capacity = env::var("BTBE_CAPACITY").unwrap_or_else(|_| "128".to_string());
let btbe_capacity = env::var("BTBE_CAPACITY").unwrap_or_else(|_| "64".to_string());

// path to destination config.rs file
let out_dir = env::var("OUT_DIR").expect("Missing OUT_DIR");
let out_dir = env::var("OUT_DIR").expect("Missing OUT_DIR");
let dest_path = Path::new(&out_dir).join("config.rs");

// write constants
let mut file = File::create(&dest_path).expect("Failed to write to config.rs");
write!(file, "pub const DWB_CAPACITY: u16 = {};\n", dwb_capacity).unwrap();
write!(file, "pub const BTBE_CAPACITY: u16 = {};\n", btbe_capacity).unwrap();

// monitor
println!("cargo:rerun-if-env-changed=DWB_CAPACITY");
println!("cargo:rerun-if-env-changed=BTBE_CAPACITY");
// monitor
println!("cargo:rerun-if-env-changed=DWB_CAPACITY");
println!("cargo:rerun-if-env-changed=BTBE_CAPACITY");
}
1 change: 0 additions & 1 deletion src/batch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,3 @@ pub struct BurnFromAction {
pub amount: Uint128,
pub memo: Option<String>,
}

Loading

0 comments on commit 54fe07c

Please sign in to comment.