Skip to content

Commit

Permalink
[TASK] Tangle Liquid Staking Pallet (#744)
Browse files Browse the repository at this point in the history
* update types to 0.5.9

* wip : std errors

* build reward pools

* wip : tests failing

* wip : tests failing

* get rid of member requirements

* token bugs finally fixed

* test fixes

* test fixes

* test cleanup

* add precompiles

* cargo fmt

* test clippy

* cleanup clippy

* test clippy

* remove unused

* cleanup clippy

* cleanup clippy

* cleanup clippy

* switch to cargo t
  • Loading branch information
1xstj authored Aug 29, 2024
1 parent b275f14 commit 5486ca0
Show file tree
Hide file tree
Showing 42 changed files with 9,939 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
run: sudo apt-get install protobuf-compiler

- name: Run test suite
run: cargo test --release --workspace
run: cargo test

clippy:
concurrency:
Expand Down
53 changes: 44 additions & 9 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ tangle-primitives = { path = "primitives", default-features = false }
tangle-crypto-primitives = { path = "primitives/crypto", default-features = false }
pallet-staking = { path = "pallets/staking", default-features = false }
pallet-staking-reward-curve = { path = "pallets/staking/reward-curve", default-features = false }

pallet-tangle-lst = { path = "pallets/tangle-lst", default-features = false }
primitives-ext = { path = "primitives/ext", default-features = false }
evm-tracing-events = { path = "primitives/rpc/evm-tracing-events", default-features = false }
rpc-primitives-debug = { path = "primitives/rpc/debug", default-features = false }
Expand Down
1 change: 1 addition & 0 deletions node/src/chainspec/mainnet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,5 +310,6 @@ fn mainnet_genesis(
MultiAddress::Native(TreasuryPalletId::get().into_account_truncating()),
)),
},
lst: Default::default(),
}
}
1 change: 1 addition & 0 deletions node/src/chainspec/testnet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ fn testnet_genesis(
MultiAddress::Native(TreasuryPalletId::get().into_account_truncating()),
)),
},
lst: Default::default(),
}
}

Expand Down
77 changes: 77 additions & 0 deletions pallets/tangle-lst/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
[package]
name = "pallet-tangle-lst"
version = "25.0.0"
authors.workspace = true
edition.workspace = true
license = "Apache-2.0"
homepage = "https://substrate.io"
repository.workspace = true
description = "FRAME nomination pools pallet"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
# parity
scale-info = { version = "2.10.0", default-features = false, features = [
"derive",
] }
codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false, features = [
"derive",
] }
cfg-if = "1.0"
smart-default = "0.6.0"

# FRAME
frame-support = { workspace = true, default-features = false }
frame-system = { workspace = true, default-features = false }
sp-runtime = { workspace = true, default-features = false }
sp-std = { workspace = true, default-features = false }
sp-staking = { workspace = true, default-features = false }
sp-core = { workspace = true, default-features = false }
sp-io = { workspace = true, default-features = false }
log = { version = "0.4.0", default-features = false }
pallet-staking = { workspace = true }

# Optional: use for testing and/or fuzzing
pallet-balances = { workspace = true, optional = true }
pallet-assets = { workspace = true, optional = true }
sp-tracing = { workspace = true, optional = true }

[dev-dependencies]
pallet-balances = { workspace = true }
pallet-assets = { workspace = true }
sp-tracing = { workspace = true }

[features]
default = ["std"]
fuzzing = ["pallet-balances", "sp-tracing"]
std = [
"codec/std",
"frame-support/std",
"frame-system/std",
"log/std",
"pallet-balances?/std",
"pallet-assets?/std",
"scale-info/std",
"sp-core/std",
"sp-io/std",
"sp-runtime/std",
"sp-staking/std",
"sp-std/std",
"sp-tracing?/std",
"pallet-staking/std",
]
runtime-benchmarks = [
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"pallet-balances?/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"sp-staking/runtime-benchmarks",
]
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
"pallet-balances?/try-runtime",
"sp-runtime/try-runtime",
]
Loading

0 comments on commit 5486ca0

Please sign in to comment.