The Multi-Asset Bounties pallet has been merged and is now deployed on the Westend testnet. This release enables treasuries to fund bounties using assets other than the native token, such as stablecoins. We invite the community to start creating bounties on Westend and testing the flow.
1. Current Status & Next steps
The code is currently live on Westend for public testing.
-
Current Phase: Westend Testing (Live).
-
Audit Status: The pallet is audited.
-
Next Steps: Following a successful Westend testing period, we plan to propose the deployment of this pallet to Kusama, followed eventually by Polkadot.
2. Usage & API
If you are familiar with the existing pallet-treasury, the API for Multi-Asset Bounties will feel very familiar. We have modeled the API to mirror the multi-asset treasury setup to ensure consistency for developers.
The AssetKind and Beneficiary types are identical to those used in the Treasury. To read more about the types, visit below posts :
Multi Asset Treasury
Treasury spends various asset kinds
You can read a deep dive on why we chose the architectural approach here: RFC: Treasury API for Cross-Chain Transfers
Here is the RFC with full doc for the new multi-asset-bounties pallet: Multi-Asset and Cross-Chain Child-/Bounties: Proposed Pallet
3. Example Usage: Creating a bounty for specific Asset ID
For this Westend release, we are explicitly supporting the following flow: Spending USDT located on Asset Hub for a beneficiary who also resides on Asset Hub.
To demonstrate the required structure for spending a non-native asset, below is the JSON payload for the fund_bounty() extrinsic on the Multi-Asset Bounties pallet, configured to use USDT (Asset ID 1984) located on the Asset Hub.
{
"assetKind": {
"V5": {
"location": { // specify location(chain) of the asset
"parents": 0, // current chain i.e assethub
"interior": "Here"
},
"assetId": {
"parents": 0,
"interior": {
"X2": [
{
"PalletInstance": 50 // assets pallet
},
{
"GeneralIndex": 1984 // USDT asset
}
]
}
}
}
},
"value": 1000000,
"curator": {
"Id": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty" // Bob
},
"metadata": "0xf4ab053307e68dbac49d5e715a3428e6540db6716fafe9b18ee003b6f6111470" // hash of description
}
Encoded call data of the above call (the origin must be SpendOrigin): encoded call link **
**
For testing via chopstick with any origin account wrap the above call with sudo.
We invite the community to start creating bounties on Westend AssetHub using the new pallet.
4. References
Below is the list of related references:
-
RFC of Pallet : Multi-Asset and Cross-Chain Child-/Bounties: Proposed Pallet
-
Pallet Implementation PR: Pull Request #8381 (Pallet Implementation)
-
Treasury API for cross-chain transfers : RFC: Treasury API for Cross-Chain Transfers
-
Treasury spends various asset kinds : https://github.com/paritytech/polkadot-sdk/pull/1333
-
Creating a USDT treasury proposal spend with assethub: https://wiki.polkadot.com/learn/learn-guides-treasury/#creating-a-usdt-treasury-proposal—spend-with-assethub