Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
2b26752
Import new unstable functions with transparent hashing.
xgreenx Jul 21, 2022
8dbf040
primitives crate:
xgreenx Jul 21, 2022
341c48b
metadata crate:
xgreenx Jul 21, 2022
346529c
Removed `initialize_contract` and related to initialization stuff. No…
xgreenx Jul 21, 2022
b731f92
Removed the old codegen related to spread and packed layout. If some …
xgreenx Jul 21, 2022
d6db8de
Updated all examples to use a new API.
xgreenx Jul 21, 2022
f967986
UI tests for a new codegen.
xgreenx Jul 21, 2022
fc3fcb0
Merge branch 'master' into feature/storage-rework-new-hope
xgreenx Aug 15, 2022
8f511ec
Apply all suggestion from the review
xgreenx Aug 15, 2022
7e094eb
Make CI happy
xgreenx Aug 15, 2022
8c9942d
Fix tests
xgreenx Aug 15, 2022
9188ca7
Fix tests
xgreenx Aug 15, 2022
7375b4c
Fix tests
xgreenx Aug 15, 2022
906b1d8
Fix tests
xgreenx Aug 15, 2022
290b384
Apply suggestions:
xgreenx Aug 16, 2022
1f7603f
Fix doc
xgreenx Aug 16, 2022
09c24e1
Merge branch 'master' into feature/storage-rework-new-hope
xgreenx Aug 16, 2022
07a71ea
Add comment to autoref specialisation
xgreenx Aug 16, 2022
07889af
Suggestion from the review
xgreenx Aug 17, 2022
f64d7f7
Revert back u8
xgreenx Aug 17, 2022
efff8bf
Remove unwrap
xgreenx Aug 17, 2022
556ce20
Collapse if let
xgreenx Aug 17, 2022
5ce970d
Fixed overflow for enums
xgreenx Aug 17, 2022
8fcdab2
Fixing comments
xgreenx Aug 18, 2022
ca9f95b
Renamed `Item` to `StorableHint` and `AutoItem` to `AutoStorableHint`
xgreenx Aug 19, 2022
8eb4cb9
Fix test
xgreenx Aug 19, 2022
66a6901
Renamed key_holder.
xgreenx Aug 22, 2022
8854be8
Nightly fmt
xgreenx Aug 22, 2022
15563de
Remove `Packed` path
xgreenx Aug 22, 2022
4f35230
Fix doc test
xgreenx Aug 22, 2022
5065b07
Apply suggestions from hte review
xgreenx Aug 26, 2022
3247ee2
Merge branch 'master' into feature/storage-rework-new-hope
xgreenx Aug 26, 2022
63e3909
Fixed build
xgreenx Aug 26, 2022
c07b471
Fix build
xgreenx Aug 26, 2022
72c84a8
Removed `initialize_contract` from linting and deleted all tests
xgreenx Aug 26, 2022
cad9234
Fix doc link
xgreenx Aug 26, 2022
7371905
Merge branch 'master' into feature/storage-rework-new-hope
xgreenx Aug 29, 2022
477e4cf
Fix mapping example
xgreenx Aug 30, 2022
235d649
Applied suggestion.
xgreenx Aug 31, 2022
8b9ccbc
Removed `delegate-calls` from the CI. Replaced it with `set-code-hash`
xgreenx Aug 31, 2022
a42bc9d
Merge remote-tracking branch 'parity/master' into feature/storage-rew…
xgreenx Aug 31, 2022
be1563e
fix test
xgreenx Aug 31, 2022
300b139
fix test
xgreenx Aug 31, 2022
7b8733d
Fix CI to use stable for contract build
xgreenx Aug 31, 2022
3e3fbd7
Fix CI to use stable for examples
xgreenx Aug 31, 2022
5808157
Merge remote-tracking branch 'parity/master' into feature/storage-rew…
xgreenx Sep 1, 2022
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
primitives crate:
Removed old 32 bytes `Key`. Replaced it with `u32`. Added `KeyComposer`, it is a helper struct that does all manipulation with the storage key. It allows concat two storage keys into one, compute storage key for fields based on the filed, struct, enum, variants names.
Removed all tests and benches. Didn't add it for new primitives because the key is standard `u32` and all keys are calculated during compilation.

storage crate:
Removed `SpreadLayout`, `PackedLayout`, `SpreadAllocate`, `PackedAllocate`, and all related helper functions.
Removed `Packed` struct cause it is the default behavior for storage right now. Added `Lazy` struct that allows `get`/`set` value from/into the storage. It is similar to `Mapping` but works with one storage key and one value.
Introduced new main traits to work with storage in `storage/src/traits/storage.rs`.
Also added a new `OnCallInitializer` trait to improve the flow with upgradable contracts and support initialization on demand by default. Added `pull_or_init` macro that inits the storage struct if it is impossible to load it. It also can be used as optimization for contracts without an explicit constructor.
Replaced implementation of old traits for main primitives with a new one. Added blanket implementation of new traits for structures that are `Packed` by default. It reduces the amount of code and adds support of generic structures but adds problems with tuples(now tuples implement new traits only if inner items are `Packed`).
Introduced `AutoKey` and `ManualKey` that allows specifying which key the user wants to use. Added support of it into all traits and structures.
Refactored `Mapping` to follow new rules.
  • Loading branch information
xgreenx committed Jul 21, 2022
commit 8dbf040b64eb18be25effea402a778811a0070d7
1 change: 1 addition & 0 deletions .config/cargo_spellcheck.dic
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ defragmentation
deploy
dereferencing
deserialize/S
deserialization
dispatchable/S
encodable
evaluable
Expand Down
12 changes: 2 additions & 10 deletions crates/primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,12 @@ include = ["/Cargo.toml", "src/**/*.rs", "/README.md", "/LICENSE"]
ink_prelude = { version = "4.0.0", path = "../prelude/", default-features = false }
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive", "full"] }
scale-info = { version = "2", default-features = false, features = ["derive"], optional = true }
cfg-if = "1"

[dev-dependencies]
criterion = "0.3.1"
sha2-const = { version = "0.1.2", default-features = false }

[features]
default = ["std"]
std = [
"ink_prelude/std",
"scale/std",
"scale-info/std",
]

[[bench]]
name = "bench"
path = "benches/bench.rs"
harness = false
]
121 changes: 0 additions & 121 deletions crates/primitives/benches/bench.rs

This file was deleted.

Loading