Skip to content

Commit

Permalink
Update examples to ink! 5.1 (#72)
Browse files Browse the repository at this point in the history
* Sync existing examples

* Add new examples

* Use version instead of path

* Fix pulled version of `substrate-contracts-node`
  • Loading branch information
cmichi authored Nov 28, 2024
1 parent d886149 commit c72b4cb
Show file tree
Hide file tree
Showing 72 changed files with 869 additions and 177 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,16 +188,22 @@ jobs:

- name: Download and run latest `substrate-contracts-node` binary
if: runner.os == 'Linux'
env:
CONTRACTS_NODE_URL: https://github.com/paritytech/substrate-contracts-node/releases/latest/download/substrate-contracts-node-
CONTRACTS_NODE_OS: linux
run: |
curl -L -o substrate-contracts-node.zip 'https://gitlab.parity.io/parity/mirrors/substrate-contracts-node/-/jobs/artifacts/main/download?job=build-linux' && \
curl -L -o substrate-contracts-node.tar.gz "$CONTRACTS_NODE_URL$CONTRACTS_NODE_OS.tar.gz"
unzip substrate-contracts-node.zip && \
chmod +x artifacts/substrate-contracts-node-linux/substrate-contracts-node &&
./artifacts/substrate-contracts-node-linux/substrate-contracts-node -linfo,runtime::contracts=debug 2>&1 | tee /tmp/contracts-node.log &
- name: Download and run latest `substrate-contracts-node` binary
if: runner.os == 'macOS'
env:
CONTRACTS_NODE_URL: https://github.com/paritytech/substrate-contracts-node/releases/latest/download/substrate-contracts-node-
CONTRACTS_NODE_OS: mac-universal
run: |
curl -L -o substrate-contracts-node.zip 'https://gitlab.parity.io/parity/mirrors/substrate-contracts-node/-/jobs/artifacts/main/download?job=build-mac' && \
curl -L -o substrate-contracts-node.tar.gz "$CONTRACTS_NODE_URL$CONTRACTS_NODE_OS.tar.gz"
unzip substrate-contracts-node.zip && \
chmod +x artifacts/substrate-contracts-node-mac/substrate-contracts-node &&
./artifacts/substrate-contracts-node-mac/substrate-contracts-node -linfo,runtime::contracts=debug 2>&1 | tee /tmp/contracts-node.log &
Expand Down
6 changes: 3 additions & 3 deletions basic-contract-caller/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
[package]
name = "basic-contract-caller"
version = "5.0.0"
version = "5.1.0"
authors = ["Use Ink <[email protected]>"]
edition = "2021"
publish = false

[dependencies]
ink = { version = "5.0.0", default-features = false }
ink = { version = "5.1.0", default-features = false }

# Note: We **need** to specify the `ink-as-dependency` feature.
#
# If we don't we will end up with linking errors!
other-contract = { path = "other-contract", default-features = false, features = ["ink-as-dependency"] }

[dev-dependencies]
ink_e2e = { version = "5.0.0" }
ink_e2e = { version = "5.1.0" }

[lib]
path = "lib.rs"
Expand Down
6 changes: 3 additions & 3 deletions basic-contract-caller/other-contract/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[package]
name = "other-contract"
version = "5.0.0"
version = "5.1.0"
authors = ["Use Ink <[email protected]>"]
edition = "2021"
publish = false

[dependencies]
ink = { version = "5.0.0", default-features = false }
ink = { version = "5.1.0", default-features = false }

[dev-dependencies]
ink_e2e = { version = "5.0.0" }
ink_e2e = { version = "5.1.0" }

[lib]
path = "lib.rs"
Expand Down
6 changes: 3 additions & 3 deletions call-runtime/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "call-runtime"
version = "5.0.0"
version = "5.1.0"
authors = ["Use Ink <[email protected]>"]
edition = "2021"
publish = false

[dependencies]
ink = { version = "5.0.0", default-features = false }
ink = { version = "5.1.0", default-features = false }

# Substrate
#
Expand All @@ -18,7 +18,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 = "5.0.0" }
ink_e2e = { version = "5.1.0" }

[lib]
path = "lib.rs"
Expand Down
4 changes: 2 additions & 2 deletions combined-extension/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "combined_extension"
version = "5.0.0"
version = "5.1.0"
authors = ["Use Ink <[email protected]>"]
edition = "2021"
publish = false

[dependencies]
ink = { version = "5.0.0", default-features = false }
ink = { version = "5.1.0", default-features = false }
psp22_extension = { path = "../psp22-extension", default-features = false, features = ["ink-as-dependency"] }
rand_extension = { path = "../rand-extension", default-features = false, features = ["ink-as-dependency"] }

Expand Down
6 changes: 3 additions & 3 deletions conditional-compilation/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[package]
name = "conditional-compilation"
version = "5.0.0"
version = "5.1.0"
authors = ["Use Ink <[email protected]>"]
edition = "2021"

[dependencies]
ink = { version = "5.0.0", default-features = false }
ink = { version = "5.1.0", default-features = false }

[dev-dependencies]
ink_e2e = { version = "5.0.0" }
ink_e2e = { version = "5.1.0" }

[lib]
path = "lib.rs"
Expand Down
6 changes: 3 additions & 3 deletions contract-storage/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[package]
name = "contract-storage"
version = "5.0.0"
version = "5.1.0"
authors = ["Use Ink <[email protected]>"]
edition = "2021"
publish = false

[dependencies]
ink = { version = "5.0.0", default-features = false }
ink = { version = "5.1.0", default-features = false }

[dev-dependencies]
ink_e2e = { version = "5.0.0" }
ink_e2e = { version = "5.1.0" }

[lib]
path = "lib.rs"
Expand Down
6 changes: 3 additions & 3 deletions contract-terminate/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[package]
name = "contract_terminate"
version = "5.0.0"
version = "5.1.0"
authors = ["Use Ink <[email protected]>"]
edition = "2021"
publish = false

[dependencies]
ink = { version = "5.0.0", default-features = false }
ink = { version = "5.1.0", default-features = false }

[dev-dependencies]
ink_e2e = { version = "5.0.0" }
ink_e2e = { version = "5.1.0" }

[lib]
path = "lib.rs"
Expand Down
6 changes: 3 additions & 3 deletions contract-transfer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[package]
name = "contract_transfer"
version = "5.0.0"
version = "5.1.0"
authors = ["Use Ink <[email protected]>"]
edition = "2021"
publish = false

[dependencies]
ink = { version = "5.0.0", default-features = false }
ink = { version = "5.1.0", default-features = false }

[dev-dependencies]
ink_e2e = { version = "5.0.0" }
ink_e2e = { version = "5.1.0" }

[lib]
path = "lib.rs"
Expand Down
27 changes: 27 additions & 0 deletions contract-xcm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[package]
name = "contract-xcm"
version = "5.1.0"
authors = ["Use Ink <[email protected]>"]
edition = "2021"
publish = false

[dependencies]
ink = { version = "5.1.0", default-features = false }
frame-support = { version = "32.0.0", default-features = false }
pallet-balances = { version = "33.0.0", default-features = false }

[dev-dependencies]
ink_e2e = { version = "5.1.0", features = ["sandbox"] }

[lib]
path = "lib.rs"

[features]
default = ["std"]
std = [
"ink/std",
"pallet-balances/std",
"frame-support/std",
]
ink-as-dependency = []
e2e-tests = []
Loading

0 comments on commit c72b4cb

Please sign in to comment.