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 rust-optimizer to v0.14.0 #93

Merged
merged 1 commit into from
Nov 3, 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
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
inputs:
toolchain:
description: 'Default Rust Toolchain'
default: "1.68.2"
default: "1.71.0"
required: true
type: string
target:
Expand All @@ -31,7 +31,7 @@ on:
type: string

env:
TOOLCHAIN: ${{ inputs.toolchain || '1.68.2' }}
TOOLCHAIN: ${{ inputs.toolchain || '1.71.0' }}
TARGET: ${{ inputs.target || 'wasm32-unknown-unknown' }}
REF: ${{ github.event_name == 'push' && github.ref || inputs.branch || 'main' }}
ID: ${{ inputs.id || 'scheduled' }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
fetch-depth: 1
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.68.2
toolchain: 1.71.0
components: clippy
profile: minimal
override: true
Expand All @@ -31,7 +31,7 @@ jobs:
fetch-depth: 1
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.68.2
toolchain: 1.71.0
components: rustfmt
profile: minimal
override: true
Expand All @@ -49,7 +49,7 @@ jobs:
fetch-depth: 1
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.68.2
toolchain: 1.71.0
profile: minimal
- run: cargo fetch --verbose
- run: cargo build
Expand Down
20 changes: 10 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ members = [
"contracts/subdaos/cwd-subdao-timelock-single",
"contracts/tokenomics/reserve",
"contracts/tokenomics/distribution",

"packages/*",
]

Expand Down
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ check_contracts:
@cosmwasm-check --available-capabilities iterator,staking,stargate,neutron artifacts/*.wasm

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

build: schema clippy fmt test compile check_contracts



4 changes: 0 additions & 4 deletions build_release.sh

This file was deleted.

2 changes: 1 addition & 1 deletion contracts/dao/cwd-core/.cargo/config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[alias]
wasm = "build --release --target wasm32-unknown-unknown"
unit-test = "test --lib"
schema = "run --example schema"
schema = "run --example cwd-core_schema"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[alias]
wasm = "build --release --target wasm32-unknown-unknown"
unit-test = "test --lib"
schema = "run --example schema"
schema = "run --example cwd-pre-propose-multiple_schema"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[alias]
wasm = "build --release --target wasm32-unknown-unknown"
unit-test = "test --lib"
schema = "run --example schema"
schema = "run --example cwd-pre-propose-single-overrule_schema"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[alias]
wasm = "build --release --target wasm32-unknown-unknown"
unit-test = "test --lib"
schema = "run --example schema"
schema = "run --example cwd-pre-propose-single_schema"
2 changes: 1 addition & 1 deletion contracts/dao/proposal/cwd-proposal-multiple/.cargo/config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[alias]
wasm = "build --release --target wasm32-unknown-unknown"
unit-test = "test --lib"
schema = "run --example schema"
schema = "run --example cwd-proposal-multiple_schema"
2 changes: 1 addition & 1 deletion contracts/dao/proposal/cwd-proposal-single/.cargo/config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[alias]
wasm = "build --release --target wasm32-unknown-unknown"
unit-test = "test --lib"
schema = "run --example schema"
schema = "run --example cwd-proposal-single_schema"
10 changes: 5 additions & 5 deletions contracts/dao/proposal/cwd-proposal-single/src/testing/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ fn test_proposal_close_after_expiry() {
assert!(matches!(err, ContractError::WrongCloseStatus {}));

// Expire the proposal. Now it should be closable.
app.update_block(|mut b| b.time = b.time.plus_seconds(604800));
app.update_block(|b| b.time = b.time.plus_seconds(604800));
close_proposal(&mut app, &proposal_module, CREATOR_ADDR, proposal_id);
let proposal = query_proposal(&app, &proposal_module, proposal_id);
assert_eq!(proposal.proposal.status, Status::Closed);
Expand Down Expand Up @@ -208,7 +208,7 @@ fn test_proposal_cant_close_after_expiry_is_passed() {
assert_eq!(proposal.proposal.status, Status::Open);

// Expire the proposal. This should pass it.
app.update_block(|mut b| b.time = b.time.plus_seconds(604800));
app.update_block(|b| b.time = b.time.plus_seconds(604800));
let proposal = query_proposal(&app, &proposal_module, proposal_id);
assert_eq!(proposal.proposal.status, Status::Passed);

Expand Down Expand Up @@ -244,7 +244,7 @@ fn test_execute_no_non_passed_execution() {
assert!(matches!(err, ContractError::NotPassed {}));

// Expire the proposal.
app.update_block(|mut b| b.time = b.time.plus_seconds(604800));
app.update_block(|b| b.time = b.time.plus_seconds(604800));
let err = execute_proposal_should_fail(&mut app, &proposal_module, CREATOR_ADDR, proposal_id);
assert!(matches!(err, ContractError::NotPassed {}));

Expand Down Expand Up @@ -586,7 +586,7 @@ fn test_min_voting_period_no_early_pass() {
let proposal_response = query_proposal(&app, &proposal_module, proposal_id);
assert_eq!(proposal_response.proposal.status, Status::Open);

app.update_block(|mut block| block.height += 10);
app.update_block(|block| block.height += 10);
let proposal_response = query_proposal(&app, &proposal_module, proposal_id);
assert_eq!(proposal_response.proposal.status, Status::Passed);
}
Expand Down Expand Up @@ -623,7 +623,7 @@ fn test_min_duration_same_as_proposal_duration() {
vote_on_proposal(&mut app, &proposal_module, "whale", proposal_id, Vote::Yes);
vote_on_proposal(&mut app, &proposal_module, "ekez", proposal_id, Vote::No);

app.update_block(|mut b| b.height += 100);
app.update_block(|b| b.height += 100);
let proposal_response = query_proposal(&app, &proposal_module, proposal_id);
assert_eq!(proposal_response.proposal.status, Status::Passed);
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/dao/voting/credits-vault/.cargo/config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[alias]
wasm = "build --release --target wasm32-unknown-unknown"
unit-test = "test --lib"
schema = "run --example schema"
schema = "run --example credits-vault_schema"
2 changes: 1 addition & 1 deletion contracts/dao/voting/investors-vesting-vault/.cargo/config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[alias]
wasm = "build --release --target wasm32-unknown-unknown"
unit-test = "test --lib"
schema = "run --example schema"
schema = "run --example investors-vesting-vault_schema"
2 changes: 1 addition & 1 deletion contracts/dao/voting/lockdrop-vault/.cargo/config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[alias]
wasm = "build --release --target wasm32-unknown-unknown"
unit-test = "test --lib"
schema = "run --example schema"
schema = "run --example lockdrop-vault_schema"
2 changes: 1 addition & 1 deletion contracts/dao/voting/neutron-vault/.cargo/config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[alias]
wasm = "build --release --target wasm32-unknown-unknown"
unit-test = "test --lib"
schema = "run --example schema"
schema = "run --example neutron-vault_schema"
2 changes: 1 addition & 1 deletion contracts/dao/voting/neutron-voting-registry/.cargo/config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[alias]
wasm = "build --release --target wasm32-unknown-unknown"
unit-test = "test --lib"
schema = "run --example schema"
schema = "run --example neutron-voting-registry_schema"
2 changes: 1 addition & 1 deletion contracts/dao/voting/vesting-lp-vault/.cargo/config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[alias]
wasm = "build --release --target wasm32-unknown-unknown"
unit-test = "test --lib"
schema = "run --example schema"
schema = "run --example vesting-lp-vault_schema"
2 changes: 1 addition & 1 deletion contracts/subdaos/cwd-subdao-core/.cargo/config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[alias]
wasm = "build --release --target wasm32-unknown-unknown"
unit-test = "test --lib"
schema = "run --example schema"
schema = "run --example cwd-subdao-core_schema"
2 changes: 1 addition & 1 deletion contracts/subdaos/cwd-subdao-timelock-single/.cargo/config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[alias]
wasm = "build --release --target wasm32-unknown-unknown"
unit-test = "test --lib"
schema = "run --example schema"
schema = "run --example cwd-subdao-timelock-single_schema"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[alias]
wasm = "build --release --target wasm32-unknown-unknown"
unit-test = "test --lib"
schema = "run --example schema"
schema = "run --example cwd-security-subdao-pre-propose_schema"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[alias]
wasm = "build --release --target wasm32-unknown-unknown"
unit-test = "test --lib"
schema = "run --example schema"
schema = "run --example cwd-subdao-pre-propose-single_schema"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[alias]
wasm = "build --release --target wasm32-unknown-unknown"
unit-test = "test --lib"
schema = "run --example schema"
schema = "run --example cwd-subdao-proposal-single_schema"
2 changes: 1 addition & 1 deletion contracts/tokenomics/distribution/.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 distribution_schema"
2 changes: 1 addition & 1 deletion contracts/tokenomics/reserve/.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 reserve_schema"
2 changes: 0 additions & 2 deletions contracts/tokenomics/reserve/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,3 @@ schemars = "0.8.8"
serde = {version = "1.0.103", default-features = false, features = ["derive"]}
thiserror = {version = "1.0"}
cw2 = "1.1.0"

[dev-dependencies]
4 changes: 2 additions & 2 deletions packages/cw-denom/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,8 @@ mod tests {
"1abc".to_string(), // Starts with non alphabetic character.
"abc~d".to_string(), // Contains invalid character.
"".to_string(), // Too short, also empty.
"🥵abc".to_string(), // Weird unicode start.
"ab:12🥵a".to_string(), // Weird unocide in non-head position.
"🥵abc".to_string(), // Weird unicode start.
"ab:12🥵a".to_string(), // Weird unocide in non-head position.
"ab,cd".to_string(), // Comma is not a valid seperator.
];

Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "1.68.2"
channel = "1.71.0"