-
Notifications
You must be signed in to change notification settings - Fork 432
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
Release 5.0.0
#2133
Release 5.0.0
#2133
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2133 +/- ##
==========================================
- Coverage 53.75% 53.65% -0.10%
==========================================
Files 224 225 +1
Lines 7084 7095 +11
Branches 3129 3129
==========================================
- Hits 3808 3807 -1
- Misses 3276 3288 +12 ☔ View full report in Codecov by Sentry. |
🦑 📈 ink! Example Contracts ‒ Changes Report 📉 🦑These are the results when building the
Link to the run | Last update: Tue Mar 12 19:23:43 CET 2024 |
I think it would make sense to add to the release notes information about compatibility between |
Good idea. Will do |
We definitely need #2132 in here @pgherveou |
this also depends on the drink PR inkdevhub/drink#110. |
I think |
Where does |
My mistake, it should be >=4.0.0-rc.3, >=4.0.0 |
Co-authored-by: Michael Müller <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢
Note that there is a breaking API change in this commit The new syntax to specify a custom sandbox is now: ```diff - #[ink_e2e::test(backend(runtime_only(runtime = ink_e2e::MinimalRuntime)))] + #[ink_e2e::test(backend(runtime_only(sandbox = ink_e2e::MinimalSandbox)))] ```
Summary
This is a release addressing the rest of the severities described in the OpenZeppelin security review of ink! and
cargo-contract
.One of the notable addressed issues is the proxy selector clashing attack.
As of this release, ink! only allows exactly one other message with a well-known reserved selector to be defined.
You can read more about the change in the #1827 and #2031.
ink! 5.0.0 features a significant number of new features:
to build even more sophisticated and advanced contracts for supported chains - #1958.
we have disallowed unchecked arithmetic expressions.
cargo-contract
will fail to compile the contract with the raw arithmetic operation - #1831.These are the main features we have introduced in this release. We also encourage developers to have a look at more detailed changelog entries to find out about any breaking changes that may affect the development of new ink! contracts.
We have created a migration guide from ink! 4 to ink! 5. It also contains an overview over all breaking changes and newly added features.
You can view it here.
Compatability
>=1.70
cargo-contract
:>=4.0.0
polkadot-js/api
andpolkadot-js/api-contract
:>=10.12.1
substrate-contracts-node
:>= 0.39.0
Changelog
Added
instantiate_v2
with additional limit parameters #2123non_fallible_api
lint - #2004create_call_builder
for testing existing contracts - #2075call_v2
cross-contract calls with additional limit parameters - #2077delegate_dependency
api calls - #2076set_code_hash
generic - #1906StorageVec
datastructure built on top ofLazy
- #1995Mapping
andLazy
- #1910storage_never_freed
lint - #1932strict_balance_equality
lint - #1914no_main
lint - #2001scale
dependencies, introduce#[ink::scale_derive]
- #1890sr25519_verify
function toink_env
#18402.0
- #1827set_block_number
to off-chain test apiEngine
- #1806call_runtime
‒ #1749E2EBackend
trait - #1867Changed
anonymous
ink! event item configuration argument - #2140MaxEncodedLen
for output buffer size #2128Mapping
: Reflect all possible failure cases in comments ‒ #2079.call
to.call_builder
‒ #2078runtime_only
attribute argument - #2083additional_contracts
parameter #2098TypeSpec
directly - #1999#[ink::chain_extension]
macro and the definition of the chain extension.ink_linting
to mandatory and extra libraries - #2032drink
API - #2005scale
dependencies, introduce#[ink::scale_derive]
‒ #1890decode_all
for decoding cross contract call result - #1810build_message
+ callback - #1782Fixed
StorageVec
type by excluding thelen_cached
field from its type info - #2052approve_for
in the ERC-721 example - #2092transfer_token_from
now ensures the token owner is correct - #2093RootLayout::new()
is generic again to allow usingink_metadata
in purePortableForm
contexts - #1989