From 787f49b17c2613d1a8fd5688db2506ea50a98d1e Mon Sep 17 00:00:00 2001 From: aon <21188659+aon@users.noreply.github.com> Date: Thu, 5 Oct 2023 18:13:07 -0300 Subject: [PATCH] Add cargo workspace for test-cases --- test-cases/Cargo.toml | 16 ++++++++++ test-cases/account-id/Cargo.toml | 14 +++----- test-cases/balance/Cargo.toml | 16 +++------- test-cases/block-number/Cargo.toml | 16 +++------- test-cases/call-runtime/Cargo.toml | 9 +++--- test-cases/caller-is-origin/Cargo.toml | 20 +++++------- .../contract-to-call/Cargo.toml | 26 +++++++++++++++ .../lib.rs | 0 .../contract_to_call/Cargo.toml | 32 ------------------- test-cases/caller-is-origin/lib.rs | 2 +- test-cases/caller/Cargo.toml | 14 +++----- test-cases/code-hash/Cargo.toml | 20 +++++------- test-cases/code-hash/lib.rs | 2 +- .../code-hash/other-contract/Cargo.toml | 26 +++++++++++++++ .../{other_contract => other-contract}/lib.rs | 0 .../code-hash/other_contract/Cargo.toml | 32 ------------------- test-cases/default-accounts/Cargo.toml | 14 +++----- test-cases/ecdsa-recover/Cargo.toml | 14 +++----- test-cases/gas-left/Cargo.toml | 14 +++----- test-cases/hash-bytes/Cargo.toml | 14 +++----- test-cases/hash-encoded/Cargo.toml | 14 +++----- test-cases/instantiate-contract/Cargo.toml | 28 +++++++--------- test-cases/instantiate-contract/lib.rs | 2 +- .../other-contract/Cargo.toml | 26 +++++++++++++++ .../{other_contract => other-contract}/lib.rs | 0 .../other_contract/Cargo.toml | 32 ------------------- .../invoke-contract-delegate/Cargo.toml | 18 ++++------- .../contract-to-call/Cargo.toml | 16 +++------- test-cases/invoke-contract-delegate/lib.rs | 1 + test-cases/invoke-contract/Cargo.toml | 20 +++++------- .../contract-to-call/Cargo.toml | 26 +++++++++++++++ .../lib.rs | 0 .../contract_to_call/Cargo.toml | 32 ------------------- test-cases/invoke-contract/lib.rs | 4 +-- test-cases/own-code-hash/Cargo.toml | 14 +++----- test-cases/set-code-hash/Cargo.toml | 19 ++++------- .../contract-replacement/Cargo.toml | 26 +++++++++++++++ .../lib.rs | 0 .../contract_replacement/Cargo.toml | 32 ------------------- test-cases/set-code-hash/lib.rs | 2 +- test-cases/set-contract-storage/Cargo.toml | 14 +++----- test-cases/template/Cargo.toml | 14 +++----- test-cases/terminate-contract/Cargo.toml | 14 +++----- test-cases/transfer/Cargo.toml | 14 +++----- 44 files changed, 270 insertions(+), 399 deletions(-) create mode 100644 test-cases/Cargo.toml create mode 100644 test-cases/caller-is-origin/contract-to-call/Cargo.toml rename test-cases/caller-is-origin/{contract_to_call => contract-to-call}/lib.rs (100%) delete mode 100644 test-cases/caller-is-origin/contract_to_call/Cargo.toml create mode 100644 test-cases/code-hash/other-contract/Cargo.toml rename test-cases/code-hash/{other_contract => other-contract}/lib.rs (100%) delete mode 100644 test-cases/code-hash/other_contract/Cargo.toml create mode 100644 test-cases/instantiate-contract/other-contract/Cargo.toml rename test-cases/instantiate-contract/{other_contract => other-contract}/lib.rs (100%) delete mode 100644 test-cases/instantiate-contract/other_contract/Cargo.toml create mode 100644 test-cases/invoke-contract/contract-to-call/Cargo.toml rename test-cases/invoke-contract/{contract_to_call => contract-to-call}/lib.rs (100%) delete mode 100644 test-cases/invoke-contract/contract_to_call/Cargo.toml create mode 100755 test-cases/set-code-hash/contract-replacement/Cargo.toml rename test-cases/set-code-hash/{contract_replacement => contract-replacement}/lib.rs (100%) delete mode 100755 test-cases/set-code-hash/contract_replacement/Cargo.toml diff --git a/test-cases/Cargo.toml b/test-cases/Cargo.toml new file mode 100644 index 0000000..d279b2e --- /dev/null +++ b/test-cases/Cargo.toml @@ -0,0 +1,16 @@ +[workspace] +members = ["*"] +exclude = [".cargo", "target", "template", "tmp"] +resolver = "2" + +[workspace.dependencies] +ink = { version = "4.3.0", default-features = false } +ink_e2e = "4.3.0" +scale = { package = "parity-scale-codec", version = "=3.6.5", default-features = false, features = ["derive"] } +scale-info = { version = "2.6", default-features = false, features = ["derive"] } + +[profile.dev] +overflow-checks = false + +[profile.release] +overflow-checks = false diff --git a/test-cases/account-id/Cargo.toml b/test-cases/account-id/Cargo.toml index ed8aa25..6795b8e 100644 --- a/test-cases/account-id/Cargo.toml +++ b/test-cases/account-id/Cargo.toml @@ -18,15 +18,9 @@ ink-as-dependency = [] e2e-tests = [] [dependencies] -ink = { version = "4.2.1", default-features = false } -scale = { package = "parity-scale-codec", version = "=3.6.5", default-features = false, features = ["derive"] } -scale-info = { version = "2.6", default-features = false, features = ["derive"], optional = true } +ink = { workspace = true } +scale = { workspace = true, package = "parity-scale-codec" } +scale-info = { workspace = true, optional = true } [dev-dependencies] -ink_e2e = "4.2.1" - -[profile.dev] -overflow-checks = false - -[profile.release] -overflow-checks = false +ink_e2e = { workspace = true } diff --git a/test-cases/balance/Cargo.toml b/test-cases/balance/Cargo.toml index 0aecc3c..b46a56c 100644 --- a/test-cases/balance/Cargo.toml +++ b/test-cases/balance/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "get_balance" +name = "balance" version = "0.1.0" edition = "2021" authors = ["[your_name] <[your_email]>"] @@ -18,15 +18,9 @@ ink-as-dependency = [] e2e-tests = [] [dependencies] -ink = { version = "4.3", default-features = false } -scale = { package = "parity-scale-codec", version = "=3.6.5", default-features = false, features = ["derive"] } -scale-info = { version = "2.6", default-features = false, features = ["derive"], optional = true } +ink = { workspace = true } +scale = { workspace = true, package = "parity-scale-codec" } +scale-info = { workspace = true, optional = true } [dev-dependencies] -ink_e2e = "4.3" - -[profile.dev] -overflow-checks = false - -[profile.release] -overflow-checks = false +ink_e2e = { workspace = true } diff --git a/test-cases/block-number/Cargo.toml b/test-cases/block-number/Cargo.toml index 78b97dc..486bd2b 100644 --- a/test-cases/block-number/Cargo.toml +++ b/test-cases/block-number/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "get-block-number" +name = "block-number" version = "0.1.0" edition = "2021" authors = ["[your_name] <[your_email]>"] @@ -18,15 +18,9 @@ ink-as-dependency = [] e2e-tests = [] [dependencies] -ink = { version = "4.3", default-features = false } -scale = { package = "parity-scale-codec", version = "=3.6.5", default-features = false, features = ["derive"] } -scale-info = { version = "2.6", default-features = false, features = ["derive"], optional = true } +ink = { workspace = true } +scale = { workspace = true, package = "parity-scale-codec" } +scale-info = { workspace = true, optional = true } [dev-dependencies] -ink_e2e = "4.3" - -[profile.dev] -overflow-checks = false - -[profile.release] -overflow-checks = false +ink_e2e = { workspace = true } diff --git a/test-cases/call-runtime/Cargo.toml b/test-cases/call-runtime/Cargo.toml index aca1228..fa394c1 100644 --- a/test-cases/call-runtime/Cargo.toml +++ b/test-cases/call-runtime/Cargo.toml @@ -6,10 +6,9 @@ edition = "2021" publish = false [dependencies] -ink = { version = "4.3", default-features = false, features = ["call-runtime"] } - -scale = { package = "parity-scale-codec", version = "=3.6.5", default-features = false, features = ["derive"] } -scale-info = { version = "2.5", default-features = false, features = ["derive"], optional = true } +ink = { workspace = true, features = ["call-runtime"] } +scale = { workspace = true, package = "parity-scale-codec" } +scale-info = { workspace = true, optional = true } # Substrate # @@ -21,7 +20,7 @@ sp-io = { version = "23.0.0", default-features = false, features = ["disable_pan sp-runtime = { version = "24.0.0", default-features = false } [dev-dependencies] -ink_e2e = { version = "4.3" } +ink_e2e = { workspace = true } [lib] path = "lib.rs" diff --git a/test-cases/caller-is-origin/Cargo.toml b/test-cases/caller-is-origin/Cargo.toml index f97cdaa..0eef018 100644 --- a/test-cases/caller-is-origin/Cargo.toml +++ b/test-cases/caller-is-origin/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "invoke_contract" +name = "caller-is-origin" version = "0.1.0" edition = "2021" authors = ["[your_name] <[your_email]>"] @@ -13,21 +13,17 @@ std = [ "ink/std", "scale/std", "scale-info/std", + "caller-is-origin-contract-to-call/std", ] ink-as-dependency = [] e2e-tests = [] [dependencies] -ink = { version = "4.2.1", default-features = false } -scale = { package = "parity-scale-codec", version = "=3.6.5", default-features = false, features = ["derive"] } -scale-info = { version = "2.6", default-features = false, features = ["derive"], optional = true } -contract_to_call = { path = "./contract_to_call", default-features = false, features = ["ink-as-dependency"] } +ink = { workspace = true } +scale = { workspace = true, package = "parity-scale-codec" } +scale-info = { workspace = true, optional = true } -[dev-dependencies] -ink_e2e = "4.2.1" - -[profile.dev] -overflow-checks = false +caller-is-origin-contract-to-call = { path = "./contract-to-call", default-features = false, features = ["ink-as-dependency"] } -[profile.release] -overflow-checks = false +[dev-dependencies] +ink_e2e = { workspace = true } diff --git a/test-cases/caller-is-origin/contract-to-call/Cargo.toml b/test-cases/caller-is-origin/contract-to-call/Cargo.toml new file mode 100644 index 0000000..319a8b8 --- /dev/null +++ b/test-cases/caller-is-origin/contract-to-call/Cargo.toml @@ -0,0 +1,26 @@ +[package] +name = "caller-is-origin-contract-to-call" +version = "0.1.0" +edition = "2021" +authors = ["[your_name] <[your_email]>"] + +[lib] +path = "lib.rs" + +[features] +default = ["std"] +std = [ + "ink/std", + "scale/std", + "scale-info/std", +] +ink-as-dependency = [] +e2e-tests = [] + +[dependencies] +ink = { workspace = true } +scale = { workspace = true, package = "parity-scale-codec" } +scale-info = { workspace = true, optional = true } + +[dev-dependencies] +ink_e2e = { workspace = true } diff --git a/test-cases/caller-is-origin/contract_to_call/lib.rs b/test-cases/caller-is-origin/contract-to-call/lib.rs similarity index 100% rename from test-cases/caller-is-origin/contract_to_call/lib.rs rename to test-cases/caller-is-origin/contract-to-call/lib.rs diff --git a/test-cases/caller-is-origin/contract_to_call/Cargo.toml b/test-cases/caller-is-origin/contract_to_call/Cargo.toml deleted file mode 100644 index c412e68..0000000 --- a/test-cases/caller-is-origin/contract_to_call/Cargo.toml +++ /dev/null @@ -1,32 +0,0 @@ -[package] -name = "contract_to_call" -version = "0.1.0" -edition = "2021" -authors = ["[your_name] <[your_email]>"] - -[lib] -path = "lib.rs" - -[features] -default = ["std"] -std = [ - "ink/std", - "scale/std", - "scale-info/std", -] -ink-as-dependency = [] -e2e-tests = [] - -[dependencies] -ink = { version = "4.2.1", default-features = false } -scale = { package = "parity-scale-codec", version = "3.6.5", default-features = false, features = ["derive"] } -scale-info = { version = "2.6", default-features = false, features = ["derive"], optional = true } - -[dev-dependencies] -ink_e2e = "4.2.1" - -[profile.dev] -overflow-checks = false - -[profile.release] -overflow-checks = false diff --git a/test-cases/caller-is-origin/lib.rs b/test-cases/caller-is-origin/lib.rs index 7dea923..7c30b44 100644 --- a/test-cases/caller-is-origin/lib.rs +++ b/test-cases/caller-is-origin/lib.rs @@ -48,7 +48,7 @@ mod invoke_contract { #[cfg(test)] mod tests { use super::*; - use contract_to_call::ContractToCall; + use caller_is_origin_contract_to_call::ContractToCall; // TODO: this test shouldn't panic when ink integration test is improved. #[ink::test] diff --git a/test-cases/caller/Cargo.toml b/test-cases/caller/Cargo.toml index 9c93a95..353a9d5 100644 --- a/test-cases/caller/Cargo.toml +++ b/test-cases/caller/Cargo.toml @@ -18,15 +18,9 @@ ink-as-dependency = [] e2e-tests = [] [dependencies] -ink = { version = "4.3.0", default-features = false } -scale = { package = "parity-scale-codec", version = "=3.6.5", default-features = false, features = ["derive"] } -scale-info = { version = "2.6", default-features = false, features = ["derive"], optional = true } +ink = { workspace = true } +scale = { workspace = true, package = "parity-scale-codec" } +scale-info = { workspace = true, optional = true } [dev-dependencies] -ink_e2e = "4.3.0" - -[profile.dev] -overflow-checks = false - -[profile.release] -overflow-checks = false +ink_e2e = { workspace = true } diff --git a/test-cases/code-hash/Cargo.toml b/test-cases/code-hash/Cargo.toml index 1fd055b..5be250c 100644 --- a/test-cases/code-hash/Cargo.toml +++ b/test-cases/code-hash/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "code_hash" +name = "code-hash" version = "0.1.0" edition = "2021" authors = ["[your_name] <[your_email]>"] @@ -13,21 +13,17 @@ std = [ "ink/std", "scale/std", "scale-info/std", + "code-hash-other-contract/std" ] ink-as-dependency = [] e2e-tests = [] [dependencies] -ink = { version = "4.2.1", default-features = false } -scale = { package = "parity-scale-codec", version = "=3.6.5", default-features = false, features = ["derive"] } -scale-info = { version = "2.6", default-features = false, features = ["derive"], optional = true } -other_contract = { path = "./other_contract", default-features = false, features = ["ink-as-dependency"] } +ink = { workspace = true } +scale = { workspace = true, package = "parity-scale-codec" } +scale-info = { workspace = true, optional = true } -[dev-dependencies] -ink_e2e = "4.2.1" - -[profile.dev] -overflow-checks = false +code-hash-other-contract = { path = "./other-contract", default-features = false, features = ["ink-as-dependency"] } -[profile.release] -overflow-checks = false +[dev-dependencies] +ink_e2e = { workspace = true } diff --git a/test-cases/code-hash/lib.rs b/test-cases/code-hash/lib.rs index cae5c6f..8819379 100644 --- a/test-cases/code-hash/lib.rs +++ b/test-cases/code-hash/lib.rs @@ -61,7 +61,7 @@ mod code_hash { #[cfg(all(test, feature = "e2e-tests"))] mod e2e_tests { use ink_e2e::build_message; - use other_contract::OtherContractRef; + use code_hash_other_contract::OtherContractRef; use super::*; diff --git a/test-cases/code-hash/other-contract/Cargo.toml b/test-cases/code-hash/other-contract/Cargo.toml new file mode 100644 index 0000000..dbe5d5b --- /dev/null +++ b/test-cases/code-hash/other-contract/Cargo.toml @@ -0,0 +1,26 @@ +[package] +name = "code-hash-other-contract" +version = "0.1.0" +edition = "2021" +authors = ["[your_name] <[your_email]>"] + +[lib] +path = "lib.rs" + +[features] +default = ["std"] +std = [ + "ink/std", + "scale/std", + "scale-info/std", +] +ink-as-dependency = [] +e2e-tests = [] + +[dependencies] +ink = { workspace = true } +scale = { workspace = true, package = "parity-scale-codec" } +scale-info = { workspace = true, optional = true } + +[dev-dependencies] +ink_e2e = { workspace = true } diff --git a/test-cases/code-hash/other_contract/lib.rs b/test-cases/code-hash/other-contract/lib.rs similarity index 100% rename from test-cases/code-hash/other_contract/lib.rs rename to test-cases/code-hash/other-contract/lib.rs diff --git a/test-cases/code-hash/other_contract/Cargo.toml b/test-cases/code-hash/other_contract/Cargo.toml deleted file mode 100644 index 97519f3..0000000 --- a/test-cases/code-hash/other_contract/Cargo.toml +++ /dev/null @@ -1,32 +0,0 @@ -[package] -name = "other_contract" -version = "0.1.0" -edition = "2021" -authors = ["[your_name] <[your_email]>"] - -[lib] -path = "lib.rs" - -[features] -default = ["std"] -std = [ - "ink/std", - "scale/std", - "scale-info/std", -] -ink-as-dependency = [] -e2e-tests = [] - -[dependencies] -ink = { version = "4.2.1", default-features = false } -scale = { package = "parity-scale-codec", version = "=3.6.5", default-features = false, features = ["derive"] } -scale-info = { version = "2.6", default-features = false, features = ["derive"], optional = true } - -[dev-dependencies] -ink_e2e = "4.2.1" - -[profile.dev] -overflow-checks = false - -[profile.release] -overflow-checks = false \ No newline at end of file diff --git a/test-cases/default-accounts/Cargo.toml b/test-cases/default-accounts/Cargo.toml index 0d53281..d7afcb1 100644 --- a/test-cases/default-accounts/Cargo.toml +++ b/test-cases/default-accounts/Cargo.toml @@ -18,15 +18,9 @@ ink-as-dependency = [] e2e-tests = [] [dependencies] -ink = { version = "4.2.1", default-features = false } -scale = { package = "parity-scale-codec", version = "=3.6.5", default-features = false, features = ["derive"] } -scale-info = { version = "2.6", default-features = false, features = ["derive"], optional = true } +ink = { workspace = true } +scale = { workspace = true, package = "parity-scale-codec" } +scale-info = { workspace = true, optional = true } [dev-dependencies] -ink_e2e = "4.2.1" - -[profile.dev] -overflow-checks = false - -[profile.release] -overflow-checks = false +ink_e2e = { workspace = true } diff --git a/test-cases/ecdsa-recover/Cargo.toml b/test-cases/ecdsa-recover/Cargo.toml index 151fc70..5d6b380 100644 --- a/test-cases/ecdsa-recover/Cargo.toml +++ b/test-cases/ecdsa-recover/Cargo.toml @@ -18,15 +18,9 @@ ink-as-dependency = [] e2e-tests = [] [dependencies] -ink = { version = "4.2.1", default-features = false } -scale = { package = "parity-scale-codec", version = "=3.6.5", default-features = false, features = ["derive"] } -scale-info = { version = "2.6", default-features = false, features = ["derive"], optional = true } +ink = { workspace = true } +scale = { workspace = true, package = "parity-scale-codec" } +scale-info = { workspace = true, optional = true } [dev-dependencies] -ink_e2e = "4.2.1" - -[profile.dev] -overflow-checks = false - -[profile.release] -overflow-checks = false +ink_e2e = { workspace = true } diff --git a/test-cases/gas-left/Cargo.toml b/test-cases/gas-left/Cargo.toml index 9cab6b6..6ff9e7c 100644 --- a/test-cases/gas-left/Cargo.toml +++ b/test-cases/gas-left/Cargo.toml @@ -18,15 +18,9 @@ ink-as-dependency = [] e2e-tests = [] [dependencies] -ink = { version = "4.2.1", default-features = false } -scale = { package = "parity-scale-codec", version = "=3.6.5", default-features = false, features = ["derive"] } -scale-info = { version = "2.6", default-features = false, features = ["derive"], optional = true } +ink = { workspace = true } +scale = { workspace = true, package = "parity-scale-codec" } +scale-info = { workspace = true, optional = true } [dev-dependencies] -ink_e2e = "4.2.1" - -[profile.dev] -overflow-checks = false - -[profile.release] -overflow-checks = false +ink_e2e = { workspace = true } diff --git a/test-cases/hash-bytes/Cargo.toml b/test-cases/hash-bytes/Cargo.toml index 244ba7e..f789fc7 100644 --- a/test-cases/hash-bytes/Cargo.toml +++ b/test-cases/hash-bytes/Cargo.toml @@ -18,15 +18,9 @@ ink-as-dependency = [] e2e-tests = [] [dependencies] -ink = { version = "4.2.1", default-features = false } -scale = { package = "parity-scale-codec", version = "=3.6.5", default-features = false, features = ["derive"] } -scale-info = { version = "2.6", default-features = false, features = ["derive"], optional = true } +ink = { workspace = true } +scale = { workspace = true, package = "parity-scale-codec" } +scale-info = { workspace = true, optional = true } [dev-dependencies] -ink_e2e = "4.2.1" - -[profile.dev] -overflow-checks = false - -[profile.release] -overflow-checks = false +ink_e2e = { workspace = true } diff --git a/test-cases/hash-encoded/Cargo.toml b/test-cases/hash-encoded/Cargo.toml index 240fed1..b498b85 100644 --- a/test-cases/hash-encoded/Cargo.toml +++ b/test-cases/hash-encoded/Cargo.toml @@ -18,15 +18,9 @@ ink-as-dependency = [] e2e-tests = [] [dependencies] -ink = { version = "4.2.1", default-features = false } -scale = { package = "parity-scale-codec", version = "=3.6.5", default-features = false, features = ["derive"] } -scale-info = { version = "2.6", default-features = false, features = ["derive"], optional = true } +ink = { workspace = true } +scale = { workspace = true, package = "parity-scale-codec" } +scale-info = { workspace = true, optional = true } [dev-dependencies] -ink_e2e = "4.2.1" - -[profile.dev] -overflow-checks = false - -[profile.release] -overflow-checks = false \ No newline at end of file +ink_e2e = { workspace = true } diff --git a/test-cases/instantiate-contract/Cargo.toml b/test-cases/instantiate-contract/Cargo.toml index 2a9fab9..937ca74 100644 --- a/test-cases/instantiate-contract/Cargo.toml +++ b/test-cases/instantiate-contract/Cargo.toml @@ -9,27 +9,23 @@ path = "lib.rs" [features] default = ["std"] -std = ["ink/std", "scale/std", "scale-info/std", "other_contract/std"] +std = [ + "ink/std", + "scale/std", + "scale-info/std", + "instantiate-contract-other-contract/std" +] ink-as-dependency = [] e2e-tests = [] [dependencies] -ink = { version = "4.2.1", default-features = false } -scale = { package = "parity-scale-codec", version = "=3.6.5", default-features = false, features = [ - "derive", -] } -scale-info = { version = "2.6", default-features = false, features = [ - "derive", -], optional = true } -other_contract = { path = "./other_contract", default-features = false, features = [ +ink = { workspace = true } +scale = { workspace = true, package = "parity-scale-codec" } +scale-info = { workspace = true, optional = true } + +instantiate-contract-other-contract = { path = "./other-contract", default-features = false, features = [ "ink-as-dependency", ] } [dev-dependencies] -ink_e2e = "4.2.1" - -[profile.dev] -overflow-checks = false - -[profile.release] -overflow-checks = false +ink_e2e = { workspace = true } diff --git a/test-cases/instantiate-contract/lib.rs b/test-cases/instantiate-contract/lib.rs index 2b1b50d..f3f9ba7 100644 --- a/test-cases/instantiate-contract/lib.rs +++ b/test-cases/instantiate-contract/lib.rs @@ -2,7 +2,7 @@ #[ink::contract] mod instantiate_contract { - use other_contract::OtherContractRef; + use instantiate_contract_other_contract::OtherContractRef; #[ink(storage)] pub struct InstantiateContract {} diff --git a/test-cases/instantiate-contract/other-contract/Cargo.toml b/test-cases/instantiate-contract/other-contract/Cargo.toml new file mode 100644 index 0000000..33235a3 --- /dev/null +++ b/test-cases/instantiate-contract/other-contract/Cargo.toml @@ -0,0 +1,26 @@ +[package] +name = "instantiate-contract-other-contract" +version = "0.1.0" +edition = "2021" +authors = ["[your_name] <[your_email]>"] + +[lib] +path = "lib.rs" + +[features] +default = ["std"] +std = [ + "ink/std", + "scale/std", + "scale-info/std" +] +ink-as-dependency = [] +e2e-tests = [] + +[dependencies] +ink = { workspace = true } +scale = { workspace = true, package = "parity-scale-codec" } +scale-info = { workspace = true, optional = true } + +[dev-dependencies] +ink_e2e = { workspace = true } diff --git a/test-cases/instantiate-contract/other_contract/lib.rs b/test-cases/instantiate-contract/other-contract/lib.rs similarity index 100% rename from test-cases/instantiate-contract/other_contract/lib.rs rename to test-cases/instantiate-contract/other-contract/lib.rs diff --git a/test-cases/instantiate-contract/other_contract/Cargo.toml b/test-cases/instantiate-contract/other_contract/Cargo.toml deleted file mode 100644 index 9f89c23..0000000 --- a/test-cases/instantiate-contract/other_contract/Cargo.toml +++ /dev/null @@ -1,32 +0,0 @@ -[package] -name = "other_contract" -version = "0.1.0" -edition = "2021" -authors = ["[your_name] <[your_email]>"] - -[lib] -path = "lib.rs" - -[features] -default = ["std"] -std = ["ink/std", "scale/std", "scale-info/std"] -ink-as-dependency = [] -e2e-tests = [] - -[dependencies] -ink = { version = "4.2.1", default-features = false } -scale = { package = "parity-scale-codec", version = "=3.6.5", default-features = false, features = [ - "derive", -] } -scale-info = { version = "2.6", default-features = false, features = [ - "derive", -], optional = true } - -[dev-dependencies] -ink_e2e = "4.2.1" - -[profile.dev] -overflow-checks = false - -[profile.release] -overflow-checks = false diff --git a/test-cases/invoke-contract-delegate/Cargo.toml b/test-cases/invoke-contract-delegate/Cargo.toml index f50ce30..26ee072 100644 --- a/test-cases/invoke-contract-delegate/Cargo.toml +++ b/test-cases/invoke-contract-delegate/Cargo.toml @@ -13,21 +13,17 @@ std = [ "ink/std", "scale/std", "scale-info/std", + "invoke-contract-delegate-contract-to-call/std", ] ink-as-dependency = [] e2e-tests = [] [dependencies] -ink = { version = "4.2.1", default-features = false } -scale = { package = "parity-scale-codec", version = "=3.6.5", default-features = false, features = ["derive"] } -scale-info = { version = "2.6", default-features = false, features = ["derive"], optional = true } -contract-to-call = { path = "contract-to-call", default-features = false, features = ["ink-as-dependency"] } +ink = { workspace = true } +scale = { workspace = true, package = "parity-scale-codec" } +scale-info = { workspace = true, optional = true } -[dev-dependencies] -ink_e2e = "4.2.1" - -[profile.dev] -overflow-checks = false +invoke-contract-delegate-contract-to-call = { path = "contract-to-call", default-features = false, features = ["ink-as-dependency"] } -[profile.release] -overflow-checks = false +[dev-dependencies] +ink_e2e = { workspace = true } diff --git a/test-cases/invoke-contract-delegate/contract-to-call/Cargo.toml b/test-cases/invoke-contract-delegate/contract-to-call/Cargo.toml index 6848ace..ad6587b 100644 --- a/test-cases/invoke-contract-delegate/contract-to-call/Cargo.toml +++ b/test-cases/invoke-contract-delegate/contract-to-call/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "contract-to-call" +name = "invoke-contract-delegate-contract-to-call" version = "0.1.0" edition = "2021" authors = ["[your_name] <[your_email]>"] @@ -18,15 +18,9 @@ ink-as-dependency = [] e2e-tests = [] [dependencies] -ink = { version = "4.2.1", default-features = false } -scale = { package = "parity-scale-codec", version = "3.6.5", default-features = false, features = ["derive"] } -scale-info = { version = "2.6", default-features = false, features = ["derive"], optional = true } +ink = { workspace = true } +scale = { workspace = true, package = "parity-scale-codec" } +scale-info = { workspace = true, optional = true } [dev-dependencies] -ink_e2e = "4.2.1" - -[profile.dev] -overflow-checks = false - -[profile.release] -overflow-checks = false +ink_e2e = { workspace = true } diff --git a/test-cases/invoke-contract-delegate/lib.rs b/test-cases/invoke-contract-delegate/lib.rs index 8ac83cc..6d25f6a 100644 --- a/test-cases/invoke-contract-delegate/lib.rs +++ b/test-cases/invoke-contract-delegate/lib.rs @@ -4,6 +4,7 @@ mod invoke_contract_delegate { use ink::env::call::{build_call, ExecutionInput, Selector}; use ink::env::DefaultEnvironment; + #[ink(storage)] pub struct InvokeContractDelegate { value: u128, diff --git a/test-cases/invoke-contract/Cargo.toml b/test-cases/invoke-contract/Cargo.toml index f97cdaa..0da3b61 100644 --- a/test-cases/invoke-contract/Cargo.toml +++ b/test-cases/invoke-contract/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "invoke_contract" +name = "invoke-contract" version = "0.1.0" edition = "2021" authors = ["[your_name] <[your_email]>"] @@ -13,21 +13,17 @@ std = [ "ink/std", "scale/std", "scale-info/std", + "invoke-contract-contract-to-call/std", ] ink-as-dependency = [] e2e-tests = [] [dependencies] -ink = { version = "4.2.1", default-features = false } -scale = { package = "parity-scale-codec", version = "=3.6.5", default-features = false, features = ["derive"] } -scale-info = { version = "2.6", default-features = false, features = ["derive"], optional = true } -contract_to_call = { path = "./contract_to_call", default-features = false, features = ["ink-as-dependency"] } +ink = { workspace = true } +scale = { workspace = true, package = "parity-scale-codec" } +scale-info = { workspace = true, optional = true } -[dev-dependencies] -ink_e2e = "4.2.1" - -[profile.dev] -overflow-checks = false +invoke-contract-contract-to-call = { path = "./contract-to-call", default-features = false, features = ["ink-as-dependency"] } -[profile.release] -overflow-checks = false +[dev-dependencies] +ink_e2e = { workspace = true } diff --git a/test-cases/invoke-contract/contract-to-call/Cargo.toml b/test-cases/invoke-contract/contract-to-call/Cargo.toml new file mode 100644 index 0000000..0d3e56f --- /dev/null +++ b/test-cases/invoke-contract/contract-to-call/Cargo.toml @@ -0,0 +1,26 @@ +[package] +name = "invoke-contract-contract-to-call" +version = "0.1.0" +edition = "2021" +authors = ["[your_name] <[your_email]>"] + +[lib] +path = "lib.rs" + +[features] +default = ["std"] +std = [ + "ink/std", + "scale/std", + "scale-info/std", +] +ink-as-dependency = [] +e2e-tests = [] + +[dependencies] +ink = { workspace = true } +scale = { workspace = true, package = "parity-scale-codec" } +scale-info = { workspace = true, optional = true } + +[dev-dependencies] +ink_e2e = { workspace = true } diff --git a/test-cases/invoke-contract/contract_to_call/lib.rs b/test-cases/invoke-contract/contract-to-call/lib.rs similarity index 100% rename from test-cases/invoke-contract/contract_to_call/lib.rs rename to test-cases/invoke-contract/contract-to-call/lib.rs diff --git a/test-cases/invoke-contract/contract_to_call/Cargo.toml b/test-cases/invoke-contract/contract_to_call/Cargo.toml deleted file mode 100644 index c412e68..0000000 --- a/test-cases/invoke-contract/contract_to_call/Cargo.toml +++ /dev/null @@ -1,32 +0,0 @@ -[package] -name = "contract_to_call" -version = "0.1.0" -edition = "2021" -authors = ["[your_name] <[your_email]>"] - -[lib] -path = "lib.rs" - -[features] -default = ["std"] -std = [ - "ink/std", - "scale/std", - "scale-info/std", -] -ink-as-dependency = [] -e2e-tests = [] - -[dependencies] -ink = { version = "4.2.1", default-features = false } -scale = { package = "parity-scale-codec", version = "3.6.5", default-features = false, features = ["derive"] } -scale-info = { version = "2.6", default-features = false, features = ["derive"], optional = true } - -[dev-dependencies] -ink_e2e = "4.2.1" - -[profile.dev] -overflow-checks = false - -[profile.release] -overflow-checks = false diff --git a/test-cases/invoke-contract/lib.rs b/test-cases/invoke-contract/lib.rs index 05aa96f..3e46669 100644 --- a/test-cases/invoke-contract/lib.rs +++ b/test-cases/invoke-contract/lib.rs @@ -68,7 +68,7 @@ mod invoke_contract { #[cfg(all(test, feature = "e2e-tests"))] mod e2e_tests { - use contract_to_call::ContractToCallRef; + use invoke_contract_contract_to_call::ContractToCallRef; use ink_e2e::build_message; use super::*; @@ -100,7 +100,7 @@ mod invoke_contract { .expect("Account id doesn't exist"); } - #[ink_e2e::test(additional_contracts = "./contract_to_call/Cargo.toml")] + #[ink_e2e::test(additional_contracts = "./contract-to-call/Cargo.toml")] async fn invoke_contract_works(mut client: ink_e2e::Client) -> E2EResult<()> { let original_contract_contructor = InvokeContractRef::new(); let contract_to_call_constructor = ContractToCallRef::new(); diff --git a/test-cases/own-code-hash/Cargo.toml b/test-cases/own-code-hash/Cargo.toml index d4b8dbe..c7272d3 100644 --- a/test-cases/own-code-hash/Cargo.toml +++ b/test-cases/own-code-hash/Cargo.toml @@ -18,15 +18,9 @@ ink-as-dependency = [] e2e-tests = [] [dependencies] -ink = { version = "4.2.1", default-features = false } -scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] } -scale-info = { version = "2.6", default-features = false, features = ["derive"], optional = true } +ink = { workspace = true } +scale = { workspace = true, package = "parity-scale-codec" } +scale-info = { workspace = true, optional = true } [dev-dependencies] -ink_e2e = "4.2.1" - -[profile.dev] -overflow-checks = false - -[profile.release] -overflow-checks = false +ink_e2e = { workspace = true } diff --git a/test-cases/set-code-hash/Cargo.toml b/test-cases/set-code-hash/Cargo.toml index d64a1c1..e1bc542 100755 --- a/test-cases/set-code-hash/Cargo.toml +++ b/test-cases/set-code-hash/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "set_code_hash" +name = "set-code-hash" version = "0.1.0" authors = ["[your_name] <[your_email]>"] edition = "2021" @@ -18,16 +18,11 @@ ink-as-dependency = [] e2e-tests = [] [dependencies] -ink = { version = "4.2.1", default-features = false } -scale = { package = "parity-scale-codec", version = "=3.6.5", default-features = false, features = ["derive"] } -scale-info = { version = "2.6", default-features = false, features = ["derive"], optional = true } -contract_replacement = { path = "contract_replacement", default-features = false, features = ["ink-as-dependency"] } +ink = { workspace = true } +scale = { workspace = true, package = "parity-scale-codec" } +scale-info = { workspace = true, optional = true } -[dev-dependencies] -ink_e2e = "4.2.1" - -[profile.release] -overflow-checks = false +set-code-hash-contract-replacement = { path = "./contract-replacement", default-features = false, features = ["ink-as-dependency"] } -[profile.dev] -overflow-checks = false +[dev-dependencies] +ink_e2e = { workspace = true } diff --git a/test-cases/set-code-hash/contract-replacement/Cargo.toml b/test-cases/set-code-hash/contract-replacement/Cargo.toml new file mode 100755 index 0000000..af60cb7 --- /dev/null +++ b/test-cases/set-code-hash/contract-replacement/Cargo.toml @@ -0,0 +1,26 @@ +[package] +name = "set-code-hash-contract-replacement" +version = "0.1.0" +authors = ["[your_name] <[your_email]>"] +edition = "2021" + +[lib] +path = "lib.rs" + +[features] +default = ["std"] +std = [ + "ink/std", + "scale/std", + "scale-info/std", +] +ink-as-dependency = [] +e2e-tests = [] + +[dependencies] +ink = { workspace = true } +scale = { workspace = true, package = "parity-scale-codec" } +scale-info = { workspace = true, optional = true } + +[dev-dependencies] +ink_e2e = { workspace = true } diff --git a/test-cases/set-code-hash/contract_replacement/lib.rs b/test-cases/set-code-hash/contract-replacement/lib.rs similarity index 100% rename from test-cases/set-code-hash/contract_replacement/lib.rs rename to test-cases/set-code-hash/contract-replacement/lib.rs diff --git a/test-cases/set-code-hash/contract_replacement/Cargo.toml b/test-cases/set-code-hash/contract_replacement/Cargo.toml deleted file mode 100755 index b77840a..0000000 --- a/test-cases/set-code-hash/contract_replacement/Cargo.toml +++ /dev/null @@ -1,32 +0,0 @@ -[package] -name = "contract_replacement" -version = "0.1.0" -authors = ["[your_name] <[your_email]>"] -edition = "2021" - -[lib] -path = "lib.rs" - -[features] -default = ["std"] -std = [ - "ink/std", - "scale/std", - "scale-info/std", -] -ink-as-dependency = [] -e2e-tests = [] - -[dependencies] -ink = { version = "4.2.1", default-features = false } -scale = { package = "parity-scale-codec", version = "3.6.5", default-features = false, features = ["derive"] } -scale-info = { version = "2.6", default-features = false, features = ["derive"], optional = true } - -[dev-dependencies] -ink_e2e = "4.2.1" - -[profile.release] -overflow-checks = false - -[profile.dev] -overflow-checks = false diff --git a/test-cases/set-code-hash/lib.rs b/test-cases/set-code-hash/lib.rs index 1e75508..ccc9ee5 100755 --- a/test-cases/set-code-hash/lib.rs +++ b/test-cases/set-code-hash/lib.rs @@ -77,7 +77,7 @@ mod set_code_hash { type E2EResult = std::result::Result>; - #[ink_e2e::test(additional_contracts = "./contract_replacement/Cargo.toml")] + #[ink_e2e::test(additional_contracts = "./contract-replacement/Cargo.toml")] async fn update_code_works(mut client: ink_e2e::Client) -> E2EResult<()> { // Instantiate contract let constructor = SetCodeHashRef::new(); diff --git a/test-cases/set-contract-storage/Cargo.toml b/test-cases/set-contract-storage/Cargo.toml index 35b36e1..a407a32 100644 --- a/test-cases/set-contract-storage/Cargo.toml +++ b/test-cases/set-contract-storage/Cargo.toml @@ -18,15 +18,9 @@ ink-as-dependency = [] e2e-tests = [] [dependencies] -ink = { version = "4.2.1", default-features = false } -scale = { package = "parity-scale-codec", version = "=3.6.5", default-features = false, features = ["derive"] } -scale-info = { version = "2.6", default-features = false, features = ["derive"], optional = true } +ink = { workspace = true } +scale = { workspace = true, package = "parity-scale-codec" } +scale-info = { workspace = true, optional = true } [dev-dependencies] -ink_e2e = "4.2.1" - -[profile.dev] -overflow-checks = false - -[profile.release] -overflow-checks = false +ink_e2e = { workspace = true } diff --git a/test-cases/template/Cargo.toml b/test-cases/template/Cargo.toml index baaaf4d..1f2057b 100644 --- a/test-cases/template/Cargo.toml +++ b/test-cases/template/Cargo.toml @@ -18,15 +18,9 @@ ink-as-dependency = [] e2e-tests = [] [dependencies] -ink = { version = "4.2.1", default-features = false } -scale = { package = "parity-scale-codec", version = "=3.6.5", default-features = false, features = ["derive"] } -scale-info = { version = "2.6", default-features = false, features = ["derive"], optional = true } +ink = { workspace = true } +scale = { workspace = true, package = "parity-scale-codec" } +scale-info = { workspace = true, optional = true } [dev-dependencies] -ink_e2e = "4.2.1" - -[profile.dev] -overflow-checks = false - -[profile.release] -overflow-checks = false +ink_e2e = { workspace = true } diff --git a/test-cases/terminate-contract/Cargo.toml b/test-cases/terminate-contract/Cargo.toml index 664e43a..13d6261 100644 --- a/test-cases/terminate-contract/Cargo.toml +++ b/test-cases/terminate-contract/Cargo.toml @@ -18,15 +18,9 @@ ink-as-dependency = [] e2e-tests = [] [dependencies] -ink = { version = "4.2.1", default-features = false } -scale = { package = "parity-scale-codec", version = "=3.6.5", default-features = false, features = ["derive"] } -scale-info = { version = "2.6", default-features = false, features = ["derive"], optional = true } +ink = { workspace = true } +scale = { workspace = true, package = "parity-scale-codec" } +scale-info = { workspace = true } [dev-dependencies] -ink_e2e = "4.2.1" - -[profile.dev] -overflow-checks = false - -[profile.release] -overflow-checks = false +ink_e2e = { workspace = true } diff --git a/test-cases/transfer/Cargo.toml b/test-cases/transfer/Cargo.toml index 0abbb90..65ca8bd 100644 --- a/test-cases/transfer/Cargo.toml +++ b/test-cases/transfer/Cargo.toml @@ -18,15 +18,9 @@ ink-as-dependency = [] e2e-tests = [] [dependencies] -ink = { version = "4.3.0", default-features = false } -scale = { package = "parity-scale-codec", version = "=3.6.5", default-features = false, features = ["derive"] } -scale-info = { version = "2.6", default-features = false, features = ["derive"], optional = true } +ink = { workspace = true } +scale = { workspace = true, package = "parity-scale-codec" } +scale-info = { workspace = true, optional = true } [dev-dependencies] -ink_e2e = "4.3.0" - -[profile.dev] -overflow-checks = false - -[profile.release] -overflow-checks = false +ink_e2e = { workspace = true }