-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* init new pallet. C&P * initial round timing logic and tests * new randomness trait and crate (from raffle PR) to use in pallets and runtime * build works * add cli and PublicGetter * broken approach with own trait. trying to just extend traits now * empty on_initialize and on_finalize builds now * on_initialize executes on_timestamp_set which starts a new round and draws a random lucky number which can be queried by cli * cant make BoundedVec work reasonably. will use vec * refactored to Vec * fix recursion loop * add unit tests * limit number of guess attempts * flow works with cli * add total issuance getter * nested guess-the-number subcommand and other cosmetics * fmt * better error logging * remove set-balance command which was deprecated long ago * cargo fix * fmt * clippy * taplo fmt * fix enclave test * bump lockfile * review comments fixed * re-inject set-balance TC but feature gate for test * fix cargo test * make CI scripts use shielding via vault instead of set-balance * restore enum order for TC to make cargo test work again * fmt * shuffle TC enum * fmt * pin TC,TG,PG enum encoding for upgrade compatibility * explicit enum pin type * use Charlie instead of Alice for sidechain demo to avoid genesis funds change * fix clippy * tiny alignment * fix demo script bug * fix some more * align CI tests and use non-prefunded Charlie too * charge fees to guess
- Loading branch information
Showing
56 changed files
with
1,658 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
[package] | ||
name = "pallet-guess-the-number" | ||
description = "a little game that only works with confidentiality" | ||
version = "0.11.0" | ||
authors = ["Integritee AG <[email protected]>"] | ||
homepage = "https://integritee.network/" | ||
repository = "https://github.com/integritee-network/pallets/" | ||
license = "Apache-2.0" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
codec = { version = "3.0.0", default-features = false, features = ["derive"], package = "parity-scale-codec" } | ||
log = { version = "0.4.14", default-features = false } | ||
scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } | ||
serde = { version = "1.0.13", features = ["derive"], optional = true } | ||
|
||
# substrate dependencies | ||
frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } | ||
frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } | ||
pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } | ||
pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } | ||
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } | ||
sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } | ||
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } | ||
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } | ||
|
||
itp-randomness = { path = "../../../../core-primitives/randomness" } | ||
|
||
[dev-dependencies] | ||
env_logger = "0.9.0" | ||
sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } | ||
|
||
[features] | ||
default = ["std"] | ||
std = [ | ||
"codec/std", | ||
"log/std", | ||
"scale-info/std", | ||
"serde", | ||
# substrate dependencies | ||
"frame-support/std", | ||
"frame-system/std", | ||
"pallet-balances/std", | ||
"sp-core/std", | ||
"sp-io/std", | ||
"sp-runtime/std", | ||
"sp-std/std", | ||
] | ||
|
||
try-runtime = ["frame-support/try-runtime"] |
Oops, something went wrong.