Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
155 changes: 84 additions & 71 deletions Cargo.lock

Large diffs are not rendered by default.

42 changes: 33 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ members = [
"lib/ssz-derive",
"lib/unionlabs",
"lib/unionlabs-primitives",
"lib/unionlabs-tuple",
"lib/unionlabs-height",
"lib/unionlabs-encoding",
# "lib/zktrie-rs",
"lib/galois-rpc",
Expand Down Expand Up @@ -316,9 +318,17 @@ module_name_repetitions = "allow" # dumb lint
[workspace.lints.rustdoc]
broken-intra-doc-links = "deny"

[profile.release]
lto = "thin"
opt-level = 3
[profile.wasm-release]
inherits ="release"
codegen-units = 1 # prefer efficiency to compile time
panic = "abort" # use simple panics
opt-level = "z" # optimize for size ("s" may also work)
strip = "none"
lto = true # link time optimization
debug = false # no debug data
rpath = false # no run-time search path
debug-assertions = false # prune debug assertions
incremental = false # no incremental builds

[workspace.dependencies]
access-managed = { path = "cosmwasm/access-managed", default-features = false }
Expand Down Expand Up @@ -424,7 +434,9 @@ ucs03-zkgmable = { path = "lib/ucs03-zkgmable", defau
ucs04 = { path = "lib/ucs04", default-features = false }
unionlabs = { path = "lib/unionlabs", default-features = false, features = ["proto"] } # TODO: Properly feature gate proto in unionlabs
unionlabs-encoding = { path = "lib/unionlabs-encoding", default-features = false }
unionlabs-height = { path = "lib/unionlabs-height", default-features = false }
unionlabs-primitives = { path = "lib/unionlabs-primitives", default-features = false }
unionlabs-tuple = { path = "lib/unionlabs-tuple", default-features = false }
upgradable = { path = "cosmwasm/upgradable", default-features = false }
voyager-client = { path = "lib/voyager-client", default-features = false }
voyager-core = { path = "lib/voyager-core", default-features = false }
Expand Down Expand Up @@ -453,12 +465,12 @@ wasm-client-type = { path = "lib/wasm-client-type", def

alloy = { version = "1.0", default-features = false }
alloy-primitives = { version = "1.1", default-features = false }
alloy-sol-types = { version = "1.1", default-features = true }
alloy-sol-types = { version = "1.1", default-features = false }
anyhow = { version = "1" }
axum = { version = "0.8", default-features = false }
base64 = { version = "0.22", default-features = false }
bcs = { version = "0.1.6", default-features = false }
bincode = { version = "2.0.1", default-features = false, features = ["std"] } # std is used by all dependants
bincode = { version = "2.0.1", default-features = false }
bip32 = { version = "0.5.3", default-features = false }
bitvec = { version = "1.0.1", default-features = false }
borsh = { version = "1.5.7", default-features = false }
Expand All @@ -467,7 +479,7 @@ chrono = { version = "0.4.41", default-features = false }
clap = { version = "4.5.39", default-features = false, features = ["std"] } # clap has a fake std feature that is required to be enabled by default
color-eyre = { version = "0.6.5", default-features = false }
cosmwasm-schema = { version = "2.2.2", default-features = false }
cosmwasm-std = { version = "2.2.2", default-features = false, features = ["std"] } # cosmwasm-std has a fake std feature that is requried to be enabled by default
cosmwasm-std = { version = "2.2.2", default-features = false } # cosmwasm-std has a fake std feature that is requried to be enabled by default
crossbeam-queue = { version = "0.3.12", default-features = false }
cw-orch = { version = "0.27.0", default-features = false }
cw-storage-plus = { version = "2.0.0", default-features = false }
Expand All @@ -477,19 +489,20 @@ dashmap = { version = "5.5.3", default-features = false }
derive_more = { version = "0.99.20", default-features = false }
ed25519-dalek = { version = "2.1.1", default-features = false }
either = { version = "1.15.0", default-features = false }
enumorph = { version = "0.1.2", default-features = false }
enumorph = { version = "0.1.3", default-features = false }
ethabi = { version = "18.0.0", default-features = false }
frame-support-procedural = { version = "30.0.6", default-features = false }
futures = { version = "0.3.31", default-features = false }
generic-array = { version = "0.14.7", default-features = false }
hex = { version = "0.4.3", default-features = false }
hex = { version = "0.4.3", default-features = false, features = ["alloc"] } # alloc is used by all dependants
hex-literal = { version = "0.4.1", default-features = false }
itertools = { version = "0.13" }
jsonrpsee = { version = "0.25.1", default-features = false }
lazy_static = { version = "1.5.0", default-features = false }
moka = { version = "0.12.10", default-features = false }
near-sdk = { version = "5.14.0", default-features = false }
num-bigint = { version = "0.4", default-features = false }
num-traits = { version = "0.2.19", default-features = false }
opentelemetry = { version = "0.29.1", default-features = false }
opentelemetry-otlp = { version = "0.29.0", default-features = false }
opentelemetry_sdk = { version = "0.29.0", default-features = false }
Expand All @@ -502,8 +515,9 @@ reqwest = { version = "0.11.27", default-features = false }
reth-ipc = { git = "https://github.com/paradigmxyz/reth", default-features = false }
ripemd = { version = "0.1.3", default-features = false }
rlp = { version = "0.5.2", default-features = false }
ruint = { version = "1.17.0", default-features = false }
schemars = { version = "0.8.22", default-features = false }
serde = { version = "1.0.219", default-features = false }
serde = { version = "1.0.219", default-features = false, features = ["alloc"] }
serde-json-wasm = { version = "1.0.1", default-features = false }
serde_json = { version = "1.0.140", default-features = false, features = ["alloc"] } # serde-json requires one of "std" or "alloc"
serde_with = { version = "3.12.0", default-features = false, features = ["macros"] }
Expand Down Expand Up @@ -540,3 +554,13 @@ serde-json-wasm = { git = "https://github.com/benluelo/serde-json-wasm", branch
# # https://aptos.dev/en/build/sdks/rust-sdk
# merlin = { git = "https://github.com/aptos-labs/merlin" }
# x25519-dalek = { git = "https://github.com/aptos-labs/x25519-dalek", branch = "zeroize_v1" }

# cosmwasm-schema = { path = "../../cosmwasm/cosmwasm/packages/schema" }
# cosmwasm-std = { path = "../../cosmwasm/cosmwasm/packages/std" }
# cw-storage-plus = { path = "../../cosmwasm/cw-storage-plus" }

cosmwasm-schema = { git = "https://github.com/benluelo/cosmwasm", branch = "union-v2.2.2" }
cosmwasm-std = { git = "https://github.com/benluelo/cosmwasm", branch = "union-v2.2.2" }
cw-storage-plus = { git = "https://github.com/benluelo/cw-storage-plus", branch = "union-v2.0.0" }

# enumorph = { path = "../../benluelo/enumorph" }
3 changes: 0 additions & 3 deletions cosmwasm/access-managed/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ repository = { workspace = true }
[lints]
workspace = true

[lib]
crate-type = ["cdylib", "rlib"]

[dependencies]
access-manager-types = { workspace = true }
bincode = { workspace = true, features = ["derive"] }
Expand Down
3 changes: 0 additions & 3 deletions cosmwasm/access-manager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ repository = { workspace = true }
[lints]
workspace = true

[lib]
crate-type = ["cdylib", "rlib"]

[dependencies]
access-manager-types = { workspace = true }
bincode = { workspace = true, features = ["derive"] }
Expand Down
5 changes: 2 additions & 3 deletions cosmwasm/cw-account/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,18 @@ license-file = { workspace = true }
publish = { workspace = true }
repository = { workspace = true }

[lib]
crate-type = ["cdylib", "rlib"]

[lints]
workspace = true

[dependencies]
bincode = { workspace = true, features = ["derive"] }
cfg-if = "1.0.4"
cosmwasm-std = { workspace = true, features = ["cosmwasm_2_0", "staking", "stargate"] } # enable all features so that any message is dispatchable
depolama = { workspace = true, features = ["iterator"] }
embed-commit = { workspace = true }
frissitheto = { workspace = true }
ibc-union-spec = { workspace = true, features = ["bincode"] }
mini-alloc = "1.0.0"
schemars = { workspace = true, optional = true, features = ["derive"] }
serde = { workspace = true, features = ["derive"] }
thiserror = { workspace = true }
Expand Down
25 changes: 23 additions & 2 deletions cosmwasm/cw-account/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
use std::num::NonZeroU32;
#![no_std]

extern crate alloc;

cfg_if::cfg_if! {
if #[cfg(not(feature = "library"))] {
#[global_allocator]
static ALLOC: mini_alloc::MiniAlloc = mini_alloc::MiniAlloc::INIT;

#[panic_handler]
fn panic(_info: &core::panic::PanicInfo) -> ! {
loop {}
}
}
}

use alloc::{
borrow::ToOwned,
string::{String, ToString},
vec::Vec,
};
use core::{iter::Iterator, num::NonZeroU32};

use cosmwasm_std::{
Addr, Binary, CosmosMsg, Deps, DepsMut, Env, Event, MessageInfo, Order, Response, StdError,
Expand Down Expand Up @@ -221,7 +242,7 @@ pub fn migrate(
let res = init(deps, init_msg);
Ok((res, None))
},
|_, _, _| Ok((Response::default(), None)),
|_, _, _| Ok((Response::new(), None)),
)
}

Expand Down
2 changes: 2 additions & 0 deletions cosmwasm/cw-account/src/msg.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use alloc::vec::Vec;

use cosmwasm_std::{Addr, CosmosMsg};
use depolama::Bytes;
use ibc_union_spec::ChannelId;
Expand Down
1 change: 1 addition & 0 deletions cosmwasm/cw-account/src/types.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use alloc::string::String;
use core::fmt;

use depolama::Bytes;
Expand Down
3 changes: 0 additions & 3 deletions cosmwasm/cw-escrow-vault/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ license-file = { workspace = true }
publish = { workspace = true }
repository = { workspace = true }

[lib]
crate-type = ["cdylib", "rlib"]

[lints]
workspace = true

Expand Down
3 changes: 0 additions & 3 deletions cosmwasm/cw-unionversal-token/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ license-file = { workspace = true }
publish = { workspace = true }
repository = { workspace = true }

[lib]
crate-type = ["cdylib", "rlib"]

[lints]
workspace = true

Expand Down
3 changes: 0 additions & 3 deletions cosmwasm/cw20-base/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ name = "cw20-base"
repository = "https://github.com/CosmWasm/cw-plus"
version = "0.0.0"

[lib]
crate-type = ["cdylib", "rlib"]

[features]
# use library feature to disable all instantiate/execute/query exports
library = []
Expand Down
3 changes: 0 additions & 3 deletions cosmwasm/cw20-token-minter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ license-file = { workspace = true }
publish = { workspace = true }
repository = { workspace = true }

[lib]
crate-type = ["cdylib", "rlib"]

[lints]
workspace = true

Expand Down
3 changes: 0 additions & 3 deletions cosmwasm/cw20-wrapped-tokenfactory/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ repository = { workspace = true }
[lints]
workspace = true

[lib]
crate-type = ["cdylib", "rlib"]

[features]
# use library feature to disable all instantiate/execute/query exports
library = []
Expand Down
3 changes: 0 additions & 3 deletions cosmwasm/ibc-union/app/ucs00-pingpong/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ repository = { workspace = true }
[lints]
workspace = true

[lib]
crate-type = ["cdylib", "rlib"]

[features]
library = []

Expand Down
16 changes: 8 additions & 8 deletions cosmwasm/ibc-union/app/ucs03-zkgm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,18 @@ repository = { workspace = true }
[lints]
workspace = true

[lib]
crate-type = ["cdylib", "rlib"]

[dependencies]
alloy-primitives = { workspace = true }
alloy-sol-types = { workspace = true }
cosmwasm-schema = { workspace = true }
cosmwasm-std = { workspace = true, features = ["cosmwasm_1_2", "cosmwasm_1_4", "staking"] }
cw-account = { workspace = true }
cosmwasm-schema = { workspace = true, optional = true }
cosmwasm-std = { workspace = true, features = ["cosmwasm_1_2", "cosmwasm_1_4", "staking", "panic_handler", "global_allocator"] }
cw-account = { workspace = true, features = ["library"] }
cw-storage-plus = { workspace = true }
embed-commit = { workspace = true }
frissitheto = { workspace = true }
ibc-union-msg = { workspace = true }
ibc-union-spec = { workspace = true, features = ["serde", "ethabi"] }
mini-alloc = "1.0.0"
schemars = { workspace = true, features = ["derive"], optional = true }
serde = { workspace = true, features = ["derive"] }
serde-json-wasm = { workspace = true }
Expand All @@ -34,7 +32,7 @@ token-factory-api = { workspace = true }
ucs03-solvable = { workspace = true }
ucs03-zkgm-token-minter-api = { workspace = true }
ucs03-zkgmable = { workspace = true }
unionlabs = { workspace = true, features = ["ethabi", "schemars"] }
unionlabs-primitives = { workspace = true }

[dev-dependencies]
cw-multi-test = { version = "=2.4", features = ["cosmwasm_2_2"] }
Expand All @@ -47,5 +45,7 @@ serde_json = { workspace = true }

[features]
default = []

library = []
schemars = ["dep:schemars", "ibc-union-msg/schemars"]

schemars = ["dep:schemars", "ibc-union-msg/schemars", "dep:cosmwasm-schema"]
2 changes: 2 additions & 0 deletions cosmwasm/ibc-union/app/ucs03-zkgm/src/com.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use alloc::vec::Vec;

use alloy_primitives::U256;
use ucs03_solvable::CwTokenOrderV2;

Expand Down
Loading
Loading