Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: upgrade to neutron-sdk v0.7.0 #30

Merged
merged 2 commits into from
Nov 7, 2023
Merged
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
635 changes: 210 additions & 425 deletions Cargo.lock

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,27 @@
members = ["contracts/*"]

[profile.release]
opt-level = 3
debug = false
rpath = false
lto = true
debug-assertions = false
codegen-units = 1
panic = 'abort'
incremental = false
overflow-checks = true

[workspace.dependencies]
neutron-sdk = "0.7.0"
prost = "0.12.1"
prost-types = "0.12.1"
cosmos-sdk-proto = { version = "0.20.0", default-features = false }
cosmwasm-std = "1.4.1"
cw2 = "1.1.1"
cw-storage-plus = "1.1.0"
schemars = "0.8.15"
serde = { version = "1.0.189", default-features = false }
cosmwasm-schema = { version = "1.4.1", default-features = false }
serde-json-wasm = "1.0.0"
base64 = "0.21.4"
thiserror = "1.0.49"
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ fmt:
@cargo fmt -- --check

compile:
@./build_release.sh
@docker run --rm -v "$(CURDIR)":/code \
--mount type=volume,source="$(notdir $(CURDIR))_cache",target=/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
--platform linux/amd64 \
cosmwasm/workspace-optimizer:0.14.0

check_contracts:
@cargo install cosmwasm-check
Expand Down
11 changes: 0 additions & 11 deletions artifacts/checksums.txt

This file was deleted.

11 changes: 0 additions & 11 deletions artifacts/checksums_intermediate.txt

This file was deleted.

Binary file removed artifacts/ibc_transfer.wasm
Binary file not shown.
Binary file removed artifacts/neutron_interchain_txs.wasm
Binary file not shown.
4 changes: 0 additions & 4 deletions build_release.sh

This file was deleted.

2 changes: 1 addition & 1 deletion contracts/client_updater/.cargo/config
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ wasm = "build --release --target wasm32-unknown-unknown"
wasm-debug = "build --target wasm32-unknown-unknown"
unit-test = "test --lib --features backtraces"
integration-test = "test --test integration"
schema = "run --example schema"
schema = "run --example client_updater-schema"
26 changes: 8 additions & 18 deletions contracts/client_updater/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,19 @@ exclude = [
[lib]
crate-type = ["cdylib", "rlib"]

[profile.release]
opt-level = 3
debug = false
rpath = false
lto = true
debug-assertions = false
codegen-units = 1
panic = 'abort'
incremental = false
overflow-checks = true

[features]
# for quicker tests, cargo test --lib
# for more explicit tests, cargo test --features=backtraces
backtraces = ["cosmwasm-std/backtraces"]
library = []

[dependencies]
cosmwasm-std = { version = "1.3.1", features = ["staking"] }
cw2 = "1.1.0"
cw-storage-plus = { version = "1.1.0", features = ["iterator"]}
schemars = "0.8.10"
serde = { version = "1.0.180", default-features = false, features = ["derive"] }
neutron-sdk = { package = "neutron-sdk", version = "0.6.1" }
cosmwasm-std = { workspace = true }
cw2 = { workspace = true }
cw-storage-plus = { workspace = true }
schemars = { workspace = true }
serde = { workspace = true }
neutron-sdk = { workspace = true }

[dev-dependencies]
cosmwasm-schema = { version = "1.0.0", default-features = false }
cosmwasm-schema = { workspace = true }
2 changes: 1 addition & 1 deletion contracts/echo/.cargo/config
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ wasm = "build --release --target wasm32-unknown-unknown"
wasm-debug = "build --target wasm32-unknown-unknown"
unit-test = "test --lib --features backtraces"
integration-test = "test --test integration"
schema = "run --example schema"
schema = "run --example echo-schema"
20 changes: 4 additions & 16 deletions contracts/echo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,16 @@ exclude = [
[lib]
crate-type = ["cdylib", "rlib"]

[profile.release]
opt-level = 3
debug = false
rpath = false
lto = true
debug-assertions = false
codegen-units = 1
panic = 'abort'
incremental = false
overflow-checks = true

[features]
# for quicker tests, cargo test --lib
# for more explicit tests, cargo test --features=backtraces
backtraces = ["cosmwasm-std/backtraces"]
library = []

[dependencies]
cosmwasm-std = "1.3.1"
cw2 = "1.1.0"
schemars = "0.8.10"
serde = { version = "1.0.180", default-features = false, features = ["derive"] }
cosmwasm-std = { workspace = true }
schemars = { workspace = true }
serde = { workspace = true }

[dev-dependencies]
cosmwasm-schema = { version = "1.3.1", default-features = false }
cosmwasm-schema = { workspace = true }
2 changes: 1 addition & 1 deletion contracts/ibc_transfer/.cargo/config
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ wasm = "build --release --target wasm32-unknown-unknown"
wasm-debug = "build --target wasm32-unknown-unknown"
unit-test = "test --lib --features backtraces"
integration-test = "test --test integration"
schema = "run --example schema"
schema = "run --example ibc_transfer-schema"
28 changes: 8 additions & 20 deletions contracts/ibc_transfer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,20 @@ exclude = [
[lib]
crate-type = ["cdylib", "rlib"]

[profile.release]
opt-level = 3
debug = false
rpath = false
lto = true
debug-assertions = false
codegen-units = 1
panic = 'abort'
incremental = false
overflow-checks = true

[features]
# for quicker tests, cargo test --lib
# for more explicit tests, cargo test --features=backtraces
backtraces = ["cosmwasm-std/backtraces"]
library = []

[dependencies]
cosmwasm-std = { version = "1.3.1", features = ["staking", "stargate"] }
cw2 = "1.1.0"
schemars = "0.8.10"
serde = { version = "1.0.180", default-features = false, features = ["derive"] }
serde-json-wasm = { version = "0.5.1" }
cw-storage-plus = { version = "1.1.0", features = ["iterator"]}
neutron-sdk = { package = "neutron-sdk", version = "0.6.1" }
protobuf = { version = "3.2.0", features = ["with-bytes"] }
cosmwasm-std = { workspace = true }
cw2 = { workspace = true }
schemars = { workspace = true }
serde = { workspace = true }
serde-json-wasm = { workspace = true }
cw-storage-plus = { workspace = true }
neutron-sdk = { workspace = true }

[dev-dependencies]
cosmwasm-schema = { version = "1.3.1", default-features = false }
cosmwasm-schema = { workspace = true }
2 changes: 1 addition & 1 deletion contracts/msg_receiver/.cargo/config
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ wasm = "build --release --target wasm32-unknown-unknown"
wasm-debug = "build --target wasm32-unknown-unknown"
unit-test = "test --lib --features backtraces"
integration-test = "test --test integration"
schema = "run --example schema"
schema = "run --example msg_receiver-schema"
30 changes: 7 additions & 23 deletions contracts/msg_receiver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,35 +15,19 @@ exclude = [
[lib]
crate-type = ["cdylib", "rlib"]

[profile.release]
opt-level = 3
debug = false
rpath = false
lto = true
debug-assertions = false
codegen-units = 1
panic = 'abort'
incremental = false
overflow-checks = true

[features]
# for quicker tests, cargo test --lib
# for more explicit tests, cargo test --features=backtraces
backtraces = ["cosmwasm-std/backtraces"]
library = []

[dependencies]
cosmwasm-std = "1.3.1"
cw2 = "1.1.0"
schemars = "0.8.10"
cosmos-sdk-proto = { version = "0.19.0", default-features = false }
serde = { version = "1.0.180", default-features = false, features = ["derive"] }
serde-json-wasm = { version = "0.5.1" }
neutron-sdk = { package = "neutron-sdk", version = "0.6.1" }
cw-storage-plus = "1.1.0"
protobuf = { version = "3.2.0", features = ["with-bytes"] }
prost = "0.11"
prost-types = "0.11"
cosmwasm-std = { workspace = true, features = ["staking"] }
cw2 = { workspace = true }
schemars = { workspace = true }
serde = { workspace = true }
neutron-sdk = { workspace = true }
cw-storage-plus = { workspace = true }

[dev-dependencies]
cosmwasm-schema = { version = "1.3.1", default-features = false }
cosmwasm-schema = { workspace = true }
Binary file removed contracts/neutron_interchain_queries.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion contracts/neutron_interchain_queries/.cargo/config
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ wasm = "build --release --target wasm32-unknown-unknown"
wasm-debug = "build --target wasm32-unknown-unknown"
unit-test = "test --lib --features backtraces"
integration-test = "test --test integration"
schema = "run --example schema"
schema = "run --example neutron_interchain_queries-schema"
36 changes: 11 additions & 25 deletions contracts/neutron_interchain_queries/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,36 +15,22 @@ exclude = [
[lib]
crate-type = ["cdylib", "rlib"]

[profile.release]
opt-level = 3
debug = false
rpath = false
lto = true
debug-assertions = false
codegen-units = 1
panic = 'abort'
incremental = false
overflow-checks = true

[features]
# for more explicit tests, cargo test --features=backtraces
backtraces = ["cosmwasm-std/backtraces"]
library = []

[dependencies]
cosmwasm-std = { version = "1.3.1", features = ["staking"] }
cw2 = "1.1.0"
schemars = "0.8.10"
serde = { version = "1.0.180", default-features = false, features = ["derive"] }
neutron-sdk = { package = "neutron-sdk", version = "0.6.1" }
base64 = "0.21.2"
cosmos-sdk-proto = { version = "0.16.0", default-features = false }
cw-storage-plus = { version = "1.1.0", features = ["iterator"]}
prost = "0.11"
serde-json-wasm = "0.5.1"
cosmwasm-std = { workspace = true }
cw2 = { workspace = true }
schemars = { workspace = true }
serde = { workspace = true }
neutron-sdk = { workspace = true }
cosmos-sdk-proto = { workspace = true }
cw-storage-plus = { workspace = true }
prost = { workspace = true }
serde-json-wasm = { workspace = true }

[dev-dependencies]
cosmwasm-schema = { version = "1.3.1", default-features = false }



base64 = { workspace = true }
cosmwasm-schema = { workspace = true }
1 change: 0 additions & 1 deletion contracts/neutron_interchain_queries/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ use neutron_sdk::interchain_queries::v045::{
use neutron_sdk::sudo::msg::SudoMsg;
use neutron_sdk::{NeutronError, NeutronResult};
use prost::Message as ProstMessage;
use serde_json_wasm;

/// defines the incoming transfers limit to make a case of failed callback possible.
const MAX_ALLOWED_TRANSFER: u64 = 20000;
Expand Down
2 changes: 1 addition & 1 deletion contracts/neutron_interchain_txs/.cargo/config
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ wasm = "build --release --target wasm32-unknown-unknown"
wasm-debug = "build --target wasm32-unknown-unknown"
unit-test = "test --lib --features backtraces"
integration-test = "test --test integration"
schema = "run --example schema"
schema = "run --example neutron_interchain_txs-schema"
38 changes: 11 additions & 27 deletions contracts/neutron_interchain_txs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,38 +15,22 @@ exclude = [
[lib]
crate-type = ["cdylib", "rlib"]

[profile.release]
opt-level = 3
debug = false
rpath = false
lto = true
debug-assertions = false
codegen-units = 1
panic = 'abort'
incremental = false
overflow-checks = true

[features]
# for more explicit tests, cargo test --features=backtraces
backtraces = ["cosmwasm-std/backtraces"]
library = []

[dependencies]
cosmwasm-std = "1.3.1"
cw2 = "1.1.0"
schemars = "0.8.10"
serde = { version = "1.0.180", default-features = false, features = ["derive"] }
serde-json-wasm = { version = "0.5.1" }
cw-storage-plus = { version = "1.1.0", features = ["iterator"]}
cosmos-sdk-proto = { version = "0.16.0", default-features = false }
neutron-sdk = { package = "neutron-sdk", version = "0.6.1" }
base64 = "0.21.2"
protobuf = { version = "3.2.0", features = ["with-bytes"] }
prost = "0.11"
prost-types = "0.11"
bech32 = "0.9.0"
thiserror = { version = "1.0" }

cosmwasm-std = { workspace = true }
cw2 = { workspace = true }
schemars = { workspace = true }
serde = { workspace = true }
serde-json-wasm = { workspace = true }
cw-storage-plus = { workspace = true }
cosmos-sdk-proto = { workspace = true }
neutron-sdk = { workspace = true }
prost = { workspace = true }
prost-types = { workspace = true }

[dev-dependencies]
cosmwasm-schema = { version = "1.3.1", default-features = false }
cosmwasm-schema = { workspace = true }
2 changes: 1 addition & 1 deletion contracts/neutron_validator_test/.cargo/config
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ wasm = "build --release --target wasm32-unknown-unknown"
wasm-debug = "build --target wasm32-unknown-unknown"
unit-test = "test --lib --features backtraces"
integration-test = "test --test integration"
schema = "run --example schema"
schema = "run --example neutron_validator_test-schema"
Loading
Loading