Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
fc2c4a2
frame-support: add FundingSource and FundingSink traits
sigurpol Nov 25, 2025
1a376c6
pallet-dap: implement FundingSource and basic DAP pallet structure
sigurpol Nov 28, 2025
2313672
staking: redirect slash to DAP for WAH and staking-async testnet
sigurpol Dec 1, 2025
931cd52
treasury: redirect burns to DAP
sigurpol Dec 1, 2025
baf8ea2
Update from github-actions[bot] running command 'prdoc --audience run…
github-actions[bot] Dec 1, 2025
2e601e7
zepter
sigurpol Dec 1, 2025
f6a542e
pallet-dap-satellite: introduce minimal implementation and use it cor…
sigurpol Dec 3, 2025
d7f413a
westend-runtime: integrate with pallet-dap-satellite
sigurpol Dec 3, 2025
b894db3
Integrated People, Bridge Hub, Collective Westend with DAP satellite
sigurpol Dec 3, 2025
a980371
dap-satellite: introduce a configurable fee handler splitting fees be…
sigurpol Dec 3, 2025
95f07db
fix umbrella crate
sigurpol Dec 3, 2025
5dafb04
fix prdoc
sigurpol Dec 4, 2025
4be39f5
pallet-balances: integration with DAP
sigurpol Dec 4, 2025
fdaedfc
Improve prdoc
sigurpol Dec 4, 2025
9c3edd4
non DAP runtimes: use BurnDestination = DirectBurn<Runtime>
sigurpol Dec 5, 2025
becef1e
fix prdoc
sigurpol Dec 5, 2025
71be1b2
fix more runtimes
sigurpol Dec 5, 2025
e963765
fix contracts mock runtime
sigurpol Dec 5, 2025
ceb1034
fix more runtimes
sigurpol Dec 5, 2025
928ca73
fix NIS pallet
sigurpol Dec 5, 2025
27b7fdb
fix xcm-builder mock runtime
sigurpol Dec 5, 2025
d063655
Merge branch 'master' into sigurpol-dap
sigurpol Dec 8, 2025
eb0f384
dap, dap-satellite: use withdraw + resolve instead of transfer
sigurpol Dec 8, 2025
62c36fb
Use DirectBurn in mock/test runtimes too
sigurpol Dec 8, 2025
0d95fd2
prdoc
sigurpol Dec 8, 2025
dfd82cc
dap, dap-satellite: more tests
sigurpol Dec 8, 2025
c200853
dap,dap-satellite: better error handling
sigurpol Dec 8, 2025
3cca6cf
dap,dap-satellite: improve documentation
sigurpol Dec 8, 2025
c7d2eb5
prdoc
sigurpol Dec 8, 2025
4d163d3
dap, dap-satellite: log w/o error out if resolve fails
sigurpol Dec 8, 2025
f181a62
Merge branch 'master' into sigurpol-dap
sigurpol Dec 8, 2025
ba3ce5e
dap, dap-satellite: account creation at genesis / on_runtime_upgrade
sigurpol Dec 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions Cargo.lock

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

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,8 @@ members = [
"substrate/frame/contracts/uapi",
"substrate/frame/conviction-voting",
"substrate/frame/core-fellowship",
"substrate/frame/dap",
"substrate/frame/dap-satellite",
"substrate/frame/delegated-staking",
"substrate/frame/democracy",
"substrate/frame/derivatives",
Expand Down Expand Up @@ -984,6 +986,8 @@ pallet-contracts-proc-macro = { path = "substrate/frame/contracts/proc-macro", d
pallet-contracts-uapi = { path = "substrate/frame/contracts/uapi", default-features = false }
pallet-conviction-voting = { path = "substrate/frame/conviction-voting", default-features = false }
pallet-core-fellowship = { path = "substrate/frame/core-fellowship", default-features = false }
pallet-dap = { path = "substrate/frame/dap", default-features = false }
pallet-dap-satellite = { path = "substrate/frame/dap-satellite", default-features = false }
pallet-default-config-example = { path = "substrate/frame/examples/default-config", default-features = false }
pallet-delegated-staking = { path = "substrate/frame/delegated-staking", default-features = false }
pallet-democracy = { path = "substrate/frame/democracy", default-features = false }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ impl pallet_balances::Config for Runtime {
type FreezeIdentifier = RuntimeFreezeReason;
type MaxFreezes = ConstU32<50>;
type DoneSlashHandler = ();
type BurnDestination = pallet_balances::DirectBurn<Runtime>;
}

parameter_types! {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ cumulus-primitives-aura = { workspace = true }
cumulus-primitives-core = { workspace = true }
cumulus-primitives-utility = { workspace = true }
pallet-collator-selection = { workspace = true }
pallet-dap = { workspace = true }
pallet-message-queue = { workspace = true }
parachain-info = { workspace = true }
parachains-common = { workspace = true }
Expand Down Expand Up @@ -173,6 +174,7 @@ runtime-benchmarks = [
"pallet-balances/runtime-benchmarks",
"pallet-collator-selection/runtime-benchmarks",
"pallet-conviction-voting/runtime-benchmarks",
"pallet-dap/runtime-benchmarks",
"pallet-delegated-staking/runtime-benchmarks",
"pallet-election-provider-multi-block/runtime-benchmarks",
"pallet-fast-unstake/runtime-benchmarks",
Expand Down Expand Up @@ -246,6 +248,7 @@ try-runtime = [
"pallet-balances/try-runtime",
"pallet-collator-selection/try-runtime",
"pallet-conviction-voting/try-runtime",
"pallet-dap/try-runtime",
"pallet-delegated-staking/try-runtime",
"pallet-election-provider-multi-block/try-runtime",
"pallet-fast-unstake/try-runtime",
Expand Down Expand Up @@ -326,6 +329,7 @@ std = [
"pallet-balances/std",
"pallet-collator-selection/std",
"pallet-conviction-voting/std",
"pallet-dap/std",
"pallet-delegated-staking/std",
"pallet-election-provider-multi-block/std",
"pallet-fast-unstake/std",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ impl pallet_treasury::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type SpendPeriod = SpendPeriod;
type Burn = Burn;
type BurnDestination = ();
type BurnDestination = pallet_dap::BurnToDap<Runtime, Balances>;
type MaxApprovals = MaxApprovals;
type WeightInfo = weights::pallet_treasury::WeightInfo<Runtime>;
type SpendFunds = ();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ impl pallet_balances::Config for Runtime {
type FreezeIdentifier = RuntimeFreezeReason;
type MaxFreezes = frame_support::traits::VariantCountOf<RuntimeFreezeReason>;
type DoneSlashHandler = ();
type BurnDestination = pallet_dap::ReturnToDap<Runtime>;
}

parameter_types! {
Expand Down Expand Up @@ -1398,6 +1399,9 @@ construct_runtime!(
Treasury: pallet_treasury = 94,
AssetRate: pallet_asset_rate = 95,

// Dynamic Allocation Pool / Issuance Buffer
Dap: pallet_dap = 100,

// TODO: the pallet instance should be removed once all pools have migrated
// to the new account IDs.
AssetConversionMigration: pallet_asset_conversion_ops = 200,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ impl pallet_staking_async::Config for Runtime {
type RuntimeHoldReason = RuntimeHoldReason;
type CurrencyToVote = sp_staking::currency_to_vote::SaturatingCurrencyToVote;
type RewardRemainder = ();
type Slash = ();
type Slash = pallet_dap::SlashToDap<Runtime>;
type Reward = ();
type SessionsPerEra = SessionsPerEra;
type BondingDuration = BondingDuration;
Expand Down Expand Up @@ -311,6 +311,10 @@ impl pallet_staking_async_rc_client::Config for Runtime {
type ValidatorSetExportSession = ConstU32<4>;
}

impl pallet_dap::Config for Runtime {
type Currency = Balances;
}

#[derive(Encode, Decode)]
// Call indices taken from westend-next runtime.
pub enum RelayChainRuntimePallets {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ impl pallet_balances::Config for Runtime {
type FreezeIdentifier = ();
type MaxFreezes = ConstU32<0>;
type DoneSlashHandler = ();
type BurnDestination = pallet_balances::DirectBurn<Runtime>;
}

parameter_types! {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ frame-try-runtime = { optional = true, workspace = true }
pallet-aura = { workspace = true }
pallet-authorship = { workspace = true }
pallet-balances = { workspace = true }
pallet-dap-satellite = { workspace = true }
pallet-message-queue = { workspace = true }
pallet-multisig = { workspace = true }
pallet-session = { workspace = true }
Expand Down Expand Up @@ -174,6 +175,7 @@ std = [
"pallet-bridge-parachains/std",
"pallet-bridge-relayers/std",
"pallet-collator-selection/std",
"pallet-dap-satellite/std",
"pallet-message-queue/std",
"pallet-multisig/std",
"pallet-session/std",
Expand Down Expand Up @@ -254,6 +256,7 @@ runtime-benchmarks = [
"pallet-bridge-parachains/runtime-benchmarks",
"pallet-bridge-relayers/runtime-benchmarks",
"pallet-collator-selection/runtime-benchmarks",
"pallet-dap-satellite/runtime-benchmarks",
"pallet-message-queue/runtime-benchmarks",
"pallet-multisig/runtime-benchmarks",
"pallet-session/runtime-benchmarks",
Expand Down Expand Up @@ -304,6 +307,7 @@ try-runtime = [
"pallet-bridge-parachains/try-runtime",
"pallet-bridge-relayers/try-runtime",
"pallet-collator-selection/try-runtime",
"pallet-dap-satellite/try-runtime",
"pallet-message-queue/try-runtime",
"pallet-multisig/try-runtime",
"pallet-session/try-runtime",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,17 +354,24 @@ impl pallet_balances::Config for Runtime {
type FreezeIdentifier = ();
type MaxFreezes = ConstU32<0>;
type DoneSlashHandler = ();
type BurnDestination = pallet_dap_satellite::AccumulateInSatellite<Runtime>;
}

parameter_types! {
/// Relay Chain `TransactionByteFee` / 10
pub const TransactionByteFee: Balance = MILLICENTS;
/// Percentage of fees to send to DAP satellite (0 = all to staking pot, 100 = all to DAP).
pub const DapSatelliteFeePercent: u32 = 0;
}

/// Fee handler that splits fees between DAP satellite and staking pot.
type DealWithFeesSatellite =
pallet_dap_satellite::DealWithFeesSplit<Runtime, DapSatelliteFeePercent, DealWithFees<Runtime>>;

impl pallet_transaction_payment::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type OnChargeTransaction =
pallet_transaction_payment::FungibleAdapter<Balances, DealWithFees<Runtime>>;
pallet_transaction_payment::FungibleAdapter<Balances, DealWithFeesSatellite>;
type OperationalFeeMultiplier = ConstU8<5>;
type WeightToFee = WeightToFee;
type LengthToFee = ConstantMultiplier<Balance, TransactionByteFee>;
Expand Down Expand Up @@ -552,6 +559,10 @@ impl pallet_utility::Config for Runtime {
type WeightInfo = weights::pallet_utility::WeightInfo<Runtime>;
}

impl pallet_dap_satellite::Config for Runtime {
type Currency = Balances;
}

// Create the runtime by composing the FRAME pallets that were previously configured.
construct_runtime!(
pub enum Runtime
Expand Down Expand Up @@ -583,6 +594,9 @@ construct_runtime!(
Utility: pallet_utility = 40,
Multisig: pallet_multisig = 36,

// DAP Satellite - collects funds for eventual transfer to DAP on AssetHub.
DapSatellite: pallet_dap_satellite = 60,

// Bridging stuff.
BridgeRelayers: pallet_bridge_relayers = 41,
BridgeRococoGrandpa: pallet_bridge_grandpa::<Instance1> = 42,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ pallet-authorship = { workspace = true }
pallet-balances = { workspace = true }
pallet-collective = { workspace = true }
pallet-core-fellowship = { workspace = true }
pallet-dap-satellite = { workspace = true }
pallet-multisig = { workspace = true }
pallet-preimage = { workspace = true }
pallet-proxy = { workspace = true }
Expand Down Expand Up @@ -120,6 +121,7 @@ runtime-benchmarks = [
"pallet-collective-content/runtime-benchmarks",
"pallet-collective/runtime-benchmarks",
"pallet-core-fellowship/runtime-benchmarks",
"pallet-dap-satellite/runtime-benchmarks",
"pallet-message-queue/runtime-benchmarks",
"pallet-multisig/runtime-benchmarks",
"pallet-preimage/runtime-benchmarks",
Expand Down Expand Up @@ -165,6 +167,7 @@ try-runtime = [
"pallet-collective-content/try-runtime",
"pallet-collective/try-runtime",
"pallet-core-fellowship/try-runtime",
"pallet-dap-satellite/try-runtime",
"pallet-message-queue/try-runtime",
"pallet-multisig/try-runtime",
"pallet-preimage/try-runtime",
Expand Down Expand Up @@ -213,6 +216,7 @@ std = [
"pallet-collective-content/std",
"pallet-collective/std",
"pallet-core-fellowship/std",
"pallet-dap-satellite/std",
"pallet-message-queue/std",
"pallet-multisig/std",
"pallet-preimage/std",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,17 +234,24 @@ impl pallet_balances::Config for Runtime {
type FreezeIdentifier = ();
type MaxFreezes = ConstU32<0>;
type DoneSlashHandler = ();
type BurnDestination = pallet_dap_satellite::AccumulateInSatellite<Runtime>;
}

parameter_types! {
/// Relay Chain `TransactionByteFee` / 10
pub const TransactionByteFee: Balance = MILLICENTS;
/// Percentage of fees to send to DAP satellite (0 = all to staking pot, 100 = all to DAP).
pub const DapSatelliteFeePercent: u32 = 0;
}

/// Fee handler that splits fees between DAP satellite and staking pot.
type DealWithFeesSatellite =
pallet_dap_satellite::DealWithFeesSplit<Runtime, DapSatelliteFeePercent, DealWithFees<Runtime>>;

impl pallet_transaction_payment::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type OnChargeTransaction =
pallet_transaction_payment::FungibleAdapter<Balances, DealWithFees<Runtime>>;
pallet_transaction_payment::FungibleAdapter<Balances, DealWithFeesSatellite>;
type WeightToFee = WeightToFee;
type LengthToFee = ConstantMultiplier<Balance, TransactionByteFee>;
type FeeMultiplierUpdate = SlowAdjustingFeeUpdate<Self>;
Expand Down Expand Up @@ -748,6 +755,9 @@ construct_runtime!(

StateTrieMigration: pallet_state_trie_migration = 80,

// DAP Satellite - collects funds for eventual transfer to DAP on AssetHub.
DapSatellite: pallet_dap_satellite = 85,

// The Secretary Collective
// pub type SecretaryCollectiveInstance = pallet_ranked_collective::instance3;
SecretaryCollective: pallet_ranked_collective::<Instance3> = 90,
Expand Down Expand Up @@ -1383,6 +1393,10 @@ impl pallet_state_trie_migration::Config for Runtime {
type MaxKeyLen = MigrationMaxKeyLen;
}

impl pallet_dap_satellite::Config for Runtime {
type Currency = Balances;
}

frame_support::ord_parameter_types! {
pub const MigController: AccountId = AccountId::from(hex_literal::hex!("8458ed39dc4b6f6c7255f7bc42be50c2967db126357c999d44e12ca7ac80dc52"));
pub const RootMigController: AccountId = AccountId::from(hex_literal::hex!("8458ed39dc4b6f6c7255f7bc42be50c2967db126357c999d44e12ca7ac80dc52"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ impl pallet_balances::Config for Runtime {
type FreezeIdentifier = ();
type MaxFreezes = ConstU32<0>;
type DoneSlashHandler = ();
type BurnDestination = pallet_balances::DirectBurn<Runtime>;
}

parameter_types! {
Expand Down
Loading
Loading