From 1fda82df3155b4d236f0820369f799a3bf90fd39 Mon Sep 17 00:00:00 2001 From: Shashank Trivedi <100513286+lordshashank@users.noreply.github.com> Date: Thu, 1 Aug 2024 15:18:51 +0530 Subject: [PATCH] chore: Enabled `unit-testing` feature in all the examples in dev-dependencies as it should be since 5.0 release (#1230) --- examples/adder/Cargo.toml | 1 + examples/callback-results/Cargo.toml | 1 + examples/cross-contract-calls/Cargo.toml | 2 +- examples/cross-contract-calls/high-level/Cargo.toml | 2 +- examples/cross-contract-calls/low-level/Cargo.toml | 2 +- examples/factory-contract/Cargo.toml | 1 + examples/factory-contract/high-level/Cargo.toml | 3 +++ examples/factory-contract/low-level/Cargo.toml | 3 +++ examples/fungible-token/ft/Cargo.toml | 3 +++ examples/fungible-token/test-contract-defi/Cargo.toml | 3 +++ examples/non-fungible-token/nft/Cargo.toml | 3 +++ examples/non-fungible-token/test-approval-receiver/Cargo.toml | 3 +++ examples/non-fungible-token/test-token-receiver/Cargo.toml | 3 +++ examples/test-contract/Cargo.toml | 3 +++ examples/versioned/Cargo.toml | 3 +++ 15 files changed, 33 insertions(+), 3 deletions(-) diff --git a/examples/adder/Cargo.toml b/examples/adder/Cargo.toml index d9c32d2df..adb000042 100644 --- a/examples/adder/Cargo.toml +++ b/examples/adder/Cargo.toml @@ -16,6 +16,7 @@ tokio = { version = "1.14", features = ["full"] } anyhow = "1.0" near-abi = "0.4.0" zstd = "0.13" +near-sdk = { path = "../../near-sdk", features = ["unit-testing"] } [profile.release] codegen-units = 1 diff --git a/examples/callback-results/Cargo.toml b/examples/callback-results/Cargo.toml index eaa22d94a..4c7d53234 100644 --- a/examples/callback-results/Cargo.toml +++ b/examples/callback-results/Cargo.toml @@ -14,6 +14,7 @@ near-sdk = { path = "../../near-sdk" } near-workspaces = "0.11.0" tokio = { version = "1.14", features = ["full"] } anyhow = "1.0" +near-sdk = { path = "../../near-sdk", features = ["unit-testing"] } [profile.release] codegen-units = 1 diff --git a/examples/cross-contract-calls/Cargo.toml b/examples/cross-contract-calls/Cargo.toml index ffb6ebef2..9e0109bde 100644 --- a/examples/cross-contract-calls/Cargo.toml +++ b/examples/cross-contract-calls/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" [dev-dependencies] anyhow = "1.0" -near-sdk = { path = "../../near-sdk" } +near-sdk = { path = "../../near-sdk", features = ["default", "unit-testing"] } test-case = "2.0" tokio = { version = "1.14", features = ["full"] } near-workspaces = "0.11.0" diff --git a/examples/cross-contract-calls/high-level/Cargo.toml b/examples/cross-contract-calls/high-level/Cargo.toml index 0f188089a..9db83ff40 100644 --- a/examples/cross-contract-calls/high-level/Cargo.toml +++ b/examples/cross-contract-calls/high-level/Cargo.toml @@ -8,4 +8,4 @@ edition = "2021" crate-type = ["cdylib"] [dependencies] -near-sdk = { path = "../../../near-sdk" } +near-sdk = { path = "../../../near-sdk" , features = ["default", "unit-testing"] } diff --git a/examples/cross-contract-calls/low-level/Cargo.toml b/examples/cross-contract-calls/low-level/Cargo.toml index 0b86d16b2..f2e635e31 100644 --- a/examples/cross-contract-calls/low-level/Cargo.toml +++ b/examples/cross-contract-calls/low-level/Cargo.toml @@ -8,4 +8,4 @@ edition = "2021" crate-type = ["cdylib"] [dependencies] -near-sdk = { path = "../../../near-sdk" } +near-sdk = { path = "../../../near-sdk" , features = ["default", "unit-testing"] } diff --git a/examples/factory-contract/Cargo.toml b/examples/factory-contract/Cargo.toml index d77685d7e..eea454614 100644 --- a/examples/factory-contract/Cargo.toml +++ b/examples/factory-contract/Cargo.toml @@ -9,6 +9,7 @@ anyhow = "1.0" test-case = "2.0" tokio = { version = "1.14", features = ["full"] } near-workspaces = "0.11.0" +near-sdk = { path = "../../near-sdk", features = ["unit-testing"] } [profile.release] codegen-units = 1 diff --git a/examples/factory-contract/high-level/Cargo.toml b/examples/factory-contract/high-level/Cargo.toml index ae04ffca5..3225e6ce5 100644 --- a/examples/factory-contract/high-level/Cargo.toml +++ b/examples/factory-contract/high-level/Cargo.toml @@ -9,3 +9,6 @@ crate-type = ["cdylib"] [dependencies] near-sdk = { path = "../../../near-sdk" } + +[dev-dependencies] +near-sdk = { path = "../../../near-sdk", features = ["unit-testing"] } diff --git a/examples/factory-contract/low-level/Cargo.toml b/examples/factory-contract/low-level/Cargo.toml index 27a11bfb0..2807fb8c2 100644 --- a/examples/factory-contract/low-level/Cargo.toml +++ b/examples/factory-contract/low-level/Cargo.toml @@ -9,3 +9,6 @@ crate-type = ["cdylib"] [dependencies] near-sdk = { path = "../../../near-sdk" } + +[dev-dependencies] +near-sdk = { path = "../../../near-sdk", features = ["unit-testing"] } diff --git a/examples/fungible-token/ft/Cargo.toml b/examples/fungible-token/ft/Cargo.toml index 664d923b0..652900622 100644 --- a/examples/fungible-token/ft/Cargo.toml +++ b/examples/fungible-token/ft/Cargo.toml @@ -10,3 +10,6 @@ crate-type = ["cdylib"] [dependencies] near-sdk = { path = "../../../near-sdk" } near-contract-standards = { path = "../../../near-contract-standards" } + +[dev-dependencies] +near-sdk = { path = "../../../near-sdk", features = ["unit-testing"] } \ No newline at end of file diff --git a/examples/fungible-token/test-contract-defi/Cargo.toml b/examples/fungible-token/test-contract-defi/Cargo.toml index 18348c7d3..cc314dba7 100644 --- a/examples/fungible-token/test-contract-defi/Cargo.toml +++ b/examples/fungible-token/test-contract-defi/Cargo.toml @@ -10,3 +10,6 @@ crate-type = ["cdylib"] [dependencies] near-sdk = { path = "../../../near-sdk" } near-contract-standards = { path = "../../../near-contract-standards" } + +[dev-dependencies] +near-sdk = { path = "../../../near-sdk", features = ["unit-testing"] } \ No newline at end of file diff --git a/examples/non-fungible-token/nft/Cargo.toml b/examples/non-fungible-token/nft/Cargo.toml index 16fd40d50..672e5e113 100644 --- a/examples/non-fungible-token/nft/Cargo.toml +++ b/examples/non-fungible-token/nft/Cargo.toml @@ -10,3 +10,6 @@ crate-type = ["cdylib"] [dependencies] near-sdk = { path = "../../../near-sdk" } near-contract-standards = { path = "../../../near-contract-standards" } + +[dev-dependencies] +near-sdk = { path = "../../../near-sdk", features = ["unit-testing"] } \ No newline at end of file diff --git a/examples/non-fungible-token/test-approval-receiver/Cargo.toml b/examples/non-fungible-token/test-approval-receiver/Cargo.toml index bbdd83128..7f9036e07 100644 --- a/examples/non-fungible-token/test-approval-receiver/Cargo.toml +++ b/examples/non-fungible-token/test-approval-receiver/Cargo.toml @@ -10,3 +10,6 @@ crate-type = ["cdylib"] [dependencies] near-sdk = { path = "../../../near-sdk" } near-contract-standards = { path = "../../../near-contract-standards" } + +[dev-dependencies] +near-sdk = { path = "../../../near-sdk", features = ["unit-testing"] } diff --git a/examples/non-fungible-token/test-token-receiver/Cargo.toml b/examples/non-fungible-token/test-token-receiver/Cargo.toml index c3677f76c..2a4eeaadf 100644 --- a/examples/non-fungible-token/test-token-receiver/Cargo.toml +++ b/examples/non-fungible-token/test-token-receiver/Cargo.toml @@ -10,3 +10,6 @@ crate-type = ["cdylib"] [dependencies] near-sdk = { path = "../../../near-sdk" } near-contract-standards = { path = "../../../near-contract-standards" } + +[dev-dependencies] +near-sdk = { path = "../../../near-sdk", features = ["unit-testing"] } \ No newline at end of file diff --git a/examples/test-contract/Cargo.toml b/examples/test-contract/Cargo.toml index c9bda7458..423588334 100644 --- a/examples/test-contract/Cargo.toml +++ b/examples/test-contract/Cargo.toml @@ -17,3 +17,6 @@ opt-level = "z" lto = true debug = false panic = "abort" + +[dev-dependencies] +near-sdk = { path = "../../near-sdk", features = ["unit-testing"] } diff --git a/examples/versioned/Cargo.toml b/examples/versioned/Cargo.toml index a3f236bfe..c689b4182 100644 --- a/examples/versioned/Cargo.toml +++ b/examples/versioned/Cargo.toml @@ -17,3 +17,6 @@ opt-level = "z" lto = true debug = false panic = "abort" + +[dev-dependencies] +near-sdk = { path = "../../near-sdk", features = ["unit-testing"] } \ No newline at end of file