Skip to content

Commit 1856990

Browse files
committed
Merge branch 'main' into tkulik/update_wasmer
2 parents 4e2c27b + 82f3567 commit 1856990

File tree

140 files changed

+3359
-496
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+3359
-496
lines changed

.circleci/config.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ workflows:
8080
- contract_ibc_callbacks
8181
- contract_ibc_reflect
8282
- contract_ibc_reflect_send
83+
- contract_nested_contracts
8384
- contract_queue
8485
- contract_reflect
8586
- contract_staking
@@ -763,6 +764,34 @@ jobs:
763764
- target/wasm32-unknown-unknown/release/deps
764765
key: cargocache-v2-contract_floaty-rust:1.74-{{ checksum "Cargo.lock" }}
765766

767+
contract_nested_contracts:
768+
docker:
769+
- image: rust:1.75
770+
environment:
771+
RUST_BACKTRACE: 1
772+
working_directory: ~/cosmwasm/contracts/nested-contracts
773+
steps:
774+
- checkout:
775+
path: ~/cosmwasm
776+
- run:
777+
name: Version information
778+
command: rustc --version; cargo --version; rustup --version
779+
- restore_cache:
780+
keys:
781+
- cargocache-v2-contract_nested_contracts-rust:1.75-{{ checksum "Cargo.lock" }}
782+
- check_contract:
783+
min_version: "1.4"
784+
- save_cache:
785+
paths:
786+
- /usr/local/cargo/registry
787+
- target/debug/.fingerprint
788+
- target/debug/build
789+
- target/debug/deps
790+
- target/wasm32-unknown-unknown/release/.fingerprint
791+
- target/wasm32-unknown-unknown/release/build
792+
- target/wasm32-unknown-unknown/release/deps
793+
key: cargocache-v2-contract_nested_contracts-rust:1.75-{{ checksum "Cargo.lock" }}
794+
766795
contract_queue:
767796
docker:
768797
- image: rust:1.74

.github/workflows/autofix.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,17 @@ jobs:
4040

4141
# Get latest version from https://autofix.ci/setup
4242
- uses: autofix-ci/action@dd55f44df8f7cdb7a6bf74c78677eb8acd40cd0a
43+
44+
autofix-toml:
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/checkout@v4
48+
- name: Install taplo
49+
run: |
50+
curl -fsSL https://github.com/tamasfe/taplo/releases/latest/download/taplo-full-linux-x86_64.gz \
51+
| gzip -d - | install -m 755 /dev/stdin /usr/local/bin/taplo
52+
- run: |
53+
taplo fmt
54+
55+
# Get latest version from https://autofix.ci/setup
56+
- uses: autofix-ci/action@dd55f44df8f7cdb7a6bf74c78677eb8acd40cd0a

.github/workflows/toml.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: "TOML checks"
2+
3+
on:
4+
merge_group:
5+
pull_request:
6+
push:
7+
branches:
8+
- main
9+
workflow_dispatch:
10+
11+
jobs:
12+
fmt-check:
13+
name: "Formatting"
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Install taplo
18+
run: |
19+
curl -fsSL https://github.com/tamasfe/taplo/releases/latest/download/taplo-full-linux-x86_64.gz \
20+
| gzip -d - | install -m 755 /dev/stdin /usr/local/bin/taplo
21+
- run: |
22+
taplo fmt
23+
CHANGES_IN_REPO=$(git status --porcelain)
24+
if [[ -n "$CHANGES_IN_REPO" ]]; then
25+
exit 1
26+
fi

.github/workflows/typo-check.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Check for typos
2+
3+
on:
4+
merge_group:
5+
pull_request:
6+
push:
7+
branches:
8+
- main
9+
workflow_dispatch:
10+
11+
jobs:
12+
check-typos:
13+
name: "Spell-check repository source"
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
- name: Run spell-check
19+
uses: crate-ci/typos@master

.taplo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[formatting]
2+
indent_string = " "
3+
reorder_arrays = true

CHANGELOG-pre1.0.0.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ and this project adheres to
738738
with this change, the `backtraces` feature now requires Rust nightly.
739739
- Rename `StdError::ParseErr::source` to `StdError::ParseErr::source_type` and
740740
`StdError::SerializeErr::target` to `StdError::SerializeErr::target_type` to
741-
work around speacial treatment of the field name `source` in thiserror.
741+
work around special treatment of the field name `source` in thiserror.
742742
- Rename `Extern` to `Deps` to unify naming.
743743
- Simplify ownership of calling `handle`, etc. with `Deps` and `DepsMut` struct
744744
that just contains references (`DepsMut` has `&mut Storage` otherwise the
@@ -1259,7 +1259,7 @@ https://github.com/CosmWasm/cosmwasm/issues/451).
12591259
for mock storage and copying a stateless bridge for the external storage,
12601260
which are different semantics.
12611261
- Remove public `cosmwasm::imports::dependencies`. A user of this library does
1262-
not need to call this explicitely. Dependencies are created internally and
1262+
not need to call this explicitly. Dependencies are created internally and
12631263
passed as an argument in `exports::do_init`, `exports::do_handle` and
12641264
`exports::do_query`.
12651265
- Make `ExternalStorage` not `Clone`able anymore. This does not copy any data,

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ and this project adheres to
4646
- cosmwasm-vm: Let `mock_env` return a contract address that is valid bech32 and
4747
uses the same bech32 prefix as `MockApi`; Change `MOCK_CONTRACT_ADDR` value to
4848
match the contract address from `mock_env`. ([#2211])
49+
- cosmwasm-derive: Automatically detect whether the package is a dependency or
50+
the primary package, only expanding entrypoints for the primary package. This
51+
effectively deprecates the usage of the `library` feature pattern. ([#2246])
4952
- cosmwasm-std: Deprecate `BankQuery::AllBalances` and `IbcQuery::ListChannels`.
5053
Both are inherently problematic to use because the returned entries are
5154
unbounded. ([#2247])
@@ -54,6 +57,7 @@ and this project adheres to
5457

5558
[#2118]: https://github.com/CosmWasm/cosmwasm/pull/2118
5659
[#2211]: https://github.com/CosmWasm/cosmwasm/issues/2211
60+
[#2246]: https://github.com/CosmWasm/cosmwasm/pull/2246
5761
[#2247]: https://github.com/CosmWasm/cosmwasm/pull/2247
5862
[#2255]: https://github.com/CosmWasm/cosmwasm/pull/2255
5963

@@ -771,7 +775,7 @@ and this project adheres to
771775
- all: Bump a few dependency versions to make the codebase compile with
772776
`-Zminimal-versions` ([#1465]).
773777
- cosmwasm-profiler: Package was removed 🪦. It served its job showing us that
774-
we cannot properly measure different runtimes for differet Wasm opcodes.
778+
we cannot properly measure different runtimes for different Wasm opcodes.
775779
- cosmwasm-schema: schema generation is now locked to produce strictly
776780
`draft-07` schemas
777781
- cosmwasm-schema: `QueryResponses` derive now sets the `JsonSchema` trait bound

Cargo.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
members = ["packages/*"]
33
exclude = ["contracts"]
44

5-
# Resolver has to be set explicitely in workspaces
5+
# Resolver has to be set explicitly in workspaces
66
# due to https://github.com/rust-lang/cargo/issues/9956
77
resolver = "2"
88

@@ -11,7 +11,10 @@ version = "2.1.3"
1111

1212
[workspace.dependencies]
1313
schemars = "0.8.4"
14-
serde = { version = "1.0.192", default-features = false, features = ["derive", "alloc"] }
14+
serde = { version = "1.0.192", default-features = false, features = [
15+
"alloc",
16+
"derive",
17+
] }
1518

1619
[workspace.metadata.release]
1720
shared-version = true

IBC.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub enum IbcMsg {
2525
/// We cannot select the port_id, this is whatever the local chain has bound the ibctransfer
2626
/// module to.
2727
Transfer {
28-
/// exisiting channel to send the tokens over
28+
/// existing channel to send the tokens over
2929
channel_id: String,
3030
/// address on the remote chain to receive these tokens
3131
to_address: String,
@@ -385,7 +385,7 @@ produced 3 suggestions on how to handle errors and rollbacks _inside
385385
`submessage` and capture the error. This approach requires we use _exactly
386386
one_ submessage. If we have multiple, we may commit #1 and rollback #2 (see
387387
example 3 for that case). The main point is moving `messages` to
388-
`submessages` and reformating the error in `reply`. Note that if you set the
388+
`submessages` and reformatting the error in `reply`. Note that if you set the
389389
`Response.data` field in `reply` it will override the acknowledgement
390390
returned from the parent call. (See
391391
[bottom of reply section](./SEMANTICS.md#handling-the-reply)). You can see a

MIGRATING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1342,7 +1342,7 @@ arbitrary ones.
13421342

13431343
- The block time in `env.block.time` is now a `Timestamp` which stores
13441344
nanosecond precision. `env.block.time_nanos` was removed. If you need the
1345-
compnents as before, use
1345+
components as before, use
13461346
```rust
13471347
let seconds = env.block.time.nanos() / 1_000_000_000;
13481348
let nsecs = env.block.time.nanos() % 1_000_000_000;
@@ -1456,7 +1456,7 @@ arbitrary ones.
14561456
- Contracts now support any custom error type `E: ToString + From<StdError>`.
14571457
Previously this has been `StdError`, which you can still use. However, you can
14581458
now create a much more structured error experience for your unit tests that
1459-
handels exactly the error cases of your contract. In order to get a convenient
1459+
handles exactly the error cases of your contract. In order to get a convenient
14601460
implementation for `ToString` and `From<StdError>`, we use the crate
14611461
[thiserror](https://crates.io/crates/thiserror), which needs to be added to
14621462
the contracts dependencies in `Cargo.toml`. To create the custom error, create
@@ -1492,8 +1492,8 @@ arbitrary ones.
14921492
- `fn handle`: `Result<HandleResponse, MyCustomError>`,
14931493
- `fn query`: `Result<Binary, MyCustomError>`.
14941494

1495-
If one of your funtions does not use the custom error, you can continue to use
1496-
`StdError` as before. I.e. you can have `handle` returning
1495+
If one of your functions does not use the custom error, you can continue to
1496+
use `StdError` as before. I.e. you can have `handle` returning
14971497
`Result<HandleResponse, MyCustomError>` and `query` returning
14981498
`StdResult<Binary>`.
14991499

0 commit comments

Comments
 (0)