Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into 1436-primitive-topic
Browse files Browse the repository at this point in the history
  • Loading branch information
jubnzv committed Jul 28, 2023
2 parents 6157877 + bcbfa66 commit 941125a
Show file tree
Hide file tree
Showing 261 changed files with 3,849 additions and 2,616 deletions.
4 changes: 4 additions & 0 deletions .config/cargo_spellcheck.dic
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ FFI
Gnosis
GPL
KECCAK
L1
L2
Polkadot
PSP22
RPC
SHA
UI/S
Expand Down Expand Up @@ -62,6 +65,7 @@ scalability
scalable
stdin
stdout
subber
tuple
unordered
untyped
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
substrate-contracts-node -lruntime::contracts=debug 2>&1 | tee /tmp/contracts-node.log &
- name: Rust Cache
uses: Swatinem/rust-cache@v2.5.0
uses: Swatinem/rust-cache@v2.5.1

- name: Install `cargo-contract` `master`
uses: actions-rs/cargo@v1
Expand Down
12 changes: 9 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ variables:
GIT_DEPTH: 100
CARGO_INCREMENTAL: 0
CARGO_TARGET_DIR: "/ci-cache/${CI_PROJECT_NAME}/targets/${CI_COMMIT_REF_NAME}/${CI_JOB_NAME}"
# CI_IMAGE is changed to "-:staging" when the CI image gets rebuilt
# read more https://github.com/paritytech/scripts/pull/244
CI_IMAGE: "paritytech/ink-ci-linux:production"
CI_IMAGE: "paritytech/ci-unified:bullseye-1.71.0-2023-05-23"
PURELY_STD_CRATES: "ink/codegen metadata engine e2e e2e/macro ink/ir"
ALSO_WASM_CRATES: "env storage storage/traits allocator prelude primitives ink ink/macro"
ALL_CRATES: "${PURELY_STD_CRATES} ${ALSO_WASM_CRATES}"
Expand Down Expand Up @@ -272,6 +270,8 @@ test:
- job: check-std
artifacts: false
variables:
# Fix for linking of `linkme` for `cargo test`: https://github.com/dtolnay/linkme/issues/49
RUSTFLAGS: "-Clink-arg=-z -Clink-arg=nostart-stop-gc"
# Since we run the tests with `--all-features` this implies the feature
# `ink-fuzz-tests` as well -- i.e. the fuzz tests are run.
# There's no way to disable a single feature while enabling all features
Expand Down Expand Up @@ -372,6 +372,9 @@ examples-test:
needs:
- job: clippy-std
artifacts: false
variables:
# Fix linking of `linkme`: https://github.com/dtolnay/linkme/issues/49
RUSTFLAGS: "-Clink-arg=-z -Clink-arg=nostart-stop-gc"
script:
- for example in integration-tests/*/; do
if [ "$example" = "integration-tests/lang-err-integration-tests/" ]; then continue; fi;
Expand Down Expand Up @@ -401,6 +404,9 @@ examples-contract-build:
stage: examples
<<: *docker-env
<<: *test-refs
variables:
# Fix for linking of `linkme` for `cargo contract build`: https://github.com/dtolnay/linkme/issues/49
RUSTFLAGS: "-Clink-arg=-z -Clink-arg=nostart-stop-gc"
script:
- rustup component add rust-src --toolchain stable
- cargo contract -V
Expand Down
93 changes: 84 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,27 +1,102 @@
[workspace]
resolver = "2"
members = [
"crates/ink",
"crates/metadata",
"crates/allocator",
"crates/e2e",
"crates/e2e/macro",
"crates/engine",
"crates/env",
"crates/ink",
"crates/ink/macro",
"crates/ink/ir",
"crates/ink/codegen",
"crates/ink/ir",
"crates/ink/macro",
"crates/metadata",
"crates/prelude",
"crates/primitives",
"crates/e2e",
"crates/e2e/macro",
"crates/engine",
"crates/env",
"crates/storage",
"crates/storage/traits",
]
exclude = [
"integration-tests/",
"integration-tests",
]

[workspace.package]
authors = ["Parity Technologies <admin@parity.io>"]
categories = ["no-std", "embedded"]
edition = "2021"
homepage = "https://www.parity.io/"
keywords = ["wasm", "parity", "webassembly", "blockchain", "edsl"]
license = "Apache-2.0"
repository = "https://github.com/paritytech/ink"
version = "4.2.0"

[workspace.dependencies]
arrayref = { version = "0.3" }
array-init = { version = "2.0", default-features = false }
blake2 = { version = "0.10" }
cargo_metadata = { version = "0.17.0" }
cfg-if = { version = "1.0" }
contract-build = { version = "4.0.0-alpha" }
derive_more = { version = "0.99.17", default-features = false }
either = { version = "1.5", default-features = false }
funty = { version = "2.0.0" }
heck = { version = "0.4.0" }
impl-serde = { version = "0.4.0", default-features = false }
itertools = { version = "0.11", default-features = false }
jsonrpsee = { version = "0.19.0" }
linkme = { version = "0.3.9" }
num-traits = { version = "0.2", default-features = false }
paste = { version = "1.0" }
pretty_assertions = { version = "1" }
proc-macro2 = { version = "1" }
quickcheck = { version = "1" }
quickcheck_macros = { version = "1" }
quote = { version = "1" }
rlibc = { version = "1" }
scale = { package = "parity-scale-codec", version = "3.4", default-features = false, features = ["derive"] }
scale-decode = { version = "0.7.0", default-features = false }
scale-encode = { version = "0.3.0", default-features = false }
scale-info = { version = "2.6", default-features = false }
schemars = { version = "0.8" }
secp256k1 = { version = "0.27.0" }
serde = { version = "1.0.137", default-features = false }
serde_json = { version = "1.0.81" }
sha2 = { version = "0.10" }
sha3 = { version = "0.10" }
static_assertions = { version = "1.1" }
subxt = { version = "0.30.1" }
subxt-signer = { version = "0.30.1" }
syn = { version = "2" }
synstructure = { version = "0.13.0" }
tokio = { version = "1.18.2" }
tracing = { version = "0.1.37" }
tracing-subscriber = { version = "0.3.17" }
trybuild = { version = "1.0.60" }
which = { version = "4.4.0" }
xxhash-rust = { version = "0.8" }

# Substrate dependencies
pallet-contracts-primitives = { version = "24.0.0", default-features = false }
sp-core = { version = "21.0.0", default-features = false }
sp-keyring = { version = "24.0.0", default-features = false }
sp-runtime = { version = "24.0.0", default-features = false }
sp-weights = { version = "20.0.0", default-features = false }

# Local dependencies
ink = { version = "=4.2.0", path = "crates/ink", default-features = false }
ink_allocator = { version = "=4.2.0", path = "crates/allocator", default-features = false }
ink_codegen = { version = "=4.2.0", path = "crates/ink/codegen", default-features = false }
ink_e2e_macro = { version = "=4.2.0", path = "crates/e2e/macro", default-features = false }
ink_engine = { version = "=4.2.0", path = "crates/engine", default-features = false }
ink_env = { version = "=4.2.0", path = "crates/env", default-features = false }
ink_ir = { version = "=4.2.0", path = "crates/ink/ir", default-features = false }
ink_macro = { version = "=4.2.0", path = "crates/ink/macro", default-features = false }
ink_metadata = { version = "=4.2.0", path = "crates/metadata", default-features = false }
ink_prelude = { version = "=4.2.0", path = "crates/prelude", default-features = false }
ink_primitives = { version = "=4.2.0", path = "crates/primitives", default-features = false }
ink_storage = { version = "=4.2.0", path = "crates/storage", default-features = false }
ink_storage_traits = { version = "=4.2.0", path = "crates/storage/traits", default-features = false }

[profile.release]
panic = "abort"
lto = true
2 changes: 1 addition & 1 deletion FILE_HEADER
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018-2022 Parity Technologies (UK) Ltd.
// Copyright (C) Parity Technologies (UK) Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
20 changes: 10 additions & 10 deletions crates/allocator/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
[package]
name = "ink_allocator"
version = "4.2.0"
version.workspace = true
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
edition = "2021"
edition.workspace = true

license = "Apache-2.0"
license.workspace = true
readme = "README.md"
repository = "https://github.com/paritytech/ink"
repository.workspace = true
documentation = "https://docs.rs/ink_allocator/"
homepage = "https://www.parity.io/"
homepage.workspace = true
description = "[ink!] Bindings to the Wasm heap memory allocator."
keywords = ["wasm", "parity", "webassembly", "blockchain", "edsl"]
categories = ["no-std", "embedded"]
keywords.workspace = true
categories.workspace = true
include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE"]

[dependencies]
cfg-if = "1.0"
cfg-if = { workspace = true }

[dev-dependencies]
quickcheck = "1"
quickcheck_macros = "1"
quickcheck = { workspace = true }
quickcheck_macros = { workspace = true }

[features]
default = ["std"]
Expand Down
2 changes: 1 addition & 1 deletion crates/allocator/src/bump.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018-2022 Parity Technologies (UK) Ltd.
// Copyright (C) Parity Technologies (UK) Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion crates/allocator/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018-2022 Parity Technologies (UK) Ltd.
// Copyright (C) Parity Technologies (UK) Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
57 changes: 29 additions & 28 deletions crates/e2e/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,46 +1,47 @@
[package]
name = "ink_e2e"
version = "4.2.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"
version.workspace = true
authors.workspace = true
edition.workspace = true

license = "Apache-2.0"
license.workspace = true
readme = "README.md"
repository = "https://github.com/paritytech/ink"
repository.workspace = true
documentation = "https://docs.rs/ink_e2e/"
homepage = "https://www.parity.io/"
homepage.workspace = true
description = "[ink!] End-to-end testing framework for smart contracts."
keywords = ["wasm", "parity", "webassembly", "blockchain", "edsl"]
categories = ["no-std", "embedded"]
keywords.workspace = true
categories.workspace = true
include = ["/Cargo.toml", "src/**/*.rs", "/README.md", "/LICENSE"]

[dependencies]
ink_e2e_macro = { version = "4.2.0", path = "./macro" }
ink = { version = "4.2.0", path = "../ink" }
ink_env = { version = "4.2.0", path = "../env" }
ink_primitives = { version = "4.2.0", path = "../primitives" }
ink_e2e_macro = { workspace = true, default-features = true }
ink = { workspace = true, default-features = true }
ink_env = { workspace = true, default-features = true }
ink_primitives = { workspace = true, default-features = true }

funty = "2.0.0"
impl-serde = { version = "0.4.0", default-features = false }
jsonrpsee = { version = "0.18.0", features = ["ws-client"] }
serde = { version = "1.0.137", default-features = false, features = ["derive"] }
serde_json = { version = "1.0.81" }
tokio = { version = "1.18.2", features = ["rt-multi-thread"] }
tracing = "0.1.37"
tracing-subscriber = { version = "0.3.17", features = ["env-filter"] }
scale = { package = "parity-scale-codec", version = "3.4", default-features = false, features = ["derive"] }
subxt = "0.29.0"
funty = { workspace = true }
impl-serde = { workspace = true }
jsonrpsee = { workspace = true, features = ["ws-client"] }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
tokio = { workspace = true, features = ["rt-multi-thread"] }
tracing = { workspace = true }
tracing-subscriber = { workspace = true, features = ["env-filter"] }
scale = { package = "parity-scale-codec", workspace = true }
subxt = { workspace = true }
subxt-signer = { workspace = true, features = ["subxt", "sr25519"] }

# Substrate
pallet-contracts-primitives = "24.0.0"
sp-core = { version = "21.0.0", default-features = false }
sp-keyring = "24.0.0"
sp-runtime = "24.0.0"
sp-weights = "20.0.0"
pallet-contracts-primitives = { workspace = true }
sp-core = { workspace = true }
sp-keyring = { workspace = true }
sp-runtime = { workspace = true }
sp-weights = { workspace = true }

[dev-dependencies]
# Required for the doctest of `MessageBuilder::call`
scale-info = { version = "2.6", default-features = false, features = ["derive"] }
scale-info = { workspace = true, features = ["derive"] }

[features]
default = ["std"]
Expand Down
36 changes: 18 additions & 18 deletions crates/e2e/macro/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
[package]
name = "ink_e2e_macro"
version = "4.2.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"
version.workspace = true
authors.workspace = true
edition.workspace = true

license = "Apache-2.0"
license.workspace = true
readme = "../README.md"
repository = "https://github.com/paritytech/ink"
repository.workspace = true
documentation = "https://docs.rs/ink_macro/"
homepage = "https://www.parity.io/"
homepage.workspace = true
description = "[ink!] Macro for generating end-to-end tests"
keywords = ["wasm", "parity", "webassembly", "blockchain", "edsl"]
categories = ["no-std", "embedded"]
keywords.workspace = true
categories.workspace = true
include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE"]

[lib]
name = "ink_e2e_macro"
proc-macro = true

[dependencies]
ink_ir = { version = "4.2.0", path = "../../ink/ir" }
cargo_metadata = "0.15.3"
contract-build = "3.0.0"
derive_more = "0.99.17"
tracing-subscriber = { version = "0.3.17", features = ["env-filter"] }
serde_json = "1.0.89"
syn = "2"
proc-macro2 = "1"
quote = "1"
which = "4.4.0"
ink_ir = { workspace = true, default-features = true }
cargo_metadata = { workspace = true }
contract-build = { workspace = true }
derive_more = { workspace = true, default-features = true }
tracing-subscriber = { workspace = true, features = ["env-filter"] }
serde_json = { workspace = true }
syn = { workspace = true }
proc-macro2 = { workspace = true }
quote = { workspace = true }
which = { workspace = true }
3 changes: 2 additions & 1 deletion crates/e2e/macro/src/codegen.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018-2022 Parity Technologies (UK) Ltd.
// Copyright (C) Parity Technologies (UK) Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -293,6 +293,7 @@ fn build_contract(path_to_cargo_toml: &str) -> String {
output_type: OutputType::HumanReadable,
skip_wasm_validation: false,
target: Target::Wasm,
..ExecuteArgs::default()
};

match contract_build::execute(args) {
Expand Down
Loading

0 comments on commit 941125a

Please sign in to comment.