Skip to content

Commit

Permalink
Add liability pallet to main runtime (#258)
Browse files Browse the repository at this point in the history
* Use liability market by default

* Fix formatting
  • Loading branch information
akru authored Mar 8, 2022
1 parent 2edc112 commit 9468f65
Show file tree
Hide file tree
Showing 16 changed files with 134 additions and 63 deletions.
37 changes: 20 additions & 17 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion bin/node/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "robonomics-node"
version = "1.7.3"
version = "1.8.0"
authors = ["Airalab <[email protected]>"]
description = "Robonomics node implementation in Rust & Substrate."
edition = "2018"
Expand Down
2 changes: 1 addition & 1 deletion bin/node/rpc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "robonomics-rpc"
version = "1.7.3"
version = "1.8.0"
authors = ["Airalab <[email protected]>"]
edition = "2018"
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion bin/node/service/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "robonomics-service"
version = "1.7.3"
version = "1.8.0"
authors = ["Airalab <[email protected]>"]
description = "Robonomics node console line interface."
build = "build.rs"
Expand Down
6 changes: 4 additions & 2 deletions frame/liability/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "pallet-robonomics-liability"
description = "Robonomics Network Robot Liability Substrate runtime module"
version = "0.6.2"
version = "0.7.0"
authors = ["Airalab <[email protected]>"]
edition = "2018"

Expand All @@ -17,8 +17,10 @@ frame-system = { git = "https://github.com/paritytech/substrate", branch = "polk
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17", default-features = false }

[dev-dependencies]
base58 = "0.1.0"
hex-literal = "0.2"
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }

[features]
default = ["std"]
Expand Down
9 changes: 7 additions & 2 deletions frame/liability/src/economics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,13 @@
use codec::{Decode, Encode};
use frame_support::traits::Currency;
use scale_info::TypeInfo;
use sp_runtime::RuntimeDebug;

/// Simple market as approach: liability has a price of execution.
#[derive(Encode, Decode, PartialEq, Eq, RuntimeDebug)]
pub struct SimpleMarket<AccountId, C: Currency<AccountId>>(pub C::Balance);
#[derive(Encode, Decode, PartialEq, Clone, Eq, TypeInfo, RuntimeDebug)]
#[scale_info(skip_type_params(C))]
pub struct SimpleMarket<AccountId, C: Currency<AccountId>> {
#[codec(compact)]
pub price: C::Balance,
}
Loading

0 comments on commit 9468f65

Please sign in to comment.