Skip to content

Commit

Permalink
Bump substrate v0.9.28 and add a MeetupResult in the `IssuedRewards…
Browse files Browse the repository at this point in the history
…` storage. (#274)

* claim_rewards_error_results_in_meetup_marked_as_completed fails

* remove debug print messages

* Fix bug #275:
- Add a claim_reward feedback in the IssuedRewards Storage
- claim_reward returns OK if a MeetupValidationError occurs in the Registration phase

* rename claim_reward_successfull

* Add Cargo.lock which was falsely deleted

* Fix to compile in std and no_std mode

* Use of strongly typed MeetupResult

* Rename test

* Add missing /std into std features

* Changes from review

* Changes from review: OptionQuery

Co-authored-by: echevrier <[email protected]>
  • Loading branch information
echevrier and echevrier authored Nov 9, 2022
1 parent 615c292 commit 7273267
Show file tree
Hide file tree
Showing 27 changed files with 1,003 additions and 1,015 deletions.
1,606 changes: 778 additions & 828 deletions Cargo.lock

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions balances-tx-payment/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ pallet-encointer-ceremonies = { path = "../ceremonies", default-features = false
encointer-primitives = { path = "../primitives", default-features = false }

# substrate dependencies
frame-support = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "master" }
frame-system = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "master" }
pallet-asset-tx-payment = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "master" }
pallet-transaction-payment = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "master" }
sp-runtime = { version = "6.0.0", git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "master" }
frame-support = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.28" }
frame-system = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.28" }
pallet-asset-tx-payment = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.28" }
pallet-transaction-payment = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.28" }
sp-runtime = { version = "6.0.0", git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.28" }

[dev-dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] }
rstest = "0.12.0"
scale-info = { version = "2.0.1", default-features = false }
sp-io = { version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-io = { version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" }
test-utils = { path = "../test-utils" }

[features]
Expand Down
20 changes: 10 additions & 10 deletions balances-tx-payment/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version = "1.0.0"

[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false }
jsonrpsee = {version = "0.14.0", features = ["server", "macros"]}
jsonrpsee = {version = "0.15.1", features = ["server", "macros"]}
log = "0.4.14"
parking_lot = "0.12.0"
thiserror = "1.0.31"
Expand All @@ -17,12 +17,12 @@ encointer-primitives = {path = "../../primitives"}
encointer-rpc = {path = "../../rpc"}

# substrate deps
pallet-transaction-payment = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "master" }
pallet-transaction-payment-rpc = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "master" }
sc-rpc = {version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "master"}
sc-rpc-api = {version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "master"}
sp-api = {version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "master"}
sp-blockchain = {version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "master"}
sp-core = {version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "master"}
sp-rpc = {version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "master"}
sp-runtime = {version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "master"}
pallet-transaction-payment = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.28" }
pallet-transaction-payment-rpc = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.28" }
sc-rpc = {version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28"}
sc-rpc-api = {version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28"}
sp-api = {version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28"}
sp-blockchain = {version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28"}
sp-core = {version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28"}
sp-rpc = {version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28"}
sp-runtime = {version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28"}
6 changes: 3 additions & 3 deletions balances-tx-payment/rpc/runtime-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ encointer-primitives = { path = "../../../primitives", default-features = false

# substrate deps
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] }
frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-std = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" }
frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" }
sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" }
sp-std = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" }

[features]
default = ["std"]
Expand Down
20 changes: 10 additions & 10 deletions balances/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ scale-info = { version = "2.0.1", default-features = false }
encointer-primitives = { path = "../primitives", default-features = false }

# substrate deps
frame-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, git = "https://github.com/paritytech/substrate.git", branch = "master" }
frame-support = { version = "4.0.0-dev", default-features = false,git = "https://github.com/paritytech/substrate.git", branch = "master" }
frame-system = { version = "4.0.0-dev", default-features = false,git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-std = { version = "4.0.0-dev", default-features = false,git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-runtime = { version = "6.0.0", default-features = false,git = "https://github.com/paritytech/substrate.git", branch = "master" }
pallet-transaction-payment = { version = "4.0.0-dev" , default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" }
pallet-asset-tx-payment = { version = "4.0.0-dev" , default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" }
frame-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" }
frame-support = { version = "4.0.0-dev", default-features = false,git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" }
frame-system = { version = "4.0.0-dev", default-features = false,git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" }
sp-std = { version = "4.0.0-dev", default-features = false,git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" }
sp-runtime = { version = "6.0.0", default-features = false,git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" }
pallet-transaction-payment = { version = "4.0.0-dev" , default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" }
pallet-asset-tx-payment = { version = "4.0.0-dev" , default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" }

[dev-dependencies]
approx = "0.5.1"
sp-io = { version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-io = { version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" }
test-utils = { path = "../test-utils" }

[features]
Expand All @@ -33,15 +33,15 @@ std = [
"codec/std",
"log/std",
"scale-info/std",

# local deps
"encointer-primitives/std",

# substrate deps
"frame-support/std",
"frame-system/std",
"sp-std/std",
"sp-runtime/std",
"pallet-asset-tx-payment/std",
"pallet-transaction-payment/std",
]

runtime-benchmarks = ["frame-benchmarking", "approx"]
12 changes: 6 additions & 6 deletions bazaar/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ encointer-communities = { package = "pallet-encointer-communities", path = "../c
encointer-primitives = { path = "../primitives", default-features = false }

# substrate deps
frame-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, git = "https://github.com/paritytech/substrate.git", branch = "master" }
frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" }
frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-std = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-core = { version = "6.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" }
frame-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" }
frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" }
frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" }
sp-std = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" }
sp-core = { version = "6.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" }

[dev-dependencies]
sp-io = { version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-io = { version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" }
test-utils = { path = "../test-utils" }

[features]
Expand Down
12 changes: 6 additions & 6 deletions bazaar/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name = "pallet-encointer-bazaar-rpc"
version = "1.0.0"

[dependencies]
jsonrpsee = {version = "0.14.0", features = ["server", "macros"]}
jsonrpsee = {version = "0.15.1", features = ["server", "macros"]}
log = "0.4.14"
parking_lot = "0.12.0"
thiserror = "1.0.31"
Expand All @@ -16,8 +16,8 @@ encointer-primitives = {path = "../../primitives"}
encointer-rpc = {path = "../../rpc"}

# substrate deps
sc-rpc = {version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "master"}
sc-rpc-api = {version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "master"}
sp-api = {version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "master"}
sp-blockchain = {version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "master"}
sp-runtime = {version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "master"}
sc-rpc = {version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28"}
sc-rpc-api = {version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28"}
sp-api = {version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28"}
sp-blockchain = {version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28"}
sp-runtime = {version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28"}
6 changes: 3 additions & 3 deletions bazaar/rpc/runtime-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ edition = "2021"
encointer-primitives = { path = "../../../primitives", default-features = false }

# substrate deps
frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-std = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" }
frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" }
sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" }
sp-std = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" }

[features]
default = ["std"]
Expand Down
35 changes: 18 additions & 17 deletions ceremonies/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,45 +18,46 @@ encointer-primitives = {path = "../primitives", default-features = false}
encointer-scheduler = {package = "pallet-encointer-scheduler", path = "../scheduler", default-features = false}

# substrate deps
frame-support = {version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "master"}
frame-system = {version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "master"}
pallet-timestamp = {version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "master"}
sp-io = {version = "6.0.0", git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "master"}
sp-runtime = {version = "6.0.0", git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "master"}
sp-std = {version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "master"}
frame-support = {version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.28"}
frame-system = {version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.28"}
pallet-timestamp = {version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.28"}
sp-io = {version = "6.0.0", git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.28"}
sp-runtime = {version = "6.0.0", git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.28"}
sp-std = {version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.28"}

# benchmarking
frame-benchmarking = {version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", default-features = false, optional = true, branch = "master"}
sp-application-crypto = {version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "master", default-features = false, optional = true}
sp-core = {version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "master", default-features = false, optional = true}
frame-benchmarking = {version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", default-features = false, optional = true, branch = "polkadot-v0.9.28"}
sp-application-crypto = {version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28", default-features = false, optional = true}
sp-core = {version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28", default-features = false, optional = true}

[dev-dependencies]
approx = "0.5.1"
itertools = "0.10.3"
rstest = "0.12.0"
sp-io = {version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "master"}
sp-keystore = {version = "0.12.0", git = "https://github.com/paritytech/substrate.git", branch = "master"}
sp-io = {version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28"}
sp-keystore = {version = "0.12.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28"}
test-utils = {path = "../test-utils"}

[features]
default = ["std"]
std = [
"codec/std",
"log/std",
"frame-support/std",
"frame-system/std",
"scale-info/std",
"sp-std/std",
"pallet-timestamp/std",
"encointer-balances/std",
"encointer-ceremonies-assignment/std",
"encointer-communities/std",
"encointer-meetup-validation/std",
"encointer-primitives/std",
"encointer-scheduler/std",
"frame-benchmarking/std",
"frame-support/std",
"frame-system/std",
"pallet-timestamp/std",
"sp-io/std",
"sp-runtime/std",
"sp-std/std",
"frame-benchmarking/std",
"sp-core/std",
"encointer-meetup-validation/std",
]

runtime-benchmarks = ["frame-benchmarking", "sp-application-crypto", "sp-core"]
6 changes: 3 additions & 3 deletions ceremonies/assignment/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ edition = "2021"
encointer-primitives = { path = "../../primitives", default-features = false }

# substrate deps
sp-runtime = { version = "6.0.0", git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "master" }
sp-std = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "master" }
sp-runtime = { version = "6.0.0", git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.28" }
sp-std = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.28" }

[dev-dependencies]
sp-core = { version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-core = { version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" }

[features]
default = ["std"]
Expand Down
6 changes: 3 additions & 3 deletions ceremonies/meetup-validation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ serde = {version = "1.0.136", default-features = false, features = ["derive", "a
encointer-primitives = {path = "../../primitives", default-features = false}

# substrate deps
sp-runtime = {version = "6.0.0", git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "master"}
sp-std = {version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "master"}
sp-runtime = {version = "6.0.0", git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.28"}
sp-std = {version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.28"}

[dev-dependencies]
rstest = "0.12.0"
sp-core = {version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "master"}
sp-core = {version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28"}

[features]
default = ["std"]
Expand Down
Loading

0 comments on commit 7273267

Please sign in to comment.