- 28 Sep, 2022 1 commit
-
-
Michael Müller authored
* Add missing words to spellcheck dictionary * Add `contracts-node.scale` metadata Has been exported via cargo install subxt-cli subxt metadata > contracts-node.scale For `substrate-contracts-node` v0.20.0. * Run `substrate-contracts-node` in CI * Invoke `cargo doc` separately for each crate * Add MVP for E2E testing framework * Add E2E tests for `contract-transfer` example * Add ToDo comment for migration to `state_call` RPC * Update to new `ink` entrance crate * Add ToDo for `node_log_contains` * Update to `ink` entrance crate * Migrate to `state_call` RPC * Always initialize `env_logger` * Use latest `subxt` release * Remove superfluous TODO * Apply `cargo fmt` * Adapt test fixtures
-
- 26 Sep, 2022 1 commit
-
-
Andrew Jones authored
-
- 21 Sep, 2022 3 commits
-
-
Andrew Jones authored
* (cargo-release) version 4.0.0-alpha.3 * (cargo-release) version 4.0.0-alpha.3 * (cargo-release) version 4.0.0-alpha.3 * (cargo-release) version 4.0.0-alpha.3 * (cargo-release) version 4.0.0-alpha.3 * (cargo-release) version 4.0.0-alpha.3 * (cargo-release) version 4.0.0-alpha.3 * (cargo-release) version 4.0.0-alpha.3 * (cargo-release) version 4.0.0-alpha.3 * (cargo-release) version 4.0.0-alpha.3 * (cargo-release) version 4.0.0-alpha.3 * (cargo-release) version 4.0.0-alpha.3 * Bump inter crate dependency versions * Update CHANGELOG.md for alpha.3 * Human error * Update CHANGELOG.md Co-authored-by:
Hernando Castano <HCastano@users.noreply.github.com> * Remove redundant circular dependency on ink_env Co-authored-by:
Hernando Castano <HCastano@users.noreply.github.com>
-
Andrew Jones authored
* Bump versions * Update CHANGELOG * Add Storage Rework detail * Update CHANGELOG.md * Update CHANGELOG.md * Update CHANGELOG.md Co-authored-by:
Michael Müller <mich@elmueller.net> * Update CHANGELOG.md Co-authored-by:
Michael Müller <mich@elmueller.net> * Add reference to examples * Update CHANGELOG.md * Add version to ink_primitives Co-authored-by:
Michael Müller <mich@elmueller.net>
-
Hernando Castano authored
-
- 20 Sep, 2022 4 commits
-
-
Andrew Jones authored
* Move storage derives to ink_macro crate * Reexport storage traits and derives from ink crate * Fix macro storage tests * Fmt * Remove storage/traits/codegen crate * Fix ui test * Attempt to fix UI tests * Attempt to fix docs job * Try to fox codecov job * Update traits crate description * Attempt to fix docs job * Update crates/ink/ir/src/ir/utils.rs Co-authored-by:
Michael Müller <mich@elmueller.net> * Add comment Co-authored-by:
Michael Müller <mich@elmueller.net>
-
Michael Müller authored
-
Michael Müller authored
-
Cyrill Leutwiler authored
Since I completely overlooked that first hand
-
- 19 Sep, 2022 1 commit
-
-
Cyrill Leutwiler authored
-
- 15 Sep, 2022 2 commits
-
-
Andrew Jones authored
* Add ink entrance crate * Use entrance crate from lang codegen * Use entrance crate for ink_storage * Update primitives and storage * Fix primitive macro * Move unique_topics test to ink crate * Update ink crate versions * Use umbrella crate in ink primitives macro * Use umbrella crate in storage derive macros * Use umbrella crate in storage doc tests * Use umbrella crate in lang codegen * Fix storage doc tests * Update erc20 example * Remove scale libs from entrance crate * Rename ink_lang crate to ink * Reexport sub crates from main ink crate * Metadata std * Fix up some examples * Fix up delegator example * Fix up more examples * Fix up more examples * Fix up more examples * Remove some ink_lang as ink from tests * Update env_access docs * Fix up more doc examples * Remove ink_lang import from some tests * UI tests * Fix UI tests * Remove more ink_lang aliases * Fix contract-terminate tests * Fmt * Attempt to fix CI and ARCHITECTURE doc * Update crates list * Restore unique_topics test * Remove ink_lang from unique_topics test * Fix typo * UI tests * UI tests * Fmt examples * Fmt UI tests * More fmt UI tests * Fix storage tests * Fix example tests * Fix examplesl * Fix example test * Examples fmt * Fix erc20 * Fmt erc20 * Fix doc test * Move unique_topics test * Fix UI tests * Revert CHANGELOG.md * Use cargo-contract branch in examples-contract-build * Add ink-debug feature to top level ink crate * Update CHANGELOG.md * Rename all ink_lang_* crates to ink_* * Replace remaining ink_lang_macro refs * Update CHANGELOG.md Co-authored-by:
Michael Müller <mich@elmueller.net> * Update CHANGELOG Co-authored-by:
Michael Müller <mich@elmueller.net>
-
Michael Müller authored
-
- 14 Sep, 2022 1 commit
-
-
Michael Müller authored
* Update test fixtures * Update test fixtures * Update test fixtures
-
- 13 Sep, 2022 4 commits
-
-
Sasha Gryaznov authored
Add `ink_env::pay_with_call!` helper macro for off-chain emulation of sending payments with contract msg calls (#1379) * first ver.: transfer_in api function implememted but we can't have it in on-chain env * transfer_in moved to test_api * doc + example updated * Update examples/contract-transfer/lib.rs Co-authored-by:
Hernando Castano <HCastano@users.noreply.github.com> * use stmt moved to macro * docs and nitty gritties * moved the macro to the test mod * spell fix * next review round suggestions applied * Use four spaces for macro indentation Co-authored-by:
Hernando Castano <HCastano@users.noreply.github.com> Co-authored-by:
Hernando Castano <hernando@hcastano.com>
-
Andrew Jones authored
* Add ink_storage_traits crate * Remove unused hash layout trait and impls * Remove dependency between storage traits and ink_env * Move Storable definition and derive to ink_storage_traits * Replace usages of primitives storable with new location * Fmt * README and license sym links * Fix up CI script crates and codegen symlinks * update CI crates again * Add StorageLayout impl for Hash * Fix up collections ui tests * Fix up storage traits tests * Add missing feature to codegen syn dependency * Fix storage traits reference in env * Add missing no_std cfg_attr * Fix example build * Fmt * Fix example * Move Clear trait to primitives * Fix example * Fix env access * Fix up docs * Trying to fix UI tests * Fix LICENSE and README paths
-
Michael Müller authored
* Use stable `clippy` * Use stable for `cargo test` * Update test fixtures cd crates/lang/ export TRYBUILD=overwrite cargo test --verbose --all-features --no-fail-fast * Remove unnecessary cfg feature * Update `CONTRIBUTING.md` * Update test fixtures * Update `CONTRIBUTING.md` * Update CONTRIBUTING.md Co-authored-by:
Andrew Jones <ascjones@gmail.com> * Update CONTRIBUTING.md Co-authored-by:
Andrew Jones <ascjones@gmail.com> Co-authored-by:
Andrew Jones <ascjones@gmail.com>
-
Michael Müller authored
-
- 12 Sep, 2022 1 commit
-
-
German authored
* document storage compatibility * more clarity on storage restriction * fix spelling * ignore code snippets in docs * formatting * Apply suggestions from Michi's code review Co-authored-by:
Michael Müller <mich@elmueller.net> Co-authored-by:
Andrew Jones <ascjones@gmail.com> * Apply suggestions from code review Co-authored-by:
Michael Müller <mich@elmueller.net> Co-authored-by:
Andrew Jones <ascjones@gmail.com>
-
- 06 Sep, 2022 1 commit
-
-
Michael Müller authored
cd crates/lang/ export TRYBUILD=overwrite cargo test --verbose --all-features --no-fail-fast
-
- 05 Sep, 2022 3 commits
-
-
GreenBaneling | Supercolony authored
* Import new unstable functions with transparent hashing. Updated the API to work with the generic key `K: Encode` instead of the old `Key`. Also, the change contains optimization to reduce the size of contracts. In most cases, it is `#[inline(always)]`; but `return_value` also got small optimization; removed usage of `extract_from_slice` where it is not needed. * 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. * metadata crate: Updated storage layout in the metadata. Introduces the concept of roots and leafs. Root defines the storage key for all sub-tree until there will be another Root. Leafs are common types that are part of the sub-tree and serialized/deserialized together into one storage key. Replaced 32 bytes storage key with `u32`. Added validation that all root storage keys don't overlap. Maybe better to add that error or reuse that validator on the `cargo-contract` side to show a more user-friendly error. `RootLayout` and validator are used in codegen(next commit). The contract is wrapped into `RootLayout`, and we do validation for that tree. Metadata now contains name for each struct/enum/variant/field. It is useful information because now the storage key is calculated based on the name of struct/enum/variant/field. storage crate: Added a new helper crate `storage/codegen`. It contains some useful functional that is used in `ink_storage_derive` and in `ink_lang_codegen` crates. It has a method that returns all types of the struct/enum/unit and a method that finds "salt" in the generics of the struct/enum. It uses magic constant "KeyHolder"(about that you can read in issue) to find salt, so I tried to have only one place where we are using that constant. Replaced derive implementation of old trait with new one. You can check the tests to see how the implementation looks like. `Storable` recursively call `encode` and `decode` for all fields. `KeyHolder` return key of the salt. `Item` uses `AutoKey` or key specified by the user. I want to highlight that `PreferredKey` only is used with the `AutoItem` trait. If `PreferredKey` is `AutoKey`, then `AutoItem<AutoGenerated>` select auto-generated key, otherwise preferred. So `AutoItem` trait decides that key to use. It is why derive macro only set `PreferredKey`. Updated drive for `StorageLayout`, now it uses `u32` and pass name of the struct into metadata. * Removed `initialize_contract` and related to initialization stuff. Now the codegen uses `pull_or_init` in the `call`. Updated `execute_constructor` to work with new storage methods. Allowed usage of generics during the declaration of the primary contract storage. Users can specify the default storage key with `KeyHolder` via generic. Added parser for `storage_item` macro with its config. * Removed the old codegen related to spread and packed layout. If some object implements `Decode` and `Encode`, it is `Packed`, and it uses the blanket implementation of new traits. In dispatch, codegen started to use a new method to work with storage. In metadata codegen added usage of new `RootLayout`. We wrap the contract into that layout because the contract has its storage key for all inner fields by default. Also added a run of validation logic during metadata generation. Added `storage_item` macro. It transforms all types from autokey into manual key(if types support it). It calculates the storage key based on the name(it uses the `KeyComposer::compute_key` function from the primitives crate). Also, macro generates an additional `Check` structure that includes all raw fields. It helps show correct errors to the user in case of typos, wrong types, etc. * Updated all examples to use a new API. Simplified delegate call example very well causes of new `OnCallInitializer` trait and support of manual specifying key. * UI tests for a new codegen. Can't highlight something unusual here=) * Apply all suggestion from the review * Make CI happy * Fix tests * Fix tests * Fix tests * Fix tests * Apply suggestions: - In most cases it is comments=) - Moved `pull_or_init` on one level upper. - Put the tests into the `impls/mod.rs` * Fix doc * Add comment to autoref specialisation * Suggestion from the review * Revert back u8 * Remove unwrap * Collapse if let * Fixed overflow for enums * Fixing comments * Renamed `Item` to `StorableHint` and `AutoItem` to `AutoStorableHint` * Fix test * Renamed key_holder. Add UI test for double storage_item. Applied suggestion from the review. * Nightly fmt * Remove `Packed` path * Fix doc test * Apply suggestions from hte review * Fixed build * Fix build * Removed `initialize_contract` from linting and deleted all tests * Fix doc link * Fix mapping example * Applied suggestion. Removed `delegate-call` example with `OnCallInitializer` * Removed `delegate-calls` from the CI. Replaced it with `set-code-hash` * fix test * fix test * Fix CI to use stable for contract build * Fix CI to use stable for examples
-
dependabot[bot] authored
Updates the requirements on [impl-serde](https://github.com/paritytech/parity-common) to permit the latest version. - [Release notes](https://github.com/paritytech/parity-common/releases) - [Commits](https://github.com/paritytech/parity-common/compare/impl-serde-v0.3.1...impl-serde-v0.4.0 ) --- updated-dependencies: - dependency-name: impl-serde dependency-type: direct:production ... Signed-off-by:
dependabot[bot] <support@github.com> Signed-off-by:
dependabot[bot] <support@github.com> Co-authored-by:
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
-
German authored
* remove single whitespace prefix from comments and docs * format code to please CI * elided lifetime + tests * adds comments to tests * add docs for public function
-
- 02 Sep, 2022 1 commit
-
-
Michael Müller authored
-
- 01 Sep, 2022 1 commit
-
-
Michael Müller authored
-
- 31 Aug, 2022 1 commit
-
-
Michael Müller authored
Needed for `if version == MetadataVersion::V4 { }` in `smart-bench`.
-
- 30 Aug, 2022 3 commits
-
-
Michael Müller authored
* Use nightly for `clippy` and `rustfmt` * Fix typo * Fix formatting * Use `cargo clippy` for `dylint`
-
Michael Müller authored
* Fix some text * Add more content to `ARCHITECTURE.md` * Update ARCHITECTURE.md Co-authored-by:
Andrew Jones <ascjones@gmail.com> Co-authored-by:
Andrew Jones <ascjones@gmail.com>
-
Michael Müller authored
-
- 26 Aug, 2022 1 commit
-
-
Hernando Castano authored
* Remove `version` from dev-dependencies Looks like Cargo decides to either use a local or published package depending on the context (i.e `path` vs. `version`) Since we never publish `dev-dependencies` we can stick to always using a local version (`path`). Cargo book reference: - https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#multiple-locations * Sort `dev-dependencies` alphabetically
-
- 24 Aug, 2022 1 commit
-
-
Hernando Castano authored
* Add release notes for `v4.0.0-alpha.1` * Mention breaking changes in changelog * Bump version to `4.0.0-alpha.1` * Fix header levels after merge * Fix some formatting * Add some notes about the breaking changes * Add links to PRs * Add note about linting move * Bump `ink_linting` crate to `4.0.0-alpha.1` * Remove `nightly` usage from delegator build script * Use dashes instead of minus signs Co-authored-by:
Michael Müller <mich@elmueller.net> * Beef up description of linter PR Co-authored-by:
Michael Müller <mich@elmueller.net> * Move compatibility section to top of release notes * Explicitly use `stable` channel Our Docker images still default to `nightly` * Build contracts with `stable` toolchain * Install `rust-src` component before building examples * Run the rest of the CI stages again Co-authored-by:
Michael Müller <mich@elmueller.net>
-
- 23 Aug, 2022 1 commit
-
-
Hernando Castano authored
* Add `version` field to `InkProject` * Use `InkProject` directly in metadata codegen * Remove old metadata versions from version enum These versions can't be constructed using this version of the crate anyways, so it doesn't really make sense to keep them. * Manually implement `Default` We should change to using the derive macros once our CI's nightly compiler version gets updated. * Add metadata `V4` version option * Use my branch of `cargo-contract` in CI * Remove deprecated `V3` metadata We're never able to construct this variant with this crate anymore, so it doesn't make sense to keep it.
-
- 15 Aug, 2022 1 commit
-
-
Alexander Theißen authored
* Use stable way of aborting * Trigger CI
-
- 12 Aug, 2022 1 commit
-
-
Michael Müller authored
* Add initial architecture document * Apply suggestions from code review Co-authored-by:
Hernando Castano <HCastano@users.noreply.github.com> * Move text to `codegen` crate docs * Update text * Add 'v1' and 'v2' to spellcheck dic * Add text about execution environment * Apply suggestions from code review Co-authored-by:
Hernando Castano <HCastano@users.noreply.github.com> * Minor clarification Co-authored-by:
Hernando Castano <HCastano@users.noreply.github.com>
-
- 04 Aug, 2022 1 commit
-
-
Alexander Theißen authored
-
- 28 Jul, 2022 2 commits
-
-
Michael Müller authored
cd crates/lang/ export TRYBUILD=overwrite cargo test --verbose --all-features --no-fail-fast
-
Michael Müller authored
cd crates/lang/ export TRYBUILD=overwrite cargo test --verbose --all-features --no-fail-fast
-
- 25 Jul, 2022 2 commits
-
-
Hernando Castano authored
* Update UI tests * Apease Clippy
-
Hernando Castano authored
* Use failing values from fuzzer in test * Check for `isize` overflows instead of `usize` overflows This is what the `Layout::from_size_align()` method is expecting. * Explicitly handle case where we crate an invalid `Layout` Instead of manually doing the check ourselves we'll let `Layout`'s API tell us if something is invalid. * Change a few other tests to only use valid `Layout`s * Remove test which checks for overflow in single allocation Now that I know that `Layout`'s can only be crated with `size`es of `isize::MAX` instead of `usize::MAX` I realized this test doesn't make sense. We will never be able to create a single allocation which can overflow our heap (which is of size `usize::MAX`). During this I also realized that because of the `Layout` requirements this test was never actually fed any valid inputs (all inputs that got through the first check were greater than `isize::MAX`, which then stopped a `Layout` from being created). * Switch from `usize` to `isize` in one of the tests * Change one other test to also use `isize` * Put back original test configuration check * Remove unused expect message * Remove outdated comment
-
- 20 Jul, 2022 2 commits
-
-
Michael Müller authored
-
Michael Müller authored
* Fix `clippy::question_mark` * Fix `clippy::match_like_matches_macro` * Update test fixtures cd crates/lang/ export TRYBUILD=overwrite cargo test --verbose --all-features --no-fail-fast
-