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

Merging 0.12 #39

Merged
merged 357 commits into from
Jan 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
357 commits
Select commit Hold shift + click to select a range
74ce3e7
Upgrade parity-wasm
webmaster128 Sep 29, 2020
2136b9c
Update contract lock files
webmaster128 Sep 29, 2020
ce9b1d4
Use the same contract version for borner as the rest of the contracts
webmaster128 Sep 29, 2020
9405304
Merge pull request #550 from CosmWasm/upgrade-parity-wasm
webmaster128 Sep 29, 2020
2648dd0
Set version: 0.11.0-alpha3
webmaster128 Sep 29, 2020
034d735
Implement From<Binary> for Vec<u8>
webmaster128 Oct 1, 2020
f9a29fc
Implement From<CanonicalAddr> for Vec<u8>
webmaster128 Oct 1, 2020
c997aa5
Add missing newlines
webmaster128 Oct 1, 2020
0674ae1
Add Binary::into_vec and CanonicalAddr::into_vec
webmaster128 Oct 1, 2020
3ab3fbd
Remove #[inline] attributes
webmaster128 Oct 1, 2020
4553dc3
Merge pull request #554 from CosmWasm/convert-into-vec
webmaster128 Oct 1, 2020
8fae0cf
Add riffle_shuffle
webmaster128 Oct 1, 2020
0db5945
Remove canonical_length parameter
webmaster128 Oct 1, 2020
2f5b15e
Remove the ability to change canonical length in VM's MockApi
webmaster128 Oct 1, 2020
89b69ef
Use riffle_shuffle in std's MockApi
webmaster128 Oct 1, 2020
e65ba57
Add simulation script
webmaster128 Oct 1, 2020
5deb42f
Use riffle_shuffle in vm's MockApi
webmaster128 Oct 1, 2020
1f87755
Add left rotate by digit sum
webmaster128 Oct 1, 2020
7a4bb61
Add CHANGELOG/MIGRATING entries
webmaster128 Oct 5, 2020
6463b20
Update testing contract
webmaster128 Oct 5, 2020
6bcc060
Merge pull request #556 from CosmWasm/riffle_shuffle
mergify[bot] Oct 5, 2020
429f314
Move MessageInfo outside of Env
ethanfrey Oct 4, 2020
e0b1064
Update do_init/handle/... exports
ethanfrey Oct 4, 2020
29bccab
Update entry_points macro
ethanfrey Oct 4, 2020
e014b08
Update burner contract
ethanfrey Oct 4, 2020
d0b2e07
Fix VM calls for extra arg, burner integration tests pass
ethanfrey Oct 4, 2020
8de522f
Hackatom builds properly
ethanfrey Oct 4, 2020
e98ce91
Fix tests for hackatom
ethanfrey Oct 4, 2020
e7f03df
Fixed all tests in vm package
ethanfrey Oct 4, 2020
a298cff
Updated queue contract
ethanfrey Oct 4, 2020
7e408cb
Fix various test failures from CI
ethanfrey Oct 4, 2020
21b9b16
Update hackatom contract
ethanfrey Oct 4, 2020
92b11a3
Fix hackatom singlepass
ethanfrey Oct 4, 2020
d479948
Update staking contract
ethanfrey Oct 4, 2020
cba6e0e
Fixed last test
ethanfrey Oct 4, 2020
484fd5c
Update CHANGELOG and README
ethanfrey Oct 4, 2020
7844a38
Cleanup from PR review
ethanfrey Oct 5, 2020
ab0a83c
Rebuild test contract, update gas prices
ethanfrey Oct 5, 2020
0e6db89
Fixed up merge conflict
ethanfrey Oct 5, 2020
0bd735c
Merge pull request #560 from CosmWasm/add-env-to-query
ethanfrey Oct 5, 2020
8194b34
Set version: 0.11.0-alpha4
webmaster128 Oct 5, 2020
cf4f2e8
Remove unnecessary 'static restriction from Storage and Querier
webmaster128 Oct 6, 2020
dad5af9
Merge pull request #563 from CosmWasm/storage-lifetime
webmaster128 Oct 6, 2020
73ec65c
Remove obsolete Instance::from_wasmer
webmaster128 Oct 6, 2020
278c598
Merge pull request #564 from CosmWasm/rm-from_wasmer
webmaster128 Oct 6, 2020
07a819a
Add Querier helpers query_wasm_{smart,raw}
ethanfrey Oct 7, 2020
d19e72e
Add special raw query to reflect contract
ethanfrey Oct 7, 2020
c71cb41
Simplify RawResponse
webmaster128 Oct 7, 2020
de233bf
Sort imports in traits.rs
webmaster128 Oct 7, 2020
5664324
Merge pull request #568 from CosmWasm/fix-raw-query-simon
ethanfrey Oct 7, 2020
af156ac
Merge pull request #567 from CosmWasm/fix-raw-query
ethanfrey Oct 7, 2020
7df930a
Add Deref to some common types
ethanfrey Oct 8, 2020
583e896
Test to show from_slice and from_binary both work on Binary now
ethanfrey Oct 8, 2020
09b93e7
Use &canonical instead of canonical.as_slice() some places
ethanfrey Oct 8, 2020
3156dcb
Delegate is_empty, len, into_vec into Deref target
ethanfrey Oct 8, 2020
2ff753d
Sort imports
webmaster128 Oct 8, 2020
4394cba
Implement PartialEq<str> for HumanAddr
webmaster128 Oct 8, 2020
c9ae217
Document and test impl Deref for HumanAddr
webmaster128 Oct 8, 2020
9ee5337
Document and test impl Deref for CanonicalAddr
webmaster128 Oct 8, 2020
d91b2f5
Document and test impl Deref for Binary
webmaster128 Oct 8, 2020
b3168af
Set version: 0.11.0
webmaster128 Oct 8, 2020
9d4392b
Test Hash and HashSet for HumanAddr
webmaster128 Oct 10, 2020
dfa80e0
Allow using Binary in HashSet and HashMap
webmaster128 Oct 11, 2020
6b3ccc6
Allow using CanonicalAddr in HashSet and HashMap
webmaster128 Oct 10, 2020
9cb3fbc
Merge pull request #574 from CosmWasm/HumanAddr-hashset
ethanfrey Oct 11, 2020
d71a139
Add a Sum helper for Uint128
ethanfrey Oct 10, 2020
012fd74
Sort imports
webmaster128 Oct 11, 2020
8526ae6
Implement Add for Uint128 with reference right hand side
webmaster128 Oct 11, 2020
51d36e2
Implement AddAssign with reference rhs for Uint128
webmaster128 Oct 11, 2020
713879c
Use checked_sub to implement Sub for Uint128
webmaster128 Oct 11, 2020
1e41483
Implement Sub for Uint128 with reference rhs
webmaster128 Oct 11, 2020
b423d86
Implement sum with reference rhs using add
webmaster128 Oct 11, 2020
694df98
Cleanup error result test
webmaster128 Oct 11, 2020
1ef59d4
Make source type in Sum explicit
webmaster128 Oct 11, 2020
c8021be
Add CHANGELOG entries
webmaster128 Oct 11, 2020
3ee999e
Merge pull request #575 from CosmWasm/add-sum-helpers-simon
mergify[bot] Oct 11, 2020
df5fb0d
Pull out fn deserialize
webmaster128 Oct 11, 2020
b1d2ebf
Test some properties of deserialized module
webmaster128 Oct 12, 2020
bd6592c
Merge pull request #578 from CosmWasm/improve-deserialize-testing
webmaster128 Oct 12, 2020
4efc446
Fix module name: compatability -> compatibility
webmaster128 Oct 12, 2020
ef4b6f6
Merge pull request #579 from CosmWasm/rename-compatability
webmaster128 Oct 12, 2020
3f7cd30
Set version: 0.11.1
webmaster128 Oct 12, 2020
0aff2e5
Add FfiError::IteratorDoesNotExist
webmaster128 Oct 7, 2020
d03b631
Replace range with scan/next in Storage trait
webmaster128 Oct 6, 2020
a4fd4f2
Update MockStorage to new trait
webmaster128 Oct 6, 2020
eef20f9
Use with_storage_from_context in do_next
webmaster128 Oct 6, 2020
58c5c06
Remove with_iterator_from_context
webmaster128 Oct 6, 2020
ef122b8
Remove VmError::IteratorDoesNotExist
webmaster128 Oct 6, 2020
1073b51
Remove iterators from ContextData
webmaster128 Oct 6, 2020
ea6bc62
Implement AddAssign for GasInfo
webmaster128 Oct 6, 2020
740c5ee
Handle errors in self.next perperly
webmaster128 Oct 7, 2020
5cfc608
Adapt burner integration tests to new storage
webmaster128 Oct 7, 2020
df84ad1
Add note on iterator IDs
webmaster128 Oct 7, 2020
2e6d3ac
Remove StorageIterator and MockIterator
webmaster128 Oct 7, 2020
747a890
Add CHANGELOG entries
webmaster128 Oct 12, 2020
30489a6
Remove outdated doc comment
webmaster128 Oct 12, 2020
36ca9e7
Merge pull request #566 from CosmWasm/replace-range
mergify[bot] Oct 12, 2020
f6a1c2b
Remove StdError::Unauthorized
webmaster128 Oct 12, 2020
1cc2276
Merge pull request #580 from CosmWasm/rm-unauthorized
webmaster128 Oct 12, 2020
9b59e51
Use thiserror instead of snafu in std
webmaster128 Oct 12, 2020
d2c07fa
Roll out all features in CI testing, remove backtraces feature
webmaster128 Sep 22, 2020
d0a1a8e
Convert FfiError to thiserror
webmaster128 Oct 12, 2020
2307130
Convert CommunicationError from snafu to thiserror
webmaster128 Oct 12, 2020
ec95c19
Convert RegionValidationError from snafu to thiserror
webmaster128 Oct 12, 2020
916d8b6
Convert VmError from snafu to thiserror
webmaster128 Oct 12, 2020
74e4e17
Remove snafu dependency from storage
webmaster128 Oct 12, 2020
4386c47
Remove the snafu dependency from cosmwasm-vm
webmaster128 Oct 12, 2020
3919dce
Merge pull request #537 from CosmWasm/use-thiserror
webmaster128 Oct 13, 2020
cd358da
Create new contract_0.12.wasm development contract
webmaster128 Oct 15, 2020
f2ffb1f
Upgrade to rust-optimizer:0.10.4 for all dev contracts
webmaster128 Oct 15, 2020
a12fdc4
Merge pull request #581 from CosmWasm/new-contract-builder
webmaster128 Oct 15, 2020
78f84ef
Implement From<std::str::Utf8Error> and From<std::string::FromUtf8Error>
webmaster128 Oct 19, 2020
8de794f
Add a few more explicit result types
webmaster128 Oct 19, 2020
aacc2ea
Merge pull request #587 from CosmWasm/from-utf8-error
webmaster128 Oct 19, 2020
61496b2
Rename `Extern` to `Deps`
webmaster128 Oct 19, 2020
eab6008
Merge pull request #589 from CosmWasm/rename-to-deps
webmaster128 Oct 19, 2020
82392d7
Generalize denom argument in Coin constructors
webmaster128 Oct 22, 2020
cdedac9
Remove change_querier
webmaster128 Oct 26, 2020
719ab3f
Merge pull request #595 from CosmWasm/remove-change_querier
ethanfrey Oct 26, 2020
4ddabec
Add ExternMut ExternRef types
ethanfrey Oct 19, 2020
0da50ec
Update hackatom with ExternRef ExternMut
ethanfrey Oct 19, 2020
6bc3b80
Remove some generic type parameters
ethanfrey Oct 24, 2020
a9d33a1
Simplify hackatom contract
ethanfrey Oct 24, 2020
097456b
Remove Q generic from ExternRef/Mut
ethanfrey Oct 24, 2020
287fc88
Update entry points for hackatom, integration tests pass
ethanfrey Oct 24, 2020
2042c3e
Port burner contract
ethanfrey Oct 24, 2020
861bdd4
Port queue
ethanfrey Oct 24, 2020
6b0252d
Start updating storage-bucket
ethanfrey Oct 24, 2020
d4dc327
Bucket works with dyn trait object
ethanfrey Oct 24, 2020
3f8ec8c
Singleton and Sequence work with trait objects
ethanfrey Oct 24, 2020
0e107e0
Update reflect contract
ethanfrey Oct 24, 2020
a783c8a
Fixed iterator support in bucket
ethanfrey Oct 24, 2020
d638801
Update staking contract
ethanfrey Oct 24, 2020
90ea2b0
Improve naming and docs for &dyn ReadonlyStorage cast
webmaster128 Oct 26, 2020
5a3f0d1
Format migrating.md
ethanfrey Oct 26, 2020
d0eed39
Rename Deps* types, add Copy to DepsRef
ethanfrey Oct 26, 2020
5e24955
Update contracts for renaming
ethanfrey Oct 26, 2020
a7efaa3
Rename Querier types, for cleaner public Api
ethanfrey Oct 26, 2020
414bccb
Revert "Rename Querier types, for cleaner public Api"
ethanfrey Oct 26, 2020
b38e790
Deps/DepsRef -> DepsMut/Deps
ethanfrey Oct 26, 2020
9197da1
Merge pull request #596 from CosmWasm/generalize-denom-argument
webmaster128 Oct 26, 2020
7f65404
Implement PartialEq between Binary and Vec<u8>/&[u8]
webmaster128 Oct 26, 2020
5d31686
Add missing PartialEq implementations between HumanAddr and str/&str
webmaster128 Oct 22, 2020
0e4282e
Compare Binary and Vec<u8> in hackatom
webmaster128 Oct 26, 2020
15174d3
Merge pull request #597 from CosmWasm/partial_eq_binary_vector
webmaster128 Oct 26, 2020
227848b
Rename module encoding -> binary
webmaster128 Oct 22, 2020
20d39df
Sort imports
webmaster128 Oct 22, 2020
8dcd307
Add Binary::to_array
webmaster128 Oct 26, 2020
a2b022d
Document length limit of Binary::to_array
webmaster128 Oct 26, 2020
4f480a9
Ensure Binary::to_array cannot be used with Vec<u8>
webmaster128 Oct 26, 2020
068cc37
Update vm test contract, fix typo
ethanfrey Oct 26, 2020
fe8557e
Merge pull request #586 from CosmWasm/extern-ref-types
mergify[bot] Oct 26, 2020
bb49a8d
Let Binary::to_array compile with Rust lower than 1.47
webmaster128 Oct 26, 2020
8a42dab
Remove TypedStorage and PrefixedStorage from the cosmwasm-storage
ethanfrey Oct 26, 2020
1d2c74e
Merge pull request #598 from CosmWasm/binary-to-array
webmaster128 Oct 26, 2020
74f0a81
Remove ReadonlyStorage from cosmwasm-std and -storage
ethanfrey Oct 26, 2020
51f9c54
Remove ReadonlyStorage from sample contracts
ethanfrey Oct 26, 2020
5b91c6f
Update CHANGELOG and MIGRATING
ethanfrey Oct 26, 2020
c044d80
Set version: 0.11.2
webmaster128 Oct 26, 2020
7be0fa7
Bring back PrefixedStorage/ReadonlyPrefixedStorageage
webmaster128 Oct 23, 2020
e8778c4
Merge pull request #600 from CosmWasm/remove-unused-storage-bring-back
webmaster128 Oct 27, 2020
4a10c17
Merge pull request #599 from CosmWasm/remove-unused-storage
webmaster128 Oct 27, 2020
ed220a9
Set publish = false consistently
webmaster128 Oct 27, 2020
fcd2e6f
Add Debug support for MemoryStorage
webmaster128 Oct 23, 2020
4dfa141
Merge pull request #601 from CosmWasm/debug-memory-storage
mergify[bot] Oct 27, 2020
e0614bb
Merge branch '0.11'
webmaster128 Oct 27, 2020
0716068
Pull out InstanceOptions
webmaster128 Oct 29, 2020
de12043
Merge pull request #604 from CosmWasm/instance-options
webmaster128 Oct 29, 2020
de6af06
Make `FileSystemCache` crate internal
webmaster128 Oct 29, 2020
fd96bd9
Convert modules from file to folder
webmaster128 Oct 29, 2020
44b1dd8
Remove obsolete load_with_backend
webmaster128 Oct 29, 2020
d06dd3a
Remove backend function in favour of BACKEND_NAME constant
webmaster128 Oct 29, 2020
fdaff44
Fix FileSystemCache::load return type
webmaster128 Oct 29, 2020
7b1e2eb
Use fresh temp dir for each run in test_file_system_cache_run
webmaster128 Oct 29, 2020
1509508
Rename to fs_cache and hits_fs_cache
webmaster128 Oct 29, 2020
bfef8ec
Merge pull request #605 from CosmWasm/file-system-cache
webmaster128 Oct 30, 2020
044cf0e
Replace wabt with wat, which is written in pure Rust
webmaster128 Nov 1, 2020
30bcca7
Merge pull request #606 from CosmWasm/replace-wabt-with-wat
webmaster128 Nov 2, 2020
2bcd54a
Add Size type
webmaster128 Oct 30, 2020
cd0b2a6
Create InMemoryCache
webmaster128 Nov 2, 2020
486e84f
Let FileSystemCache::store take a module reference only
webmaster128 Nov 2, 2020
9393dac
Integrate memory cache
webmaster128 Nov 2, 2020
76a4ff0
Ensure save_wasm does not write to memory cache
webmaster128 Nov 2, 2020
0e34c9f
Rename CosmCache to Cache
webmaster128 Nov 2, 2020
a48564f
Extract CacheOptions and make memory limit configurable
webmaster128 Nov 2, 2020
9313a9c
Merge pull request #607 from CosmWasm/add-in-memory-cache
webmaster128 Nov 2, 2020
929c80a
Rename `Extern` to `Backend`
webmaster128 Nov 2, 2020
1856e2b
Rename mock_dependencies -> mock_backend
webmaster128 Nov 2, 2020
821855f
Merge pull request #609 from CosmWasm/rename-to-backend
webmaster128 Nov 2, 2020
ece8830
Rename FfiError -> BackendError
webmaster128 Nov 3, 2020
3be9364
Merge ffi and traits module into backend
webmaster128 Nov 3, 2020
3cf2f51
Merge pull request #611 from CosmWasm/backend-error
webmaster128 Nov 3, 2020
2a2c513
Add panic when setting an empty value
webmaster128 Nov 4, 2020
a6f3078
Re-compile testing contract
webmaster128 Nov 4, 2020
a36c5ce
Merge pull request #613 from CosmWasm/panic-on-empty-value
webmaster128 Nov 4, 2020
66b9829
Set version: 0.12.0-alpha1
webmaster128 Nov 4, 2020
b70e40b
Allow constructing CacheOptions crate external
webmaster128 Nov 5, 2020
28a1b78
Merge pull request #614 from CosmWasm/make-CacheOptions-constructible
webmaster128 Nov 5, 2020
2fcfc82
Set version: 0.12.0-alpha2
webmaster128 Nov 5, 2020
7b3f318
Replace {Deps,DepsRef} with {Deps,DepsMut}
ethanfrey Nov 6, 2020
d4096b0
Merge pull request #621 from CosmWasm/fix-migration
webmaster128 Nov 7, 2020
fef5db0
Add helper so handler can call other handler
ethanfrey Nov 6, 2020
ad08b82
Address concerns from PR review
ethanfrey Nov 7, 2020
09da181
Merge pull request #620 from CosmWasm/add-deps-helpers
ethanfrey Nov 7, 2020
d7fb38c
Show users how to properly set dependencies in migration guide
webmaster128 Nov 9, 2020
e3fc4b8
Merge pull request #623 from CosmWasm/show-deps-migration
webmaster128 Nov 9, 2020
6926840
Remove StorageTransaction and friends
webmaster128 Nov 9, 2020
3257278
Merge pull request #625 from CosmWasm/rm-StorageTransaction
webmaster128 Nov 9, 2020
8fdf293
Add LimitedDisplay and implement for HashSet
webmaster128 Nov 9, 2020
fa3716b
Implement LimitedDisplay for BTreeSet
webmaster128 Nov 9, 2020
c7ecfb2
Use to_string_limited for features
webmaster128 Nov 9, 2020
ad2f79c
Cleanup error matching
webmaster128 Nov 9, 2020
5de2080
Show all required imports in error message
webmaster128 Nov 9, 2020
1b16272
Make imports test independent of iterator feature
webmaster128 Nov 9, 2020
85971e4
Add compatibility table
webmaster128 Nov 9, 2020
780aa1c
Pull out collection_to_string_limited and implement for vector
webmaster128 Nov 9, 2020
d9ea79a
Explain why sorting is needed
webmaster128 Nov 9, 2020
3172a6e
Test BTreeSet::to_string_limited
webmaster128 Nov 9, 2020
432b804
Merge pull request #624 from CosmWasm/limit-user-data
webmaster128 Nov 9, 2020
f127bfc
Set version: 0.12.0-alpha3
webmaster128 Nov 10, 2020
f893447
Upgarde rust-optimizer to 0.10.5
webmaster128 Nov 11, 2020
bea357d
Merge pull request #626 from CosmWasm/upgrade-builder
webmaster128 Nov 11, 2020
3a9cbac
Set version: 0.12.0
webmaster128 Nov 19, 2020
7457902
Merge tag 'v0.12.0' into develop
loloicci Dec 1, 2020
5dc3639
fix: fix package/ext for upstream v0.12.0
loloicci Dec 2, 2020
a157926
fix: replace log with attributes in collection-tester
loloicci Dec 3, 2020
d8928aa
fix: replace Extern<...> with Deps[Mut] in collection_tester
loloicci Dec 3, 2020
be8312b
fix: Insert arg MessageInfo in handle functions in collection_tester
loloicci Dec 3, 2020
7057922
fix: Remove unused imports
loloicci Dec 3, 2020
0a1837f
fix: fix the type of functions in collection_tester/src/state.rs
loloicci Dec 3, 2020
ac01937
fix: fix collection-tester/lib.rs to use macro
loloicci Dec 4, 2020
4b2b95a
fix: delete unneeded & for querier
loloicci Dec 4, 2020
7a3f530
fix: insert a arg Env to query function
loloicci Dec 4, 2020
1232d64
fix: replace env as an arg of init with _env
loloicci Dec 4, 2020
aa3c2c2
fix: version up and update Cargo.* for collection-tester
loloicci Dec 4, 2020
95ad62d
fix: replace log with attr in token-tester
loloicci Dec 4, 2020
1848311
fix: replace Extern<...> with Deps[Mut] in token_tester
loloicci Dec 4, 2020
b852977
fix: fix the type of functions in collection_tester/src/state.rs
loloicci Dec 4, 2020
bf7084e
fix: remove unused imports
loloicci Dec 4, 2020
2fd0e37
fix: delete unneeded & for querier
loloicci Dec 4, 2020
c75a1ae
fix: change the arg of config and config_read to follow
loloicci Dec 4, 2020
c1634f3
fix: fix init of token-tester to use MessageInfo
loloicci Dec 4, 2020
820b39c
fix: add env to args of query functions in token-tester
loloicci Dec 4, 2020
0b4cb6d
fix: fix token-tester/lib.rs to use macro
loloicci Dec 4, 2020
ce9bbb5
fix: fix test in token-tester to follow v0.12.0
loloicci Dec 4, 2020
7378d7b
fix: versionup token-tester contract
loloicci Dec 4, 2020
21efc70
fix: execute cargo fmt
loloicci Dec 4, 2020
f105a84
fix: suppress clippy error in contracts by too_many_arguments
loloicci Dec 4, 2020
3e5f3f2
Merge branch 'develop' into HEAD
loloicci Dec 29, 2020
184c2bb
fix: execute cargo fmt
loloicci Dec 29, 2020
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
99 changes: 47 additions & 52 deletions .circleci/config.yml

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ insert_final_newline = true

[*.rs]
indent_size = 4

[*.py]
indent_size = 4
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@

# Build results
target/
contracts/**/contract.wasm
contracts/**/hash.txt
artifacts/

# IDEs
.vscode/
Expand Down
169 changes: 169 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,174 @@
# CHANGELOG

## 0.12.0 (2020-11-19)

**cosmwasm-std**

- Remove the previously deprecated `StdError::Unauthorized`. Contract specific
errors should be implemented using custom error types now (see
[migration guide](./MIGRATING.md) 0.10 -> 0.11).
- Use dependency `thiserror` instead of `snafu` to implement `StdError`. Along
with this change, the `backtraces` feature now requires Rust nightly.
- Rename `StdError::ParseErr::source` to `StdError::ParseErr::source_type` and
`StdError::SerializeErr::target` to `StdError::SerializeErr::target_type` to
work around speacial treatment of the field name `source` in thiserror.
- Rename `Extern` to `Deps` to unify naming.
- Simplify ownership of calling `handle`, etc. with `Deps` and `DepsMut` struct
that just contains references (`DepsMut` has `&mut Storage` otherwise the
same)
- Remove unused `Deps::change_querier`. If you need this or similar
functionality, create a new struct with the right querier.
- Remove `ReadonlyStorage`. You can just use `Storage` everywhere. And use
`&Storage` to provide readonly access. This was only needed to let
`PrefixedStorage`/`ReadonlyPrefixedStorage` implement the common interface,
which is something we don't need.

**cosmwasm-storage**

- `PrefixedStorage`/`ReadonlyPrefixedStorage` do not implement the
`Storage`/`ReadonlyStorage` traits anymore. If you need nested prefixes, you
need to construct them directly via `PrefixedStorage::multilevel` and
`ReadonlyPrefixedStorage::multilevel`.
- Remove unused `TypedStorage`. If you need this or similar functionality, you
probably want to use `Bucket` or `Singleton`. If you really need it, please
copy the v0.11 code into your project.
- Remove `StorageTransaction` along with `transactional` and `RepLog`. This has
not been used actively for contract development and is now maintained in a
contract testing framework.

**cosmwasm-vm**

- Remove `Storage::range` and `StorageIterator`. The storage implementation is
now responsible for maintaining iterators internally and make them accessible
via the new `Storage::scan` and `Storage::next` methods.
- Add `FfiError::IteratorDoesNotExist`. Looking at this, `FfiError` should
probably be renamed to something that includes before, on and behind the FFI
boundary to Go.
- `MockStorage` now implementes the new `Storage` trait and has an additional
`MockStorage::all` for getting all elements of an iterator in tests.
- Remove unused `Extern::change_querier`. If you need this or similar
functionality, create a new struct with the right querier.
- Let `Instance::from_code` and `CosmCache::get_instance` take options as an
`InstanceOptions` struct. This contains `gas_limit` and `print_debug` for now
and can easily be extended. `cosmwasm_vm::testing::mock_instance_options` can
be used for creating such a struct in integration tests.
- Make `FileSystemCache` crate internal. This should be used via `CosmCache`.
- Fix return type of `FileSystemCache::load` to `VmResult<Option<Module>>` in
order to differentiate missing files from errors.
- Add in-memory caching for recently used Wasm modules.
- Rename `CosmCache` to just `cosmwasm_vm::Cache` and add `CacheOptions` to
configure it.
- Rename `Extern` to `Backend`.
- Rename `mock_dependencies` to `mock_backend` and
`mock_dependencies_with_balances` to `mock_backend_with_balances`.
- Rename `FfiError`/`FfiResult` to `BackendError`/`BackendResult` and adapt
`VmError` accordingly.

## 0.11.2 (2020-10-26)

**cosmwasm-std**

- Implement `From<std::str::Utf8Error>` and `From<std::string::FromUtf8Error>`
for `StdError`.
- Generalize denom argument from `&str` to `S: Into<String>` in `coin`, `coins`
and `Coin::new`.
- Implement `PartialEq` between `Binary` and `Vec<u8>`/`&[u8]`.
- Add missing `PartialEq` implementations between `HumanAddr` and `str`/`&str`.
- Add `Binary::to_array`, which allows you to copy binary content into a
fixed-length `u8` array. This is espeically useful for creating integers from
binary data.

## 0.11.1 (2020-10-12)

**cosmwasm-std**

- Implement `Hash` and `Eq` for `Binary` to allow using `Binary` in `HashSet`
and `HashMap`.
- Implement `Hash` and `Eq` for `CanonicalAddr` to allow using `CanonicalAddr`
in `HashSet` and `HashMap`.
- Implement `Add`, `AddAssign` and `Sub` with references on the right hand side
for `Uint128`.
- Implement `Sum<Uint128>` and `Sum<&'a Uint128>` for `Uint128`.

## 0.11.0 (2020-10-08)

**all**

- Drop support for Rust versions lower than 1.45.2.
- The serialization of the result from `init`/`migrate`/`handle`/`query` changed
in an incompatible way. See the new `ContractResult` and `SystemResult` types
and their documentation.
- Pass `Env` into `query` as well. As this doesn't have `MessageInfo`, we
removed `MessageInfo` from `Env` and pass that as a separate argument to
`init`, `handle`, and `query`. See the example
[type definitions in the README](README.md#implementing-the-smart-contract) to
see how to update your contract exports (just add one extra arg each).

**cosmwasm-std**

- Add `time_nanos` to `BlockInfo` allowing access to high precision block times.
- Change `FullDelegation::accumulated_rewards` from `Coin` to `Vec<Coin>`.
- Rename `InitResponse::log`, `MigrateResponse::log` and `HandleResponse::log`
to `InitResponse::attributes`, `MigrateResponse::attributes` and
`HandleResponse::attributes`.
- Rename `LogAttribute` to `Attribute`.
- Rename `log` to `attr`.
- Rename `Context::add_log` to `Context::add_attribute`.
- Add `Api::debug` for emitting debug messages during development.
- Fix error type for response parsing errors in `ExternalQuerier::raw_query`.
This was `Ok(Err(StdError::ParseErr))` instead of
`Err(SystemError::InvalidResponse)`, implying an error created in the target
contract.
- Deprecate `StdError::Unauthorized` and `StdError::unauthorized` in favour of
custom errors. From now on `StdError` should only be created by the standard
library and should only contain cases the standard library needs.
- Let `impl Display for CanonicalAddr` use upper case hex instead of base64.
This also affects `CanonicalAddr::to_string`.
- Create trait `CustomQuery` for the generic argument in
`QueryRequest<C: CustomQuery>`. This allows us to provide
`impl<C: CustomQuery> From<C> for QueryRequest<C>` for any custom query.
- Implement `From<Binary> for Vec<u8>`.
- Implement `From<CanonicalAddr> for Vec<u8>`.
- Add `Binary::into_vec` and `CanonicalAddr::into_vec`.
- The `canonical_length` argument was removed from `mock_dependencies`,
`mock_dependencies_with_balances`. In the now deprecated `MockApi::new`, the
argument is unused. Contracts should not need to set this value and usually
should not make assumptions about the value.
- The canonical address encoding in `MockApi::canonical_address` and
`MockApi::human_address` was changed to an unpredicatable represenation of
non-standard length that aims to destroy most of the input structure.

**cosmwasm-storage**

- Change order of arguments such that `storage` is always first followed by
namespace in `Bucket::new`, `Bucket::multilevel`, `ReadonlyBucket::new`,
`ReadonlyBucket::multilevel`, `bucket` and `bucket_read`.
- Change order of arguments such that `storage` is always first followed by
namespace in `PrefixedStorage::new`, `PrefixedStorage::multilevel`,
`ReadonlyPrefixedStorage::new`, `ReadonlyPrefixedStorage::multilevel`,
`prefixed` and `prefixed_read`.

**cosmwasm-vm**

- `CosmCache::new`, `Instance::from_code` and `Instance::from_module` now take
an additional argument to enable/disable printing debug logs from contracts.
- Bump required export `cosmwasm_vm_version_3` to `cosmwasm_vm_version_4`.
- The `canonical_length` argument was removed from `mock_dependencies`,
`mock_dependencies_with_balances` and `MockApi::new_failing`. In the now
deprecated `MockApi::new`, the argument is unused. Contracts should not need
to set this value and usually should not make assumptions about the value.
- The canonical address encoding in `MockApi::canonical_address` and
`MockApi::human_address` was changed to an unpredicatable represenation of
non-standard length that aims to destroy most of the input structure.

## 0.10.1 (2020-08-25)

**cosmwasm-std**

- Fix bug where `ExternalStorage.range()` would cause VM error if either lower
or upper bound was set
([#508](https://github.com/CosmWasm/cosmwasm/issues/508))

## 0.10.0 (2020-07-30)

**all**
Expand Down
Loading