Skip to content
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.

Dev #14

Merged
merged 5 commits into from
May 6, 2024
Merged

Dev #14

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[package]
name = "node-template"
version = "4.0.0-dev"
description = "A fresh FRAME-based Substrate node, ready for hacking."
authors = ["Substrate DevHub <https://github.com/substrate-developer-hub>"]
homepage = "https://substrate.io/"
description = "The RealXDeal Substrate node."
authors = ["Xcavate Network"]
homepage = "https://xcavate.io"
edition = "2021"
license = "MIT-0"
license = "Apache-2.0"
publish = false
repository = "https://github.com/substrate-developer-hub/substrate-node-template/"
repository = "https://github.com/XcavateBlockchain/Node_Hackathon_Apr2024/"
build = "build.rs"

[package.metadata.docs.rs]
Expand Down Expand Up @@ -35,6 +35,7 @@ sp-consensus-aura = { version = "0.10.0-dev", git = "https://github.com/parityte
sc-consensus = { version = "0.10.0-dev", git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.6.0" }
sc-consensus-grandpa = { version = "0.10.0-dev", git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.6.0" }
sp-consensus-grandpa = { version = "4.0.0-dev", git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.6.0" }
sp-keystore = {git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.6.0" }
sc-client-api = { version = "4.0.0-dev", git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.6.0" }
sp-runtime = { version = "24.0.0", git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.6.0" }
sp-io = { version = "23.0.0", git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.6.0" }
Expand Down
17 changes: 17 additions & 0 deletions node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,23 @@ pub fn new_partial(
)?;
let client = Arc::new(client);

let keystore = keystore_container.keystore();
if config.offchain_worker.enabled {
// Initialize seed for signing transaction using off-chain workers. This is a convenience
// so learners can see the transactions submitted simply running the node.
// Typically these keys should be inserted with RPC calls to `author_insertKey`.

// For pallet-ocw
sp_keystore::Keystore::sr25519_generate_new(
&*keystore,
node_template_runtime::pallet_game::KEY_TYPE,
Some("//Alice"),
)
.expect("Creating key with account Alice should succeed.");

// For pallet-example-offchain-worker
}

let telemetry = telemetry.map(|(worker, telemetry)| {
task_manager.spawn_handle().spawn("telemetry", None, worker.run());
telemetry
Expand Down
23 changes: 14 additions & 9 deletions pallets/game/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
name = "pallet-game"
version = "4.0.0-dev"
description = "Game pallet for defining game logic."
authors = ["Substrate DevHub <https://github.com/substrate-developer-hub>"]
homepage = "https://substrate.io"
authors = ["Xcavate Network"]
homepage = "https://xcavate.io"
edition = "2021"
license = "MIT-0"
license = "Apache-2.0"
publish = false
repository = "https://github.com/substrate-developer-hub/substrate-node-template/"
repository = "https://github.com/XcavateBlockchain/Node_Hackathon_Apr2024"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand All @@ -22,15 +22,18 @@ serde = { version = "1.0.197", features = ["derive"], optional = true }
frame-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.6.0" }
frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.6.0" }
frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.6.0" }
sp-std = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.6.0" }
sp-io = { version = "23.0.0", git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.6.0", default-features = false }
sp-std = { version = "8.0.0", git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.6.0", default-features = false }
sp-core = { version = "21.0.0", git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.6.0", default-features = false }
sp-runtime = { version = "24.0.0", git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.6.0", default-features = false }

pallet-nfts = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.6.0" }
enumflags2 = { version = "0.7.7" }

log = { version = "0.4.21", default-features = false }
lite-json = { version = "0.2.0", default-features = false }

[dev-dependencies]
sp-core = { version = "21.0.0", git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.6.0" }
sp-io = { version = "23.0.0", git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.6.0" }
sp-runtime = { version = "24.0.0", git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.6.0" }
pallet-insecure-randomness-collective-flip = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.6.0" }
pallet-balances = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.6.0" }

Expand All @@ -46,6 +49,8 @@ std = [
"pallet-nfts/std",
"pallet-balances/std",
"sp-std/std",
"log/std",
"lite-json/std",
]
runtime-benchmarks = ["frame-benchmarking/runtime-benchmarks"]
try-runtime = ["frame-support/try-runtime"]
try-runtime = ["frame-support/try-runtime"]
Loading
Loading