|
| 1 | +# Version 3.0.0 |
| 2 | + |
| 3 | +This is the stable release for ink! 3.0. |
| 4 | + |
| 5 | +It took us a while to get here and going forward we want to do |
| 6 | +smaller releases more often. |
| 7 | + |
| 8 | +*Please note that ink! has not been audited.* |
| 9 | + |
| 10 | +## Compatibility |
| 11 | +We recommend using a version of the `contracts` pallet later than |
| 12 | +[cc282f84ba53ed2a08374d2a655dc8f08cbc5e86](https://github.com/paritytech/substrate/tree/cc282f84ba53ed2a08374d2a655dc8f08cbc5e86) |
| 13 | +(March 15, 2022) in your node. |
| 14 | + |
| 15 | +This is the case in the latest release of the `substrate-contracts-node`: |
| 16 | +[v0.10.0](https://github.com/paritytech/substrate-contracts-node/releases/tag/v0.10.0). |
| 17 | + |
| 18 | +## Breaking Changes |
| 19 | +### We replaced the default off-chain testing environment |
| 20 | +The off-chain testing environment can be used to write unit tests |
| 21 | +for your smart contract with a simulated chain. |
| 22 | +We've now replaced the existing off-chain environment with a new |
| 23 | +one, which has a bit of a different API. |
| 24 | + |
| 25 | +The major changes are that there is no longer any notion of "execution |
| 26 | +context" ‒ so no more `push_execution_context` or `pop_execution_context`. |
| 27 | +You can achieve all the same things with the new API, see [here](https://paritytech.github.io/ink/ink_env/test/index.html) |
| 28 | +for the API documentation. |
| 29 | + |
| 30 | +We've also switched all our examples to this new environment, you |
| 31 | +can find more "template use-cases" there (e.g. for |
| 32 | +[chain extension testing](https://github.com/paritytech/ink/tree/master/examples/rand-extension)) |
| 33 | + |
| 34 | +### We removed the dynamic storage allocator |
| 35 | +More details on the reasoning behind this can be found in [#1148](https://github.com/paritytech/ink/pull/1148). |
| 36 | + |
| 37 | +### `CallBuilder` API changed to support `delegate` calls |
| 38 | +The `CallBuilder` API changed to now support two types of calls: |
| 39 | + |
| 40 | +* `Call`: a cross-contract call.<br/> |
| 41 | + This was the default until this new API change. |
| 42 | +* `DelegateCall`: a delegated call.<br/> |
| 43 | + This enables writing upgradeable contracts using |
| 44 | + the `delegate` pattern. An example has been added to demonstrate this: |
| 45 | + [`upgradeable-contract`](https://github.com/paritytech/ink/tree/master/examples/upgradeable-contract). |
| 46 | + Please note that this is an _unstable_ API for now. |
| 47 | + You have to enable the feature `pallet-contracts/unstable-interface` in the target runtime. |
| 48 | + For `substrate-contracts-node` this is done by default [here](https://github.com/paritytech/substrate-contracts-node/blob/main/runtime/Cargo.toml). |
| 49 | + |
| 50 | +This is a breaking change, users must now specify the `call_type` to the builder manually. |
| 51 | + |
| 52 | +_If you want to keep existing behavior you just need to specify the type `Call` now._ |
| 53 | + |
| 54 | +More details on this change can be found in [#1133](https://github.com/paritytech/ink/pull/1133). |
| 55 | + |
| 56 | +### Unify `ink_env::{eval_contract, invoke_contract}` |
| 57 | + |
| 58 | +The API for `eval_contract` and `invoke_contract` changed. You can read more |
| 59 | +about the change in [#1165](https://github.com/paritytech/ink/pull/1165). |
| 60 | + |
| 61 | +## Added |
| 62 | +- Added `keep_attr` to `#[ink::contract]` and `#[ink::trait_definition]` ‒ [#1145](https://github.com/paritytech/ink/pull/1145) (thanks [@xgreenx](https://github.com/xgreenx)).. |
| 63 | +- Implemented the `seal_is_contract` and `seal_caller_is_origin` API ‒ [#1129](https://github.com/paritytech/ink/pull/1129) [#1166](https://github.com/paritytech/ink/pull/1166). |
| 64 | +- Add tests in experimental off-chain env for `trait-erc20` ‒ [#1158](https://github.com/paritytech/ink/pull/1158). |
| 65 | +- Add tests in experimental off-chain env for `erc721` ‒ [#1157](https://github.com/paritytech/ink/pull/1157). |
| 66 | +- Add tests in experimental off-chain env for `multisig` ‒ [#1159](https://github.com/paritytech/ink/pull/1159). |
| 67 | +- Add tests in experimental off-chain env for `dns` ‒ [#1156](https://github.com/paritytech/ink/pull/1156). |
| 68 | +- Implemented chain extension testing in experimental off-chain env ‒ [#1152](https://github.com/paritytech/ink/pull/1152). |
| 69 | + |
| 70 | +## Changed |
| 71 | +- Replaced default off-chain testing engine with experimental one ‒ [#1144](https://github.com/paritytech/ink/pull/1144). |
| 72 | +- Changed `CallBuilder` API to now support delegate calls ‒ [#1133](https://github.com/paritytech/ink/pull/1133) (thanks [@VargSupercolony](https://github.com/VargSupercolony) and [@xgreenx](https://github.com/xgreenx)). |
| 73 | +- Unify `ink_env::{eval_contract, invoke_contract}` ‒ [#1165](https://github.com/paritytech/ink/pull/1165). |
| 74 | + |
| 75 | +## Removed |
| 76 | +- Removed the dynamic storage allocator ‒ [#1148](https://github.com/paritytech/ink/pull/1148). |
| 77 | +- Removed `compile_as_dependency` config option ‒ [#1168](https://github.com/paritytech/ink/pull/1168). |
| 78 | + |
1 | 79 | # Version 3.0-rc9 |
2 | 80 |
|
3 | 81 | This is the 9th release candidate for ink! 3.0. |
|
0 commit comments