Unverified Commit 02d8fe0d authored by Andrew Jones's avatar Andrew Jones Committed by GitHub
Browse files

Release `v2.0.0-beta` (#828)

* Bump version

* WIP update CHANGELOG.md

* Bump version

* WIP update CHANGELOG.md

* Update `CHANGELOG`

* Update to ink 4.0.0-beta

* Update CHANGELOG.md

* Update date

* Fix test for decoding contract return value

* Reduce size of binaries in CI

* Bump serde_json from 1.0.88 to 1.0.89

Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.88 to 1.0.89.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.88...v1.0.89

)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: default avatardependabot[bot] <support@github.com>

* Bump cargo_metadata from 0.15.1 to 0.15.2

Bumps [cargo_metadata](https://github.com/oli-obk/cargo_metadata) from 0.15.1 to 0.15.2.
- [Release notes](https://github.com/oli-obk/cargo_metadata/releases)
- [Changelog](https://github.com/oli-obk/cargo_metadata/blob/main/CHANGELOG.md)
- [Commits](https://github.com/oli-obk/cargo_metadata/compare/v0.15.1...v0.15.2

)

---
updated-dependencies:
- dependency-name: cargo_metadata
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: default avatardependabot[bot] <support@github.com>

Signed-off-by: default avatardependabot[bot] <support@github.com>
Co-authored-by: default avatarHernando Castano <hernando@hcastano.com>
Co-authored-by: Alexander Theißen's avatarAlexander Theißen <alex.theissen@me.com>
Co-authored-by: default avatardependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
parent f898182f
......@@ -51,13 +51,13 @@ jobs:
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features --all-targets -- -D warnings
args: --profile debug-ci --all-features --all-targets -- -D warnings
- name: Clippy without features
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-targets -- -D warnings
args: --profile debug-ci --all-targets -- -D warnings
test:
strategy:
......@@ -116,7 +116,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: test
args: --all-features -- --test-threads=1
args: --profile debug-ci --all-features -- --test-threads=1
template:
strategy:
......@@ -174,9 +174,9 @@ jobs:
wasm-opt --version &&
cargo -vV &&
cargo dylint --version &&
cargo run -- contract --version &&
cargo run -- contract new --target-dir ${{ runner.temp }} foobar &&
cargo run -- contract build --manifest-path=${{ runner.temp }}/foobar/Cargo.toml &&
cargo run -- contract check --manifest-path=${{ runner.temp }}/foobar/Cargo.toml &&
cargo run -- contract test --manifest-path=${{ runner.temp }}/foobar/Cargo.toml &&
cargo run -- contract build --manifest-path=${{ runner.temp }}/foobar/Cargo.toml --release
cargo run --profile debug-ci -- contract --version &&
cargo run --profile debug-ci -- contract new --target-dir ${{ runner.temp }} foobar &&
cargo run --profile debug-ci -- contract build --manifest-path=${{ runner.temp }}/foobar/Cargo.toml &&
cargo run --profile debug-ci -- contract check --manifest-path=${{ runner.temp }}/foobar/Cargo.toml &&
cargo run --profile debug-ci -- contract test --manifest-path=${{ runner.temp }}/foobar/Cargo.toml &&
cargo run --profile debug-ci -- contract build --manifest-path=${{ runner.temp }}/foobar/Cargo.toml --release
......@@ -4,7 +4,18 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
## [2.0.0-beta] - 2022-11-22
This release supports the ink! [`v4.0.0-beta`](https://github.com/paritytech/ink/releases/tag/v4.0.0-beta) release.
### Changed
- Update to weights v2 - [#809](https://github.com/paritytech/cargo-contract/pull/809)
- Update validation for renamed FFI functions - [#816](https://github.com/paritytech/cargo-contract/pull/816)
- Denominated units for balances in events - [#750](https://github.com/paritytech/cargo-contract/pull/750)
- Upgrade wasm-opt to 0.110.2 - [#802](https://github.com/paritytech/cargo-contract/pull/802)
### Added
- Log code hash if contract is already uploaded - [#805](https://github.com/paritytech/cargo-contract/pull/805)
## [2.0.0-alpha.5] - 2022-10-27
......
This diff is collapsed.
[workspace]
resolver = "2"
members = ["crates/*"]
# We want to reduce the size of build outputs in the CI to increase the effectiveness
# of the cache. Hence we need to apply some basic optimizations and disable everything
# that increases binary size.
[profile.debug-ci]
inherits = "dev"
opt-level = 1
incremental = false
debug = false
panic = "abort"
[package]
name = "cargo-contract"
version = "2.0.0-alpha.5"
version = "2.0.0-beta"
authors = ["Parity Technologies <admin@parity.io>"]
build = "build.rs"
edition = "2021"
......@@ -32,8 +32,8 @@ colored = "2.0.0"
toml = "0.5.9"
rustc_version = "0.4.0"
blake2 = "0.10.5"
contract-metadata = { version = "2.0.0-alpha.5", path = "../metadata" }
transcode = { package = "contract-transcode", version = "2.0.0-alpha.5", path = "../transcode" }
contract-metadata = { version = "2.0.0-beta", path = "../metadata" }
transcode = { package = "contract-transcode", version = "2.0.0-beta", path = "../transcode" }
semver = { version = "1.0.14", features = ["serde"] }
serde = { version = "1.0.147", default-features = false, features = ["derive"] }
serde_json = "1.0.89"
......
......@@ -5,7 +5,7 @@ authors = ["[your_name] <[your_email]>"]
edition = "2021"
[dependencies]
ink = { version = "4.0.0-alpha.3", default-features = false }
ink = { version = "4.0.0-beta", default-features = false }
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] }
scale-info = { version = "2", default-features = false, features = ["derive"], optional = true }
......
[package]
name = "contract-metadata"
version = "2.0.0-alpha.5"
version = "2.0.0-beta"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"
......
[package]
name = "contract-transcode"
version = "2.0.0-alpha.5"
version = "2.0.0-beta"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"
......@@ -18,13 +18,13 @@ path = "src/lib.rs"
[dependencies]
anyhow = "1.0.66"
contract-metadata = { version = "2.0.0-alpha.5", path = "../metadata" }
contract-metadata = { version = "2.0.0-beta", path = "../metadata" }
env_logger = "0.9.3"
escape8259 = "0.5.2"
hex = "0.4.3"
indexmap = "1.9.2"
ink_env = "4.0.0-alpha.3"
ink_metadata = { package = "ink_metadata", version = "4.0.0-alpha.3" }
ink_metadata = { package = "ink_metadata", version = "4.0.0-beta" }
itertools = "0.10.5"
tracing = "0.1.37"
nom = "7.1.1"
......
......@@ -106,6 +106,7 @@ mod util;
pub use self::{
scon::{
Map,
Tuple,
Value,
},
transcoder::{
......@@ -611,15 +612,20 @@ mod tests {
}
#[test]
fn decode_primitive_return() -> Result<()> {
fn decode_primitive_return() {
let metadata = generate_metadata();
let transcoder = ContractMessageTranscoder::new(metadata);
let encoded = true.encode();
let decoded = transcoder.decode_return("get", &mut &encoded[..])?;
let encoded = Result::<bool, ink::primitives::LangError>::Ok(true).encode();
let decoded = transcoder
.decode_return("get", &mut &encoded[..])
.unwrap_or_else(|e| panic!("Error decoding return value {}", e));
assert_eq!(Value::Bool(true), decoded);
Ok(())
let expected = Value::Tuple(Tuple::new(
"Ok".into(),
[Value::Bool(true)].into_iter().collect(),
));
assert_eq!(expected, decoded);
}
#[test]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment