Skip to content

Commit

Permalink
Merge pull request #1019 from Setheum-Labs/dev0x
Browse files Browse the repository at this point in the history
Dev0x
  • Loading branch information
balqaasem authored Mar 13, 2024
2 parents 8126c53 + 6092421 commit a04c22c
Show file tree
Hide file tree
Showing 121 changed files with 4,226 additions and 1,377 deletions.
612 changes: 323 additions & 289 deletions Cargo.toml

Large diffs are not rendered by default.

1,352 changes: 676 additions & 676 deletions LICENSE.md → LICENSE

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions blockchain/modules/airdrop/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
[package]
name = "module-airdrop"
version = "0.9.81-dev"
authors = ["Setheum Labs"]
edition = "2021"
authors.workspace = true
edition.workspace = true
homepage.workspace = true
repository.workspace = true

[dependencies]
parity-scale-codec = { workspace = true, features = ["max-encoded-len"] }
Expand Down
2 changes: 1 addition & 1 deletion blockchain/modules/airdrop/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This list contains all TODOs in the Repo
- [1. Introduction](#1-guidelines)
- [2. Contribution](#2-contribution)
- [3. Lists](#3-lists)
- [4. Tasks](#3-tasks)
- [4. Tasks](#4-tasks)
<!-- /TOC -->


Expand Down
6 changes: 4 additions & 2 deletions blockchain/modules/asset-registry/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
[package]
name = "module-asset-registry"
version = "0.9.81-dev"
authors = ["Setheum Labs"]
edition = "2021"
authors.workspace = true
edition.workspace = true
homepage.workspace = true
repository.workspace = true

[dependencies]
log = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion blockchain/modules/asset-registry/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This list contains all TODOs in the Repo
- [1. Introduction](#1-guidelines)
- [2. Contribution](#2-contribution)
- [3. Lists](#3-lists)
- [4. Tasks](#3-tasks)
- [4. Tasks](#4-tasks)
<!-- /TOC -->


Expand Down
6 changes: 4 additions & 2 deletions blockchain/modules/currencies/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
[package]
name = "module-currencies"
version = "0.9.81-dev"
authors = ["Setheum Labs"]
edition = "2021"
authors.workspace = true
edition.workspace = true
homepage.workspace = true
repository.workspace = true

[dependencies]
parity-scale-codec = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion blockchain/modules/currencies/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This list contains all TODOs in the Repo
- [1. Introduction](#1-guidelines)
- [2. Contribution](#2-contribution)
- [3. Lists](#3-lists)
- [4. Tasks](#3-tasks)
- [4. Tasks](#4-tasks)
<!-- /TOC -->


Expand Down
6 changes: 4 additions & 2 deletions blockchain/modules/currencies/runtime-api/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
[package]
name = "module-currencies-runtime-api"
version = "0.9.81-dev"
authors = ["Setheum Labs"]
edition = "2021"
authors.workspace = true
edition.workspace = true
homepage.workspace = true
repository.workspace = true

[dependencies]
sp-runtime = { workspace = true }
Expand Down
6 changes: 4 additions & 2 deletions blockchain/modules/ecdp-auctions/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
[package]
name = "module-ecdp-auctions"
version = "0.9.81-dev"
authors = ["Setheum Labs"]
edition = "2021"
authors.workspace = true
edition.workspace = true
homepage.workspace = true
repository.workspace = true

[dependencies]
log = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion blockchain/modules/ecdp-auctions/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This list contains all TODOs in the Repo
- [1. Introduction](#1-guidelines)
- [2. Contribution](#2-contribution)
- [3. Lists](#3-lists)
- [4. Tasks](#3-tasks)
- [4. Tasks](#4-tasks)
<!-- /TOC -->


Expand Down
8 changes: 4 additions & 4 deletions blockchain/modules/ecdp-auctions/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ ord_parameter_types! {
parameter_types! {
pub const GetUSSDCurrencyId: CurrencyId = USSD;
pub const MaxAuctionsCount: u32 = 10_000;
pub const EcdpUssdTreasuryPalletId: PalletId = PalletId(*b"aca/cdpt");
pub TreasuryAccount: AccountId = PalletId(*b"aca/hztr").into_account_truncating();
pub const EcdpUssdTreasuryPalletId: PalletId = PalletId(*b"set/ussdtrsymod");
pub TreasuryAccount: AccountId = PalletId(*b"set/ussdtrsyacc").into_account_truncating();
pub AlternativeSwapPathJointList: Vec<Vec<CurrencyId>> = vec![
vec![EDF],
];
Expand Down Expand Up @@ -141,7 +141,7 @@ impl PriceProvider<CurrencyId> for MockPriceSource {
}

parameter_types! {
pub const EdfisSwapPalletId: PalletId = PalletId(*b"aca/dexm");
pub const EdfisSwapPalletId: PalletId = PalletId(*b"set/edfis");
pub const GetExchangeFee: (u32, u32) = (0, 100);
pub EnabledTradingPairs: Vec<TradingPair> = vec![
TradingPair::from_currency_ids(USSD, BTC).unwrap(),
Expand All @@ -157,7 +157,7 @@ impl module_edfis_swap_legacy::Config for Runtime {
type TradingPathLimit = ConstU32<4>;
type PalletId = EdfisSwapPalletId;
type Erc20InfoMapping = ();
type SwapDexIncentives = ();
type Incentives = ();
type WeightInfo = ();
type ListingOrigin = EnsureSignedBy<One, AccountId>;
type ExtendedProvisioningBlocks = ConstU64<0>;
Expand Down
102 changes: 52 additions & 50 deletions blockchain/modules/ecdp-emergency-shutdown/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,50 +1,52 @@
[package]
name = "module-ecdp-emergency-shutdown"
version = "0.9.81-dev"
authors = ["Setheum Labs"]
edition = "2021"

[dependencies]
scale-info = { workspace = true }
serde = { workspace = true, optional = true }
parity-scale-codec = { version = "3.0.0", default-features = false, features = ["max-encoded-len"] }
sp-runtime = { workspace = true }
sp-io = { workspace = true }
sp-std = { workspace = true }
frame-support = { workspace = true }
frame-system = { workspace = true }

primitives = { package = "setheum-primitives", path = "../primitives", default-features = false }
support = { package = "module-support", path = "../support", default-features = false }
orml-traits = { path = "../submodules/orml/traits", default-features = false }

[dev-dependencies]
sp-core = { workspace = true, features = ["std"] }
pallet-balances = { workspace = true }
orml-tokens = { workspace = true }

[features]
default = ["std"]
std = [
"scale-info/std",
"serde",
"parity-scale-codec/std",
"sp-runtime/std",
"sp-std/std",
"sp-io/std",
"frame-support/std",
"frame-system/std",
"primitives/std",
"support/std",
"orml-traits/std",
]
runtime-benchmarks = [
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
]
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
"sp-runtime/try-runtime",
]
[package]
name = "module-ecdp-emergency-shutdown"
version = "0.9.81-dev"
authors.workspace = true
edition.workspace = true
homepage.workspace = true
repository.workspace = true

[dependencies]
scale-info = { workspace = true }
serde = { workspace = true, optional = true }
parity-scale-codec = { version = "3.0.0", default-features = false, features = ["max-encoded-len"] }
sp-runtime = { workspace = true }
sp-io = { workspace = true }
sp-std = { workspace = true }
frame-support = { workspace = true }
frame-system = { workspace = true }

primitives = { package = "setheum-primitives", path = "../primitives", default-features = false }
support = { package = "module-support", path = "../support", default-features = false }
orml-traits = { path = "../submodules/orml/traits", default-features = false }

[dev-dependencies]
sp-core = { workspace = true, features = ["std"] }
pallet-balances = { workspace = true }
orml-tokens = { workspace = true }

[features]
default = ["std"]
std = [
"scale-info/std",
"serde",
"parity-scale-codec/std",
"sp-runtime/std",
"sp-std/std",
"sp-io/std",
"frame-support/std",
"frame-system/std",
"primitives/std",
"support/std",
"orml-traits/std",
]
runtime-benchmarks = [
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
]
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
"sp-runtime/try-runtime",
]
2 changes: 1 addition & 1 deletion blockchain/modules/ecdp-emergency-shutdown/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This list contains all TODOs in the Repo
- [1. Introduction](#1-guidelines)
- [2. Contribution](#2-contribution)
- [3. Lists](#3-lists)
- [4. Tasks](#3-tasks)
- [4. Tasks](#4-tasks)
<!-- /TOC -->


Expand Down
6 changes: 4 additions & 2 deletions blockchain/modules/ecdp-setr-engine/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
[package]
name = "module-ecdp-setr-engine"
version = "0.9.81-dev"
authors = ["Setheum Labs"]
edition = "2021"
authors.workspace = true
edition.workspace = true
homepage.workspace = true
repository.workspace = true

[dependencies]
scale-info = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion blockchain/modules/ecdp-setr-engine/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This list contains all TODOs in the Repo
- [1. Introduction](#1-guidelines)
- [2. Contribution](#2-contribution)
- [3. Lists](#3-lists)
- [4. Tasks](#3-tasks)
- [4. Tasks](#4-tasks)
<!-- /TOC -->


Expand Down
6 changes: 4 additions & 2 deletions blockchain/modules/ecdp-setr-loans/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
[package]
name = "module-ecdp-setr-loans"
version = "0.9.81-dev"
authors = ["Setheum Labs"]
edition = "2021"
authors.workspace = true
edition.workspace = true
homepage.workspace = true
repository.workspace = true

[dependencies]
scale-info = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion blockchain/modules/ecdp-setr-loans/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This list contains all TODOs in the Repo
- [1. Introduction](#1-guidelines)
- [2. Contribution](#2-contribution)
- [3. Lists](#3-lists)
- [4. Tasks](#3-tasks)
- [4. Tasks](#4-tasks)
<!-- /TOC -->


Expand Down
6 changes: 4 additions & 2 deletions blockchain/modules/ecdp-setr-treasury/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
[package]
name = "module-ecdp-setr-treasury"
version = "0.9.81-dev"
authors = ["Setheum Labs"]
edition = "2021"
authors.workspace = true
edition.workspace = true
homepage.workspace = true
repository.workspace = true

[dependencies]
scale-info = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion blockchain/modules/ecdp-setr-treasury/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This list contains all TODOs in the Repo
- [1. Introduction](#1-guidelines)
- [2. Contribution](#2-contribution)
- [3. Lists](#3-lists)
- [4. Tasks](#3-tasks)
- [4. Tasks](#4-tasks)
<!-- /TOC -->


Expand Down
6 changes: 4 additions & 2 deletions blockchain/modules/ecdp-ussd-engine/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
[package]
name = "module-ecdp-ussd-engine"
version = "0.9.81-dev"
authors = ["Setheum Labs"]
edition = "2021"
authors.workspace = true
edition.workspace = true
homepage.workspace = true
repository.workspace = true

[dependencies]
log = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion blockchain/modules/ecdp-ussd-engine/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This list contains all TODOs in the Repo
- [1. Introduction](#1-guidelines)
- [2. Contribution](#2-contribution)
- [3. Lists](#3-lists)
- [4. Tasks](#3-tasks)
- [4. Tasks](#4-tasks)
<!-- /TOC -->


Expand Down
12 changes: 6 additions & 6 deletions blockchain/modules/ecdp-ussd-engine/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ impl orml_currencies::Config for Runtime {
}

parameter_types! {
pub const EcdpUssdLoansPalletId: PalletId = PalletId(*b"aca/loan");
pub const EcdpUssdLoansPalletId: PalletId = PalletId(*b"set/ussdloan");
}

impl module_ecdp_ussd_loans::Config for Runtime {
Expand Down Expand Up @@ -205,8 +205,8 @@ impl EcdpAuctionsManager<AccountId> for MockEcdpAuctionsManager {

parameter_types! {
pub const GetUSSDCurrencyId: CurrencyId = USSD;
pub const EcdpUssdTreasuryPalletId: PalletId = PalletId(*b"aca/cdpt");
pub TreasuryAccount: AccountId = PalletId(*b"aca/hztr").into_account_truncating();
pub const EcdpUssdTreasuryPalletId: PalletId = PalletId(*b"set/ussdtrsymod");
pub TreasuryAccount: AccountId = PalletId(*b"set/ussdtrsyacc").into_account_truncating();
pub AlternativeSwapPathJointList: Vec<Vec<CurrencyId>> = vec![
vec![SEE],
];
Expand All @@ -227,7 +227,7 @@ impl module_ecdp_ussd_treasury::Config for Runtime {
}

parameter_types! {
pub const EdfisSwapPalletId: PalletId = PalletId(*b"aca/dexm");
pub const EdfisSwapPalletId: PalletId = PalletId(*b"set/edfis");
pub const GetExchangeFee: (u32, u32) = (0, 100);
pub EnabledTradingPairs: Vec<TradingPair> = vec![
TradingPair::from_currency_ids(USSD, BTC).unwrap(),
Expand All @@ -245,7 +245,7 @@ impl module_edfis_swap_legacy::Config for Runtime {
type TradingPathLimit = ConstU32<4>;
type PalletId = EdfisSwapPalletId;
type Erc20InfoMapping = ();
type SwapDexIncentives = ();
type Incentives = ();
type WeightInfo = ();
type ListingOrigin = EnsureSignedBy<One, AccountId>;
type ExtendedProvisioningBlocks = ConstU64<0>;
Expand Down Expand Up @@ -402,7 +402,7 @@ parameter_types! {
pub DefaultLiquidationPenalty: FractionalRate = FractionalRate::try_from(Rate::saturating_from_rational(10, 100)).unwrap();
pub MaxSwapSlippageCompareToOracle: Ratio = Ratio::saturating_from_rational(50, 100);
pub MaxLiquidationContractSlippage: Ratio = Ratio::saturating_from_rational(80, 100);
pub const EcdpUssdEnginePalletId: PalletId = PalletId(*b"aca/cdpe");
pub const EcdpUssdEnginePalletId: PalletId = PalletId(*b"set/ussde");
pub const SettleErc20EvmOrigin: AccountId = AccountId32::new([255u8; 32]);
}

Expand Down
Loading

0 comments on commit a04c22c

Please sign in to comment.