diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 06a9c504f48..0ef03237bc4 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -102,15 +102,15 @@ jobs: $delegator_subcontracts = "accumulator","adder","subber" foreach ($contract in $delegator_subcontracts) { echo "Processing delegator contract: $contract"; - cargo ${{ matrix.job }} --verbose --manifest-path examples/delegator/${contract}/Cargo.toml; + cargo ${{ matrix.job }} --verbose --manifest-path integration-tests/delegator/${contract}/Cargo.toml; } $upgradeable_contracts = "forward-calls","set-code-hash" foreach ($contract in $upgradeable_contracts) { echo "Processing upgradeable contract: $contract"; - cargo ${{ matrix.job }} --verbose --manifest-path examples/upgradeable-contracts/${contract}/Cargo.toml; + cargo ${{ matrix.job }} --verbose --manifest-path integration-tests/upgradeable-contracts/${contract}/Cargo.toml; } - cargo ${{ matrix.job }} --verbose --manifest-path examples/upgradeable-contracts/set-code-hash/updated-incrementer/Cargo.toml; - foreach ($example in Get-ChildItem -Directory "examples\*") { + cargo ${{ matrix.job }} --verbose --manifest-path integration-tests/upgradeable-contracts/set-code-hash/updated-incrementer/Cargo.toml; + foreach ($example in Get-ChildItem -Directory "integration-tests\*") { if ($example -Match 'upgradeable-contracts') { continue } if ($example -Match 'lang-err-integration-tests') { continue } echo "Processing example: $example"; @@ -118,21 +118,21 @@ jobs: cargo clean --manifest-path=$example/Cargo.toml; } - - name: ${{ matrix.job }} examples on ${{ matrix.platform }}-${{ matrix.toolchain }} + - name: ${{ matrix.job }} integration-tests on ${{ matrix.platform }}-${{ matrix.toolchain }} if: runner.os == 'macOS' run: | for contract in ${DELEGATOR_SUBCONTRACTS}; do echo "Processing delegator contract: $contract"; - cargo ${{ matrix.job }} --verbose --manifest-path examples/delegator/${contract}/Cargo.toml; + cargo ${{ matrix.job }} --verbose --manifest-path integration-tests/delegator/${contract}/Cargo.toml; done for contract in ${UPGRADEABLE_CONTRACTS}; do echo "Processing upgradeable contract: $contract"; - cargo ${{ matrix.job }} --verbose --manifest-path=examples/upgradeable-contracts/$contract/Cargo.toml; + cargo ${{ matrix.job }} --verbose --manifest-path=integration-tests/upgradeable-contracts/$contract/Cargo.toml; done - cargo ${{ matrix.job }} --verbose --manifest-path=examples/upgradeable-contracts/set-code-hash/updated-incrementer/Cargo.toml; - for example in examples/*/; do - if [ "$example" = "examples/upgradeable-contracts/" ]; then continue; fi; - if [ "$example" = "examples/lang-err-integration-tests/" ]; then continue; fi; + cargo ${{ matrix.job }} --verbose --manifest-path=integration-tests/upgradeable-contracts/set-code-hash/updated-incrementer/Cargo.toml; + for example in integration-tests/*/; do + if [ "$example" = "integration-tests/upgradeable-contracts/" ]; then continue; fi; + if [ "$example" = "integration-tests/lang-err-integration-tests/" ]; then continue; fi; echo "Processing example: $example"; cargo ${{ matrix.job }} --verbose --manifest-path=$example/Cargo.toml; done diff --git a/.gitignore b/.gitignore index 99d49594af8..3a905f1e9dd 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,7 @@ /model/target/ /lang/target/ /primitives/target/ -/examples/**/target/ +/integration-tests/**/target/ /design/ # Ignore backup files creates by cargo fmt. diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d3f8b0047b4..2c45a110e9e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -95,7 +95,7 @@ spellcheck: <<: *test-refs script: - cargo spellcheck check -v --cfg=.config/cargo_spellcheck.toml --checkers hunspell --code 1 -- recursive . - - cargo spellcheck check -v --cfg=.config/cargo_spellcheck.toml --checkers hunspell --code 1 -- recursive ./examples/* + - cargo spellcheck check -v --cfg=.config/cargo_spellcheck.toml --checkers hunspell --code 1 -- recursive ./integration-tests/* allow_failure: true fmt: @@ -115,23 +115,23 @@ examples-fmt: <<: *test-refs script: # Note that we disable the license header check for the examples, since they are unlicensed. - - for example in examples/*/; do - if [ "$example" = "examples/upgradeable-contracts/" ]; then continue; fi; - if [ "$example" = "examples/lang-err-integration-tests/" ]; then continue; fi; + - for example in integration-tests/*/; do + if [ "$example" = "integration-tests/upgradeable-contracts/" ]; then continue; fi; + if [ "$example" = "integration-tests/lang-err-integration-tests/" ]; then continue; fi; cargo +nightly fmt --verbose --manifest-path ${example}/Cargo.toml -- --check; done - for contract in ${DELEGATOR_SUBCONTRACTS}; do - cargo +nightly fmt --verbose --manifest-path ./examples/delegator/${contract}/Cargo.toml -- --check; + cargo +nightly fmt --verbose --manifest-path ./integration-tests/delegator/${contract}/Cargo.toml -- --check; done - for contract in ${UPGRADEABLE_CONTRACTS}; do - cargo +nightly fmt --verbose --manifest-path ./examples/upgradeable-contracts/${contract}/Cargo.toml -- --check; + cargo +nightly fmt --verbose --manifest-path ./integration-tests/upgradeable-contracts/${contract}/Cargo.toml -- --check; done - for contract in ${LANG_ERR_INTEGRATION_CONTRACTS}; do - cargo +nightly fmt --verbose --manifest-path ./examples/lang-err-integration-tests/${contract}/Cargo.toml -- --check; + cargo +nightly fmt --verbose --manifest-path ./integration-tests/lang-err-integration-tests/${contract}/Cargo.toml -- --check; done - - cargo +nightly fmt --verbose --manifest-path ./examples/upgradeable-contracts/set-code-hash/updated-incrementer/Cargo.toml -- --check + - cargo +nightly fmt --verbose --manifest-path ./integration-tests/upgradeable-contracts/set-code-hash/updated-incrementer/Cargo.toml -- --check # This file is not a part of the cargo project, so it wouldn't be formatted the usual way - - rustfmt +nightly --verbose --check ./examples/psp22-extension/runtime/psp22-extension-example.rs + - rustfmt +nightly --verbose --check ./integration-tests/psp22-extension/runtime/psp22-extension-example.rs allow_failure: true clippy-std: @@ -158,21 +158,21 @@ examples-clippy-std: <<: *docker-env <<: *test-refs script: - - for example in examples/*/; do - if [ "$example" = "examples/upgradeable-contracts/" ]; then continue; fi; - if [ "$example" = "examples/lang-err-integration-tests/" ]; then continue; fi; + - for example in integration-tests/*/; do + if [ "$example" = "integration-tests/upgradeable-contracts/" ]; then continue; fi; + if [ "$example" = "integration-tests/lang-err-integration-tests/" ]; then continue; fi; cargo clippy --verbose --all-targets --manifest-path ${example}/Cargo.toml -- -D warnings -A $CLIPPY_ALLOWED; done - for contract in ${DELEGATOR_SUBCONTRACTS}; do - cargo clippy --verbose --all-targets --manifest-path ./examples/delegator/${contract}/Cargo.toml -- -D warnings -A $CLIPPY_ALLOWED; + cargo clippy --verbose --all-targets --manifest-path ./integration-tests/delegator/${contract}/Cargo.toml -- -D warnings -A $CLIPPY_ALLOWED; done - for contract in ${UPGRADEABLE_CONTRACTS}; do - cargo clippy --verbose --all-targets --manifest-path ./examples/upgradeable-contracts/${contract}/Cargo.toml -- -D warnings -A $CLIPPY_ALLOWED; + cargo clippy --verbose --all-targets --manifest-path ./integration-tests/upgradeable-contracts/${contract}/Cargo.toml -- -D warnings -A $CLIPPY_ALLOWED; done - for contract in ${LANG_ERR_INTEGRATION_CONTRACTS}; do - cargo clippy --verbose --all-targets --manifest-path ./examples/lang-err-integration-tests/${contract}/Cargo.toml -- -D warnings -A $CLIPPY_ALLOWED; + cargo clippy --verbose --all-targets --manifest-path ./integration-tests/lang-err-integration-tests/${contract}/Cargo.toml -- -D warnings -A $CLIPPY_ALLOWED; done - - cargo clippy --verbose --all-targets --manifest-path ./examples/upgradeable-contracts/set-code-hash/updated-incrementer/Cargo.toml -- -D warnings -A $CLIPPY_ALLOWED; + - cargo clippy --verbose --all-targets --manifest-path ./integration-tests/upgradeable-contracts/set-code-hash/updated-incrementer/Cargo.toml -- -D warnings -A $CLIPPY_ALLOWED; allow_failure: true examples-clippy-wasm: @@ -180,21 +180,21 @@ examples-clippy-wasm: <<: *docker-env <<: *test-refs script: - - for example in examples/*/; do - if [ "$example" = "examples/upgradeable-contracts/" ]; then continue; fi; - if [ "$example" = "examples/lang-err-integration-tests/" ]; then continue; fi; + - for example in integration-tests/*/; do + if [ "$example" = "integration-tests/upgradeable-contracts/" ]; then continue; fi; + if [ "$example" = "integration-tests/lang-err-integration-tests/" ]; then continue; fi; cargo clippy --verbose --manifest-path ${example}/Cargo.toml --no-default-features --target wasm32-unknown-unknown -- -D warnings -A $CLIPPY_ALLOWED; done - for contract in ${DELEGATOR_SUBCONTRACTS}; do - cargo clippy --verbose --manifest-path ./examples/delegator/${contract}/Cargo.toml --no-default-features --target wasm32-unknown-unknown -- -D warnings -A $CLIPPY_ALLOWED; + cargo clippy --verbose --manifest-path ./integration-tests/delegator/${contract}/Cargo.toml --no-default-features --target wasm32-unknown-unknown -- -D warnings -A $CLIPPY_ALLOWED; done - for contract in ${UPGRADEABLE_CONTRACTS}; do - cargo clippy --verbose --manifest-path ./examples/upgradeable-contracts/${contract}/Cargo.toml --no-default-features --target wasm32-unknown-unknown -- -D warnings -A $CLIPPY_ALLOWED; + cargo clippy --verbose --manifest-path ./integration-tests/upgradeable-contracts/${contract}/Cargo.toml --no-default-features --target wasm32-unknown-unknown -- -D warnings -A $CLIPPY_ALLOWED; done - for contract in ${LANG_ERR_INTEGRATION_CONTRACTS}; do - cargo clippy --verbose --manifest-path ./examples/lang-err-integration-tests/${contract}/Cargo.toml --no-default-features --target wasm32-unknown-unknown -- -D warnings -A $CLIPPY_ALLOWED; + cargo clippy --verbose --manifest-path ./integration-tests/lang-err-integration-tests/${contract}/Cargo.toml --no-default-features --target wasm32-unknown-unknown -- -D warnings -A $CLIPPY_ALLOWED; done - - cargo clippy --verbose --manifest-path ./examples/upgradeable-contracts/set-code-hash/updated-incrementer/Cargo.toml --no-default-features --target wasm32-unknown-unknown -- -D warnings -A $CLIPPY_ALLOWED; + - cargo clippy --verbose --manifest-path ./integration-tests/upgradeable-contracts/set-code-hash/updated-incrementer/Cargo.toml --no-default-features --target wasm32-unknown-unknown -- -D warnings -A $CLIPPY_ALLOWED; allow_failure: true @@ -369,9 +369,9 @@ examples-test: - job: clippy-std artifacts: false script: - - for example in examples/*/; do - if [ "$example" = "examples/upgradeable-contracts/" ]; then continue; fi; - if [ "$example" = "examples/lang-err-integration-tests/" ]; then continue; fi; + - for example in integration-tests/*/; do + if [ "$example" = "integration-tests/upgradeable-contracts/" ]; then continue; fi; + if [ "$example" = "integration-tests/lang-err-integration-tests/" ]; then continue; fi; if grep -q "e2e-tests = \[\]" "${example}/Cargo.toml"; then cargo test --verbose --manifest-path ${example}/Cargo.toml --features e2e-tests; else @@ -379,18 +379,18 @@ examples-test: fi; done - for contract in ${DELEGATOR_SUBCONTRACTS}; do - cargo test --verbose --manifest-path ./examples/delegator/${contract}/Cargo.toml; + cargo test --verbose --manifest-path ./integration-tests/delegator/${contract}/Cargo.toml; done - for contract in ${UPGRADEABLE_CONTRACTS}; do - cargo test --verbose --manifest-path ./examples/upgradeable-contracts/${contract}/Cargo.toml; + cargo test --verbose --manifest-path ./integration-tests/upgradeable-contracts/${contract}/Cargo.toml; done # TODO (#1502): We need to clean before running, otherwise the CI fails with a # linking error. - for contract in ${LANG_ERR_INTEGRATION_CONTRACTS}; do - cargo clean --verbose --manifest-path ./examples/lang-err-integration-tests/${contract}/Cargo.toml; - cargo test --verbose --manifest-path ./examples/lang-err-integration-tests/${contract}/Cargo.toml --features e2e-tests; + cargo clean --verbose --manifest-path ./integration-tests/lang-err-integration-tests/${contract}/Cargo.toml; + cargo test --verbose --manifest-path ./integration-tests/lang-err-integration-tests/${contract}/Cargo.toml --features e2e-tests; done - - cargo test --verbose --manifest-path ./examples/upgradeable-contracts/set-code-hash/updated-incrementer/Cargo.toml; + - cargo test --verbose --manifest-path ./integration-tests/upgradeable-contracts/set-code-hash/updated-incrementer/Cargo.toml; examples-contract-build: stage: examples @@ -399,21 +399,21 @@ examples-contract-build: script: - rustup component add rust-src --toolchain stable - cargo contract -V - - for example in examples/*/; do - if [ "$example" = "examples/upgradeable-contracts/" ]; then continue; fi; - if [ "$example" = "examples/lang-err-integration-tests/" ]; then continue; fi; + - for example in integration-tests/*/; do + if [ "$example" = "integration-tests/upgradeable-contracts/" ]; then continue; fi; + if [ "$example" = "integration-tests/lang-err-integration-tests/" ]; then continue; fi; pushd $example && cargo +stable contract build && popd; done - - pushd ./examples/delegator/ && ./build-all.sh && popd + - pushd ./integration-tests/delegator/ && ./build-all.sh && popd - for contract in ${UPGRADEABLE_CONTRACTS}; do - cargo +stable contract build --manifest-path ./examples/upgradeable-contracts/${contract}/Cargo.toml; + cargo +stable contract build --manifest-path ./integration-tests/upgradeable-contracts/${contract}/Cargo.toml; done - for contract in ${LANG_ERR_INTEGRATION_CONTRACTS}; do - cargo +stable contract build --manifest-path ./examples/lang-err-integration-tests/${contract}/Cargo.toml; + cargo +stable contract build --manifest-path ./integration-tests/lang-err-integration-tests/${contract}/Cargo.toml; done - - cargo +stable contract build --manifest-path ./examples/upgradeable-contracts/set-code-hash/updated-incrementer/Cargo.toml + - cargo +stable contract build --manifest-path ./integration-tests/upgradeable-contracts/set-code-hash/updated-incrementer/Cargo.toml examples-docs: stage: examples @@ -426,21 +426,21 @@ examples-docs: # puts the contract functions in a private module. # Once https://github.com/paritytech/ink/issues/336 has been implemented we can get rid # of this flag. - - for example in examples/*/; do - if [ "$example" = "examples/upgradeable-contracts/" ]; then continue; fi; - if [ "$example" = "examples/lang-err-integration-tests/" ]; then continue; fi; + - for example in integration-tests/*/; do + if [ "$example" = "integration-tests/upgradeable-contracts/" ]; then continue; fi; + if [ "$example" = "integration-tests/lang-err-integration-tests/" ]; then continue; fi; cargo doc --manifest-path ${example}/Cargo.toml --document-private-items --verbose --no-deps; done - for contract in ${DELEGATOR_SUBCONTRACTS}; do - cargo doc --manifest-path ./examples/delegator/${contract}/Cargo.toml --document-private-items --verbose --no-deps; + cargo doc --manifest-path ./integration-tests/delegator/${contract}/Cargo.toml --document-private-items --verbose --no-deps; done - for contract in ${UPGRADEABLE_CONTRACTS}; do - cargo doc --manifest-path ./examples/upgradeable-contracts/${contract}/Cargo.toml --document-private-items --verbose --no-deps; + cargo doc --manifest-path ./integration-tests/upgradeable-contracts/${contract}/Cargo.toml --document-private-items --verbose --no-deps; done - for contract in ${LANG_ERR_INTEGRATION_CONTRACTS}; do - cargo doc --manifest-path ./examples/lang-err-integration-tests/${contract}/Cargo.toml --document-private-items --verbose --no-deps; + cargo doc --manifest-path ./integration-tests/lang-err-integration-tests/${contract}/Cargo.toml --document-private-items --verbose --no-deps; done - - cargo doc --manifest-path ./examples/upgradeable-contracts/set-code-hash/updated-incrementer/Cargo.toml --document-private-items --verbose --no-deps + - cargo doc --manifest-path ./integration-tests/upgradeable-contracts/set-code-hash/updated-incrementer/Cargo.toml --document-private-items --verbose --no-deps #### stage: ink-waterfall diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index da54a5968ee..3884049276f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -67,14 +67,14 @@ Verify the following locally, otherwise the CI will fail: - `cargo clippy --all-targets --all-features` -- -D warnings; 1. Does the code still compile? - `cargo check --all-features` -1. Do all the examples still compile? - - `cargo contract check --manifest-path ./examples/.../Cargo.toml` +1. Do all the integration tests/examples still compile? + - `cargo contract check --manifest-path ./integration-tests/.../Cargo.toml` 1. Is the `wasm32` target still compiling? - `cargo check --no-default-features --target wasm32-unknown-unknown` 1. Are all the tests passing? - `cargo test --all-features --workspace` -1. Are all the tests for the examples passing? - - `cargo test --manifest-path ./examples/.../Cargo.toml` +1. Are all the tests for the integration tests/examples passing? + - `cargo test --manifest-path ./integration-tests/.../Cargo.toml` ### Backwards Compatibility diff --git a/Cargo.toml b/Cargo.toml index 197cc7f8cad..5fbf1113855 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ members = [ "crates/storage/traits", ] exclude = [ - "examples/", + "integration-tests/", ] [profile.release] diff --git a/README.md b/README.md index acd3feb409c..783c810bbfa 100644 --- a/README.md +++ b/README.md @@ -179,13 +179,13 @@ mod flipper { } ``` -The [`flipper/src/lib.rs`](https://github.com/paritytech/ink/blob/master/examples/flipper/lib.rs) +The [`flipper/src/lib.rs`](https://github.com/paritytech/ink-examples/blob/v4.0.0/flipper/lib.rs) file in our examples folder contains exactly this code. Run `cargo contract build` to build your first ink! smart contract. ## Examples -In the [`examples`](https://github.com/paritytech/ink/tree/master/examples) folder you'll find a number of examples written in ink!. +In the [`examples`](https://github.com/paritytech/ink-examples) repository you'll find a number of examples written in ink!. Some of the most interesting ones: @@ -241,11 +241,11 @@ See [here](https://paritytech.github.io/ink/ink/attr.contract.html) for a more d ### Trait Definitions Use `#[ink::trait_definition]` to define your very own trait definitions that are then implementable by ink! smart contracts. -See e.g. the [`examples/trait-erc20`](https://github.com/paritytech/ink/blob/v3.0.0-rc5/examples/trait-erc20/lib.rs#L35-L37) contract on how to utilize it or [the documentation](https://paritytech.github.io/ink/ink/attr.trait_definition.html) for details. +See e.g. the [`examples/trait-erc20`](https://github.com/paritytech/ink-examples/blob/v4.0.0/trait-erc20/lib.rs#L20-L22) contract on how to utilize it or [the documentation](https://paritytech.github.io/ink/ink/attr.trait_definition.html) for details. ### Off-chain Testing -The `#[ink::test]` procedural macro enables off-chain testing. See e.g. the [`examples/erc20`](https://github.com/paritytech/ink/blob/v3.0.0-rc5/examples/erc20/lib.rs#L248-L250) contract on how to utilize those or [the documentation](https://paritytech.github.io/ink/ink/attr.test.html) for details. +The `#[ink::test]` procedural macro enables off-chain testing. See e.g. the [`examples/erc20`](https://github.com/paritytech/ink-examples/blob/v4.0.0/erc20/lib.rs#L276-L277) contract on how to utilize those or [the documentation](https://paritytech.github.io/ink/ink/attr.test.html) for details. ## Developer Documentation diff --git a/RELEASES_CHECKLIST.md b/RELEASES_CHECKLIST.md index 97c55064c3f..e4ee683c76f 100644 --- a/RELEASES_CHECKLIST.md +++ b/RELEASES_CHECKLIST.md @@ -20,9 +20,9 @@ Reasons for doing it this way: ## Examples -Examples (so anything in the `examples/` folder) are a bit of a special case in our -release pipeline since they are considered as ink! internals and not part of the library -per-say. +Examples (so anything in the `integration-tests/` folder) are a bit of a special case +in our release pipeline since they are considered as ink! internals and not part of +the library per-say. What this means is that any changes to the examples (breaking or not) should only be considered a `PATCH` level change. Additionally, they should not be published to @@ -92,6 +92,11 @@ in the future. - Ensure your tag is signed with an offline GPG key! - Alternatively, the `Create release` GitHub UI below allows creating this tag when creating the release. +1. Update the [`ink-examples`](https://github.com/paritytech/ink-examples) repository with + the content of `integration-tests` (minus `mother`, `lang-err-integration-tests` and + `mapping-integration-tests`). Besides copying those folders over, the only change you + need to do manually is to switch the dependencies in the `Cargo.toml`'s to use the + published version of your release. 1. Create a GitHub release for this tag. In the [tag overview](https://github.com/paritytech/ink/tags) you'll see your new tag appear. Click the `…` on the right of the tag and then `Create release`. diff --git a/crates/env/src/engine/off_chain/test_api.rs b/crates/env/src/engine/off_chain/test_api.rs index d94ccfca162..c0ccb47a256 100644 --- a/crates/env/src/engine/off_chain/test_api.rs +++ b/crates/env/src/engine/off_chain/test_api.rs @@ -347,7 +347,7 @@ pub fn recorded_events() -> impl Iterator { /// ); /// ``` /// -/// See `examples/contract-terminate` for a complete usage example. +/// See `integration-tests/contract-terminate` for a complete usage example. pub fn assert_contract_termination( should_terminate: F, expected_beneficiary: T::AccountId, diff --git a/crates/ink/codegen/src/lib.rs b/crates/ink/codegen/src/lib.rs index 0128f7c8ee6..75fe2754420 100644 --- a/crates/ink/codegen/src/lib.rs +++ b/crates/ink/codegen/src/lib.rs @@ -27,7 +27,7 @@ //! //! You can see how the generated code looks by installing //! [`cargo-expand`](https://github.com/dtolnay/cargo-expand) -//! and executing `cargo expand --manifest-path ./examples/flipper/Cargo.toml` in this repository. +//! and executing `cargo expand --manifest-path ./integration-tests/flipper/Cargo.toml` in this repository. #![doc( html_logo_url = "https://use.ink/img/crate-docs/logo.png", diff --git a/crates/ink/src/env_access.rs b/crates/ink/src/env_access.rs index f54660cd42a..04c33f4c92c 100644 --- a/crates/ink/src/env_access.rs +++ b/crates/ink/src/env_access.rs @@ -474,7 +474,7 @@ where /// # } /// ``` /// - /// See [our `delegator` example](https://github.com/paritytech/ink/tree/master/examples/delegator) + /// See [our `delegator` example](https://github.com/paritytech/ink/tree/master/integration-tests/integration%20tests/examples/delegator) /// for a complete contract example. /// /// # Note diff --git a/crates/metadata/README.md b/crates/metadata/README.md index e6eec9ce7d9..f5a11b6c5fc 100644 --- a/crates/metadata/README.md +++ b/crates/metadata/README.md @@ -34,10 +34,10 @@ Next, we'll build our contract's metadata: ```bash # At the top level of the ink! repo -cargo contract build --manifest-path ./examples/flipper/Cargo.toml +cargo contract build --manifest-path ./integration-tests/flipper/Cargo.toml ``` -The generated metadata will be in: `$PATH_TO_INK_REPO/examples/flipper/target/ink/flipper.json`. +The generated metadata will be in: `$PATH_TO_INK_REPO/integration-tests/flipper/target/ink/flipper.json`. Now, to validate our metadata we'll need the schemas. These schemas can be found in this folder: [`outer-schema.json`](./outer-schema.json) and [`ink-v3-schema.json`](ink-v3-schema.json). @@ -45,7 +45,7 @@ folder: [`outer-schema.json`](./outer-schema.json) and [`ink-v3-schema.json`](in We can then use it to validate our metadata against our schema: ```bash -jsonschema outer-schema.json --instance $PATH_TO_INK_REPO/examples/flipper/target/ink/flipper.json +jsonschema outer-schema.json --instance $PATH_TO_INK_REPO/integration-tests/flipper/target/ink/flipper.json ``` If `flipper.json` is respects our schema we should see the following: @@ -65,7 +65,7 @@ alongside a list of the errors. We can do a similar thing for the ink! versioned metadata. ```bash -jq '. | {V3}' $PATH_TO_INK_REPO/examples/flipper/target/ink/flipper.json > ink-v3-metadata.json +jq '. | {V3}' $PATH_TO_INK_REPO/integration-tests/flipper/target/ink/flipper.json > ink-v3-metadata.json jsonschema ink-v3-schema.json --instance ink-v3-metadata.json ``` @@ -80,7 +80,7 @@ Right now the schemas are generated using a set of cobbled branches across `scal Now, in your patched version of `cargo-contract` run the following: ``` -cargo run -- contract build --manifest-path $PATH_TO_INK_REPO/examples/flipper/Cargo.toml > schema.json +cargo run -- contract build --manifest-path $PATH_TO_INK_REPO/integration-tests/flipper/Cargo.toml > schema.json ``` In `src/cmd/metadata.rs` you can change the schema being printed depending on what struct diff --git a/examples/README.md b/examples/README.md deleted file mode 100644 index 17672e9eb94..00000000000 --- a/examples/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# ink! code examples - -This folder contains a set of example contracts for ink!. - -Have a look at the different examples to better understand how to use ink! to build your own Substrate smart contracts. - -## Preparation - -For building the example smart contracts found in this folder you will need to have [`cargo-contract`](https://github.com/paritytech/cargo-contract) installed. - -``` -cargo install cargo-contract --force -``` - -We use the `--force` to update to the most recent `cargo-contract` version. - -## Build example contract and generate the contracts metadata - -To build a single example and generate the contracts Wasm file, navigate to the root of the smart contract and run the following command: - -`cargo contract build` - -You should now have an optimized `.wasm` file, a `.json` file and a `.contract` file in the `target` folder of your contract. -The `.contract` file combines the Wasm and metadata into one file and can be used for instantiation. - -## License - -The examples in this folder are released into the public domain. -We hope they help you build something great with ink!. - -See the [LICENSE file](LICENSE) in this folder for more details. diff --git a/examples/LICENSE b/integration-tests/LICENSE similarity index 100% rename from examples/LICENSE rename to integration-tests/LICENSE diff --git a/integration-tests/README.md b/integration-tests/README.md new file mode 100644 index 00000000000..c652906a398 --- /dev/null +++ b/integration-tests/README.md @@ -0,0 +1,26 @@ +# ink! Integration Tests + +This folder contains a set of example contracts for ink!. +The main purpose of the examples in this folder is for testing ink! +end to end as part of the development/CI process. As such this +folder contains examples which are testing specific features, which +are distinct from real world examples. + +We have an external repository for ink! contract examples: +[`ink-examples`](https://github.com/paritytech/ink-examples). + +A large number of the examples in this folder can also be found +in this repository. The difference is that the contracts in this +folder may already contain unreleased breaking changes. + +For end users it's better to take a look at the +[`ink-examples`](https://github.com/paritytech/ink-examples) +repository. The contracts in there are ensured to be running with +the latest published ink! version. + +## License + +The examples in this folder are released into the public domain. +We hope they help you build something great with ink!. + +See the [LICENSE file](LICENSE) in this folder for more details. diff --git a/examples/contract-terminate/.gitignore b/integration-tests/contract-terminate/.gitignore similarity index 100% rename from examples/contract-terminate/.gitignore rename to integration-tests/contract-terminate/.gitignore diff --git a/examples/contract-terminate/Cargo.toml b/integration-tests/contract-terminate/Cargo.toml similarity index 100% rename from examples/contract-terminate/Cargo.toml rename to integration-tests/contract-terminate/Cargo.toml diff --git a/examples/contract-terminate/lib.rs b/integration-tests/contract-terminate/lib.rs similarity index 100% rename from examples/contract-terminate/lib.rs rename to integration-tests/contract-terminate/lib.rs diff --git a/examples/contract-transfer/.gitignore b/integration-tests/contract-transfer/.gitignore similarity index 100% rename from examples/contract-transfer/.gitignore rename to integration-tests/contract-transfer/.gitignore diff --git a/examples/contract-transfer/Cargo.toml b/integration-tests/contract-transfer/Cargo.toml similarity index 100% rename from examples/contract-transfer/Cargo.toml rename to integration-tests/contract-transfer/Cargo.toml diff --git a/examples/contract-transfer/lib.rs b/integration-tests/contract-transfer/lib.rs similarity index 100% rename from examples/contract-transfer/lib.rs rename to integration-tests/contract-transfer/lib.rs diff --git a/examples/custom-environment/.gitignore b/integration-tests/custom-environment/.gitignore similarity index 100% rename from examples/custom-environment/.gitignore rename to integration-tests/custom-environment/.gitignore diff --git a/examples/custom-environment/Cargo.toml b/integration-tests/custom-environment/Cargo.toml similarity index 100% rename from examples/custom-environment/Cargo.toml rename to integration-tests/custom-environment/Cargo.toml diff --git a/examples/custom-environment/README.md b/integration-tests/custom-environment/README.md similarity index 100% rename from examples/custom-environment/README.md rename to integration-tests/custom-environment/README.md diff --git a/examples/custom-environment/lib.rs b/integration-tests/custom-environment/lib.rs similarity index 100% rename from examples/custom-environment/lib.rs rename to integration-tests/custom-environment/lib.rs diff --git a/examples/delegator/.gitignore b/integration-tests/delegator/.gitignore similarity index 100% rename from examples/delegator/.gitignore rename to integration-tests/delegator/.gitignore diff --git a/examples/delegator/.images/code-hashes.png b/integration-tests/delegator/.images/code-hashes.png similarity index 100% rename from examples/delegator/.images/code-hashes.png rename to integration-tests/delegator/.images/code-hashes.png diff --git a/examples/delegator/Cargo.toml b/integration-tests/delegator/Cargo.toml similarity index 100% rename from examples/delegator/Cargo.toml rename to integration-tests/delegator/Cargo.toml diff --git a/examples/delegator/README.md b/integration-tests/delegator/README.md similarity index 100% rename from examples/delegator/README.md rename to integration-tests/delegator/README.md diff --git a/examples/delegator/accumulator/Cargo.toml b/integration-tests/delegator/accumulator/Cargo.toml similarity index 100% rename from examples/delegator/accumulator/Cargo.toml rename to integration-tests/delegator/accumulator/Cargo.toml diff --git a/examples/delegator/accumulator/lib.rs b/integration-tests/delegator/accumulator/lib.rs similarity index 100% rename from examples/delegator/accumulator/lib.rs rename to integration-tests/delegator/accumulator/lib.rs diff --git a/examples/delegator/adder/Cargo.toml b/integration-tests/delegator/adder/Cargo.toml similarity index 100% rename from examples/delegator/adder/Cargo.toml rename to integration-tests/delegator/adder/Cargo.toml diff --git a/examples/delegator/adder/lib.rs b/integration-tests/delegator/adder/lib.rs similarity index 100% rename from examples/delegator/adder/lib.rs rename to integration-tests/delegator/adder/lib.rs diff --git a/examples/delegator/build-all.sh b/integration-tests/delegator/build-all.sh similarity index 100% rename from examples/delegator/build-all.sh rename to integration-tests/delegator/build-all.sh diff --git a/examples/delegator/lib.rs b/integration-tests/delegator/lib.rs similarity index 100% rename from examples/delegator/lib.rs rename to integration-tests/delegator/lib.rs diff --git a/examples/delegator/subber/Cargo.toml b/integration-tests/delegator/subber/Cargo.toml similarity index 100% rename from examples/delegator/subber/Cargo.toml rename to integration-tests/delegator/subber/Cargo.toml diff --git a/examples/delegator/subber/lib.rs b/integration-tests/delegator/subber/lib.rs similarity index 100% rename from examples/delegator/subber/lib.rs rename to integration-tests/delegator/subber/lib.rs diff --git a/examples/dns/.gitignore b/integration-tests/dns/.gitignore similarity index 100% rename from examples/dns/.gitignore rename to integration-tests/dns/.gitignore diff --git a/examples/dns/Cargo.toml b/integration-tests/dns/Cargo.toml similarity index 100% rename from examples/dns/Cargo.toml rename to integration-tests/dns/Cargo.toml diff --git a/examples/dns/lib.rs b/integration-tests/dns/lib.rs similarity index 100% rename from examples/dns/lib.rs rename to integration-tests/dns/lib.rs diff --git a/examples/erc1155/.gitignore b/integration-tests/erc1155/.gitignore similarity index 100% rename from examples/erc1155/.gitignore rename to integration-tests/erc1155/.gitignore diff --git a/examples/erc1155/Cargo.toml b/integration-tests/erc1155/Cargo.toml similarity index 100% rename from examples/erc1155/Cargo.toml rename to integration-tests/erc1155/Cargo.toml diff --git a/examples/erc1155/lib.rs b/integration-tests/erc1155/lib.rs similarity index 100% rename from examples/erc1155/lib.rs rename to integration-tests/erc1155/lib.rs diff --git a/examples/erc20/.gitignore b/integration-tests/erc20/.gitignore similarity index 100% rename from examples/erc20/.gitignore rename to integration-tests/erc20/.gitignore diff --git a/examples/erc20/Cargo.toml b/integration-tests/erc20/Cargo.toml similarity index 100% rename from examples/erc20/Cargo.toml rename to integration-tests/erc20/Cargo.toml diff --git a/examples/erc20/lib.rs b/integration-tests/erc20/lib.rs similarity index 100% rename from examples/erc20/lib.rs rename to integration-tests/erc20/lib.rs diff --git a/examples/erc721/.gitignore b/integration-tests/erc721/.gitignore similarity index 100% rename from examples/erc721/.gitignore rename to integration-tests/erc721/.gitignore diff --git a/examples/erc721/Cargo.toml b/integration-tests/erc721/Cargo.toml similarity index 100% rename from examples/erc721/Cargo.toml rename to integration-tests/erc721/Cargo.toml diff --git a/examples/erc721/lib.rs b/integration-tests/erc721/lib.rs similarity index 100% rename from examples/erc721/lib.rs rename to integration-tests/erc721/lib.rs diff --git a/examples/flipper/.gitignore b/integration-tests/flipper/.gitignore similarity index 100% rename from examples/flipper/.gitignore rename to integration-tests/flipper/.gitignore diff --git a/examples/flipper/Cargo.toml b/integration-tests/flipper/Cargo.toml similarity index 100% rename from examples/flipper/Cargo.toml rename to integration-tests/flipper/Cargo.toml diff --git a/examples/flipper/lib.rs b/integration-tests/flipper/lib.rs similarity index 100% rename from examples/flipper/lib.rs rename to integration-tests/flipper/lib.rs diff --git a/examples/incrementer/.gitignore b/integration-tests/incrementer/.gitignore similarity index 100% rename from examples/incrementer/.gitignore rename to integration-tests/incrementer/.gitignore diff --git a/examples/incrementer/Cargo.toml b/integration-tests/incrementer/Cargo.toml similarity index 100% rename from examples/incrementer/Cargo.toml rename to integration-tests/incrementer/Cargo.toml diff --git a/examples/incrementer/lib.rs b/integration-tests/incrementer/lib.rs similarity index 100% rename from examples/incrementer/lib.rs rename to integration-tests/incrementer/lib.rs diff --git a/examples/lang-err-integration-tests/.gitignore b/integration-tests/lang-err-integration-tests/.gitignore similarity index 100% rename from examples/lang-err-integration-tests/.gitignore rename to integration-tests/lang-err-integration-tests/.gitignore diff --git a/examples/lang-err-integration-tests/call-builder/Cargo.toml b/integration-tests/lang-err-integration-tests/call-builder/Cargo.toml similarity index 100% rename from examples/lang-err-integration-tests/call-builder/Cargo.toml rename to integration-tests/lang-err-integration-tests/call-builder/Cargo.toml diff --git a/examples/lang-err-integration-tests/call-builder/lib.rs b/integration-tests/lang-err-integration-tests/call-builder/lib.rs similarity index 100% rename from examples/lang-err-integration-tests/call-builder/lib.rs rename to integration-tests/lang-err-integration-tests/call-builder/lib.rs diff --git a/examples/lang-err-integration-tests/constructors-return-value/Cargo.toml b/integration-tests/lang-err-integration-tests/constructors-return-value/Cargo.toml similarity index 100% rename from examples/lang-err-integration-tests/constructors-return-value/Cargo.toml rename to integration-tests/lang-err-integration-tests/constructors-return-value/Cargo.toml diff --git a/examples/lang-err-integration-tests/constructors-return-value/lib.rs b/integration-tests/lang-err-integration-tests/constructors-return-value/lib.rs similarity index 100% rename from examples/lang-err-integration-tests/constructors-return-value/lib.rs rename to integration-tests/lang-err-integration-tests/constructors-return-value/lib.rs diff --git a/examples/lang-err-integration-tests/contract-ref/Cargo.toml b/integration-tests/lang-err-integration-tests/contract-ref/Cargo.toml similarity index 100% rename from examples/lang-err-integration-tests/contract-ref/Cargo.toml rename to integration-tests/lang-err-integration-tests/contract-ref/Cargo.toml diff --git a/examples/lang-err-integration-tests/contract-ref/lib.rs b/integration-tests/lang-err-integration-tests/contract-ref/lib.rs similarity index 100% rename from examples/lang-err-integration-tests/contract-ref/lib.rs rename to integration-tests/lang-err-integration-tests/contract-ref/lib.rs diff --git a/examples/lang-err-integration-tests/integration-flipper/Cargo.toml b/integration-tests/lang-err-integration-tests/integration-flipper/Cargo.toml similarity index 100% rename from examples/lang-err-integration-tests/integration-flipper/Cargo.toml rename to integration-tests/lang-err-integration-tests/integration-flipper/Cargo.toml diff --git a/examples/lang-err-integration-tests/integration-flipper/lib.rs b/integration-tests/lang-err-integration-tests/integration-flipper/lib.rs similarity index 100% rename from examples/lang-err-integration-tests/integration-flipper/lib.rs rename to integration-tests/lang-err-integration-tests/integration-flipper/lib.rs diff --git a/examples/mapping_integration_tests/.gitignore b/integration-tests/mapping_integration_tests/.gitignore similarity index 100% rename from examples/mapping_integration_tests/.gitignore rename to integration-tests/mapping_integration_tests/.gitignore diff --git a/examples/mapping_integration_tests/Cargo.toml b/integration-tests/mapping_integration_tests/Cargo.toml similarity index 100% rename from examples/mapping_integration_tests/Cargo.toml rename to integration-tests/mapping_integration_tests/Cargo.toml diff --git a/examples/mapping_integration_tests/lib.rs b/integration-tests/mapping_integration_tests/lib.rs similarity index 100% rename from examples/mapping_integration_tests/lib.rs rename to integration-tests/mapping_integration_tests/lib.rs diff --git a/examples/mother/.gitignore b/integration-tests/mother/.gitignore similarity index 100% rename from examples/mother/.gitignore rename to integration-tests/mother/.gitignore diff --git a/examples/mother/Cargo.toml b/integration-tests/mother/Cargo.toml similarity index 100% rename from examples/mother/Cargo.toml rename to integration-tests/mother/Cargo.toml diff --git a/examples/mother/lib.rs b/integration-tests/mother/lib.rs similarity index 100% rename from examples/mother/lib.rs rename to integration-tests/mother/lib.rs diff --git a/examples/multisig/.gitignore b/integration-tests/multisig/.gitignore similarity index 100% rename from examples/multisig/.gitignore rename to integration-tests/multisig/.gitignore diff --git a/examples/multisig/Cargo.toml b/integration-tests/multisig/Cargo.toml similarity index 100% rename from examples/multisig/Cargo.toml rename to integration-tests/multisig/Cargo.toml diff --git a/examples/multisig/lib.rs b/integration-tests/multisig/lib.rs similarity index 100% rename from examples/multisig/lib.rs rename to integration-tests/multisig/lib.rs diff --git a/examples/payment-channel/.gitignore b/integration-tests/payment-channel/.gitignore similarity index 100% rename from examples/payment-channel/.gitignore rename to integration-tests/payment-channel/.gitignore diff --git a/examples/payment-channel/Cargo.toml b/integration-tests/payment-channel/Cargo.toml similarity index 100% rename from examples/payment-channel/Cargo.toml rename to integration-tests/payment-channel/Cargo.toml diff --git a/examples/payment-channel/lib.rs b/integration-tests/payment-channel/lib.rs similarity index 100% rename from examples/payment-channel/lib.rs rename to integration-tests/payment-channel/lib.rs diff --git a/examples/psp22-extension/.gitignore b/integration-tests/psp22-extension/.gitignore similarity index 100% rename from examples/psp22-extension/.gitignore rename to integration-tests/psp22-extension/.gitignore diff --git a/examples/psp22-extension/Cargo.toml b/integration-tests/psp22-extension/Cargo.toml similarity index 100% rename from examples/psp22-extension/Cargo.toml rename to integration-tests/psp22-extension/Cargo.toml diff --git a/examples/psp22-extension/README.md b/integration-tests/psp22-extension/README.md similarity index 100% rename from examples/psp22-extension/README.md rename to integration-tests/psp22-extension/README.md diff --git a/examples/psp22-extension/lib.rs b/integration-tests/psp22-extension/lib.rs similarity index 100% rename from examples/psp22-extension/lib.rs rename to integration-tests/psp22-extension/lib.rs diff --git a/examples/psp22-extension/runtime/psp22-extension-example.rs b/integration-tests/psp22-extension/runtime/psp22-extension-example.rs similarity index 100% rename from examples/psp22-extension/runtime/psp22-extension-example.rs rename to integration-tests/psp22-extension/runtime/psp22-extension-example.rs diff --git a/examples/rand-extension/.gitignore b/integration-tests/rand-extension/.gitignore similarity index 100% rename from examples/rand-extension/.gitignore rename to integration-tests/rand-extension/.gitignore diff --git a/examples/rand-extension/Cargo.toml b/integration-tests/rand-extension/Cargo.toml similarity index 100% rename from examples/rand-extension/Cargo.toml rename to integration-tests/rand-extension/Cargo.toml diff --git a/examples/rand-extension/README.md b/integration-tests/rand-extension/README.md similarity index 100% rename from examples/rand-extension/README.md rename to integration-tests/rand-extension/README.md diff --git a/examples/rand-extension/lib.rs b/integration-tests/rand-extension/lib.rs similarity index 100% rename from examples/rand-extension/lib.rs rename to integration-tests/rand-extension/lib.rs diff --git a/examples/rand-extension/runtime/chain-extension-example.rs b/integration-tests/rand-extension/runtime/chain-extension-example.rs similarity index 100% rename from examples/rand-extension/runtime/chain-extension-example.rs rename to integration-tests/rand-extension/runtime/chain-extension-example.rs diff --git a/examples/trait-erc20/.gitignore b/integration-tests/trait-erc20/.gitignore similarity index 100% rename from examples/trait-erc20/.gitignore rename to integration-tests/trait-erc20/.gitignore diff --git a/examples/trait-erc20/Cargo.toml b/integration-tests/trait-erc20/Cargo.toml similarity index 100% rename from examples/trait-erc20/Cargo.toml rename to integration-tests/trait-erc20/Cargo.toml diff --git a/examples/trait-erc20/lib.rs b/integration-tests/trait-erc20/lib.rs similarity index 100% rename from examples/trait-erc20/lib.rs rename to integration-tests/trait-erc20/lib.rs diff --git a/examples/trait-flipper/.gitignore b/integration-tests/trait-flipper/.gitignore similarity index 100% rename from examples/trait-flipper/.gitignore rename to integration-tests/trait-flipper/.gitignore diff --git a/examples/trait-flipper/Cargo.toml b/integration-tests/trait-flipper/Cargo.toml similarity index 100% rename from examples/trait-flipper/Cargo.toml rename to integration-tests/trait-flipper/Cargo.toml diff --git a/examples/trait-flipper/lib.rs b/integration-tests/trait-flipper/lib.rs similarity index 100% rename from examples/trait-flipper/lib.rs rename to integration-tests/trait-flipper/lib.rs diff --git a/examples/trait-incrementer/.gitignore b/integration-tests/trait-incrementer/.gitignore similarity index 100% rename from examples/trait-incrementer/.gitignore rename to integration-tests/trait-incrementer/.gitignore diff --git a/examples/trait-incrementer/Cargo.toml b/integration-tests/trait-incrementer/Cargo.toml similarity index 100% rename from examples/trait-incrementer/Cargo.toml rename to integration-tests/trait-incrementer/Cargo.toml diff --git a/examples/trait-incrementer/lib.rs b/integration-tests/trait-incrementer/lib.rs similarity index 100% rename from examples/trait-incrementer/lib.rs rename to integration-tests/trait-incrementer/lib.rs diff --git a/examples/trait-incrementer/traits/.gitignore b/integration-tests/trait-incrementer/traits/.gitignore similarity index 100% rename from examples/trait-incrementer/traits/.gitignore rename to integration-tests/trait-incrementer/traits/.gitignore diff --git a/examples/trait-incrementer/traits/Cargo.toml b/integration-tests/trait-incrementer/traits/Cargo.toml similarity index 100% rename from examples/trait-incrementer/traits/Cargo.toml rename to integration-tests/trait-incrementer/traits/Cargo.toml diff --git a/examples/trait-incrementer/traits/lib.rs b/integration-tests/trait-incrementer/traits/lib.rs similarity index 100% rename from examples/trait-incrementer/traits/lib.rs rename to integration-tests/trait-incrementer/traits/lib.rs diff --git a/examples/upgradeable-contracts/README.md b/integration-tests/upgradeable-contracts/README.md similarity index 100% rename from examples/upgradeable-contracts/README.md rename to integration-tests/upgradeable-contracts/README.md diff --git a/examples/upgradeable-contracts/forward-calls/.gitignore b/integration-tests/upgradeable-contracts/forward-calls/.gitignore similarity index 100% rename from examples/upgradeable-contracts/forward-calls/.gitignore rename to integration-tests/upgradeable-contracts/forward-calls/.gitignore diff --git a/examples/upgradeable-contracts/forward-calls/Cargo.toml b/integration-tests/upgradeable-contracts/forward-calls/Cargo.toml similarity index 100% rename from examples/upgradeable-contracts/forward-calls/Cargo.toml rename to integration-tests/upgradeable-contracts/forward-calls/Cargo.toml diff --git a/examples/upgradeable-contracts/forward-calls/README.md b/integration-tests/upgradeable-contracts/forward-calls/README.md similarity index 100% rename from examples/upgradeable-contracts/forward-calls/README.md rename to integration-tests/upgradeable-contracts/forward-calls/README.md diff --git a/examples/upgradeable-contracts/forward-calls/lib.rs b/integration-tests/upgradeable-contracts/forward-calls/lib.rs similarity index 100% rename from examples/upgradeable-contracts/forward-calls/lib.rs rename to integration-tests/upgradeable-contracts/forward-calls/lib.rs diff --git a/examples/upgradeable-contracts/set-code-hash/Cargo.toml b/integration-tests/upgradeable-contracts/set-code-hash/Cargo.toml similarity index 100% rename from examples/upgradeable-contracts/set-code-hash/Cargo.toml rename to integration-tests/upgradeable-contracts/set-code-hash/Cargo.toml diff --git a/examples/upgradeable-contracts/set-code-hash/lib.rs b/integration-tests/upgradeable-contracts/set-code-hash/lib.rs similarity index 100% rename from examples/upgradeable-contracts/set-code-hash/lib.rs rename to integration-tests/upgradeable-contracts/set-code-hash/lib.rs diff --git a/examples/upgradeable-contracts/set-code-hash/updated-incrementer/Cargo.toml b/integration-tests/upgradeable-contracts/set-code-hash/updated-incrementer/Cargo.toml similarity index 100% rename from examples/upgradeable-contracts/set-code-hash/updated-incrementer/Cargo.toml rename to integration-tests/upgradeable-contracts/set-code-hash/updated-incrementer/Cargo.toml diff --git a/examples/upgradeable-contracts/set-code-hash/updated-incrementer/lib.rs b/integration-tests/upgradeable-contracts/set-code-hash/updated-incrementer/lib.rs similarity index 100% rename from examples/upgradeable-contracts/set-code-hash/updated-incrementer/lib.rs rename to integration-tests/upgradeable-contracts/set-code-hash/updated-incrementer/lib.rs