Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
af6e388
Add migration guide from ink! 4.x to 5.0
cmichi Jan 24, 2024
abed487
Add Krest to compatible production chains
cmichi Jan 24, 2024
062b65d
Merge remote-tracking branch 'origin/master' into cmichi-add-migratio…
cmichi Jan 24, 2024
c90d2ba
Add screenshot of `cargo contract storage`
cmichi Jan 24, 2024
29980d7
Add steps to upgrade
cmichi Jan 25, 2024
95e84b1
Add breaking decode behavior change
cmichi Jan 25, 2024
1d6e623
Add note for `StorageVec`
cmichi Jan 25, 2024
1beaff2
Add note on support for multiple chain extensions
cmichi Jan 25, 2024
c39589e
Add note on stabilized `call_runtime`
cmichi Jan 25, 2024
0d4876a
Add note on chain extension syntax change
cmichi Jan 25, 2024
3a969d7
Move `StorageVec` section up
cmichi Jan 25, 2024
04125e5
Add note on new fallible methods
cmichi Jan 25, 2024
d314a0a
Move `StorageVec` and fallible methods to important section
cmichi Jan 25, 2024
d46d35b
Improve docs on fallible methods
cmichi Jan 25, 2024
7b37142
Improve `StorageVec` text
cmichi Jan 25, 2024
fecf707
Mention `non_fallible_api` lint
cmichi Jan 25, 2024
c55baa0
Update list of fallible `StorageVec` methods
cmichi Jan 25, 2024
95d2498
Update text on recommendations
cmichi Jan 29, 2024
b0c4455
Update section on chain extensions
cmichi Jan 29, 2024
9ff89d4
Mention contract verification
cmichi Jan 29, 2024
31309ed
Add note on fallible methods
cmichi Jan 29, 2024
48c822d
Apply suggestions from code review
Jan 30, 2024
47d2005
Explain reason for data migration better
cmichi Jan 30, 2024
4710bae
Move custom signature topics to Events 2.0
cmichi Jan 30, 2024
bd3f1a9
Added E2E builder API changes
cmichi Jan 30, 2024
b4e161f
Link to more infos about safe math in Rust
cmichi Jan 30, 2024
d69be1d
Improve text on safe math
cmichi Jan 30, 2024
2a7b82d
Clarify text
cmichi Jan 30, 2024
d550fba
Improve text
cmichi Jan 30, 2024
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
Prev Previous commit
Next Next commit
Move StorageVec section up
  • Loading branch information
cmichi committed Jan 25, 2024
commit 3a969d70d3c9935bc800fe4aecf67d85a97b2c80
30 changes: 15 additions & 15 deletions versioned_docs/version-5.x/faq/migrating-from-ink-4-to-5.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,21 @@ See [#1782](https://github.com/paritytech/ink/pull/1782) for more details.

## Interesting New Features

### New Data Structure: `StorageVec`

We've added a `Vec`-like data structure, built on top of Mapping.

This allows to retrieve elements from a vector and grow it without
having to load and push all elements.
For `Vec`, the cost of reading or writing a single element grows linearly corresponding
to the number of elements in the vector (its length). Additionally, the maximum capacity
of the whole vector is limited by the size of [ink!'s static buffer](https://github.com/paritytech/ink/blob/master/ARCHITECTURE.md#communication-with-the-pallet)
used during ABI encoding and decoding (default 16 KiB).
`StorageVec` on the other hand allows to access each element individually.

You can find verbatim documentation on `StorageVec` [here](/5.x/datastructures/storagevec),
the Rust docs can be found [here](https://docs.rs/ink/5.0.0-rc/ink/storage/struct.StorageVec.html).

### End-To-End testing with a chain snapshot

With ink! 5.0 we introduce the possibility of running your tests against the
Expand Down Expand Up @@ -325,21 +340,6 @@ It has a number of features that are pretty great:

See the [DRink!](https://github.com/inkdevhub/drink) page for more details.

### New Data Structure: `StorageVec`

We've added a `Vec`-like data structure, built on top of Mapping.

This allows to retrieve elements from a vector and grow it without
having to load and push all elements.
For `Vec`, the cost of reading or writing a single element grows linearly corresponding
to the number of elements in the vector (its length). Additionally, the maximum capacity
of the whole vector is limited by the size of [ink!'s static buffer](https://github.com/paritytech/ink/blob/master/ARCHITECTURE.md#communication-with-the-pallet)
used during ABI encoding and decoding (default 16 KiB).
`StorageVec` on the other hand allows to access each element individually.

You can find verbatim documentation on `StorageVec` [here](/5.x/datastructures/storagevec),
the Rust docs can be found [here](https://docs.rs/ink/5.0.0-rc/ink/storage/struct.StorageVec.html).

### Support for multiple chain extensions

With [#1958](https://github.com/paritytech/ink/pull/1958) we added support for interacting with
Expand Down