Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
4.2
->5.0
Release Notes
paritytech/ink (ink)
v5.0.0
Compare Source
ℹ️ We've 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.
Summary
This release addresses 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.
Compatibility
See the compatibility section of our migration guide for a detailed description. On a high level:
>= 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 - #2140#2137, #2132
MaxEncodedLen
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 - #1989Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.