Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
0dd1706
Basic treasury spend functionality test added with helper functions
dhirajs0 Oct 9, 2025
0d4f114
test renamed
dhirajs0 Oct 9, 2025
59a141a
test added: Void a previously approved proposal
dhirajs0 Oct 9, 2025
45b1da6
spend and reejct origin defined
dhirajs0 Oct 9, 2025
622cef6
test added: claim a spend
dhirajs0 Oct 9, 2025
a76de6d
testAccounts.alice.address funded with intiail usdt balance on assethub
dhirajs0 Oct 9, 2025
ba9e8db
createSpendProposal() helper function added
dhirajs0 Oct 9, 2025
a58c2b4
helper function verifySystemEventAssetSpendApproved() added
dhirajs0 Oct 9, 2025
b50d6d4
helper functions added : voidApprovedSpendProposal, verifySystemEven…
dhirajs0 Oct 9, 2025
6b957ae
added initial usdt funding to alice account on asset hub
dhirajs0 Oct 9, 2025
a050fe1
Revert "testAccounts.alice.address funded with intiail usdt balance o…
dhirajs0 Oct 9, 2025
1ce30d7
linter fix
dhirajs0 Oct 9, 2025
5d9619b
import fix
dhirajs0 Oct 9, 2025
b1c013d
helpers added getAssetHubBalanceAmount and setInitialUSDTBalanceOnAss…
dhirajs0 Oct 9, 2025
24a57df
test added: Check status of a spend and remove it from the storage if…
dhirajs0 Oct 10, 2025
27436d8
test added: Proposing a expired spend emits `SpendExpired` error
dhirajs0 Oct 10, 2025
db5a0b0
test added: Smalltipper trying to spend more than the origin allows e…
dhirajs0 Oct 10, 2025
4a136ed
updated snapshot
dhirajs0 Oct 10, 2025
b05122c
treasury module added in assetHubKusama
dhirajs0 Oct 22, 2025
82ae67a
test added: Check treasury payouts which are already approved can be …
dhirajs0 Oct 22, 2025
c1a9823
all tests ported to assetHub from relay chain
dhirajs0 Oct 22, 2025
b2cab2d
blockProvide added for scheduleInlineCallWithOrigin
dhirajs0 Oct 26, 2025
8ae0eb4
asset kind of spend changed to native
dhirajs0 Oct 28, 2025
412e5b5
sendCheckStatusTx ported to Asset hub
dhirajs0 Oct 28, 2025
fe90b35
check_status called for treasury payouts
dhirajs0 Oct 28, 2025
41c548b
updated
dhirajs0 Oct 28, 2025
d0ab95f
ASSET_KIND and BENEFICIARY_LOCATION modified for assethub
dhirajs0 Oct 28, 2025
0b21190
largeSpendAmount with smalltipper
dhirajs0 Oct 28, 2025
798a799
block provided added in voidSpend
dhirajs0 Oct 28, 2025
be17ac8
usdt balance comparison replaced with native balance
dhirajs0 Oct 28, 2025
fc797ac
unused usdt funding functions removed
dhirajs0 Oct 28, 2025
0faeb76
initial usdt funding removed
dhirajs0 Oct 28, 2025
53594e6
old test treasurySpendForeignAssetTest for relay chain removed
dhirajs0 Oct 28, 2025
4d5838a
lint fixed
dhirajs0 Oct 28, 2025
1a29ecb
snapshot for treasury assethub pallet
dhirajs0 Oct 28, 2025
1c46b4b
assetHubPolkadot e2e module added
dhirajs0 Oct 28, 2025
69e21e5
fixed tests failing on the PAH due to multiple dispatched events
dhirajs0 Oct 28, 2025
68d482c
refac
dhirajs0 Oct 28, 2025
befe367
snaps assetHubPolkadot treasury updated
dhirajs0 Oct 28, 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Kusama Asset Hub Treasury > Check status of a spend and remove it from the storage if processed > payout events 1`] = `
[
{
"data": {
"index": "(redacted)",
"paymentId": "(redacted)",
},
"method": "Paid",
"section": "treasury",
},
]
`;

exports[`Kusama Asset Hub Treasury > Check status of a spend and remove it from the storage if processed > spend processed events 1`] = `
[
{
"data": {
"index": "(redacted)",
},
"method": "SpendProcessed",
"section": "treasury",
},
]
`;

exports[`Kusama Asset Hub Treasury > Check status of a spend and remove it from the storage if processed > treasury spend approval events 1`] = `
[
{
"data": "(redacted)",
"method": "AssetSpendApproved",
"section": "treasury",
},
]
`;

exports[`Kusama Asset Hub Treasury > Check treasury payouts which are already approved can be paid > spend processed events 1`] = `
[
{
"data": {
"index": "(redacted)",
},
"method": "SpendProcessed",
"section": "treasury",
},
]
`;

exports[`Kusama Asset Hub Treasury > Claim a spend > payout events 1`] = `
[
{
"data": {
"index": "(redacted)",
"paymentId": "(redacted)",
},
"method": "Paid",
"section": "treasury",
},
]
`;

exports[`Kusama Asset Hub Treasury > Claim a spend > treasury spend approval events 1`] = `
[
{
"data": "(redacted)",
"method": "AssetSpendApproved",
"section": "treasury",
},
]
`;

exports[`Kusama Asset Hub Treasury > Propose and approve a spend of treasury funds > treasury spend approval events 1`] = `
[
{
"data": "(redacted)",
"method": "AssetSpendApproved",
"section": "treasury",
},
]
`;

exports[`Kusama Asset Hub Treasury > Void previously approved spend > treasury spend approval events 1`] = `
[
{
"data": "(redacted)",
"method": "AssetSpendApproved",
"section": "treasury",
},
]
`;

exports[`Kusama Asset Hub Treasury > Void previously approved spend > treasury spend voided events 1`] = `
[
{
"data": {
"index": "(redacted)",
},
"method": "AssetSpendVoided",
"section": "treasury",
},
]
`;
11 changes: 11 additions & 0 deletions packages/kusama/src/assetHubKusama.treasury.e2e.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { assetHubKusama, kusama } from '@e2e-test/networks/chains'
import { baseTreasuryE2ETests, type ParaTestConfig, registerTestTree } from '@e2e-test/shared'

const testConfig: ParaTestConfig = {
testSuiteName: 'Kusama Asset Hub Treasury',
addressEncoding: 2,
blockProvider: 'NonLocal',
asyncBacking: 'Enabled',
}

registerTestTree(baseTreasuryE2ETests(kusama, assetHubKusama, testConfig))
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Polkadot Asset Hub Treasury > Check status of a spend and remove it from the storage if processed > payout events 1`] = `
[
{
"data": {
"index": "(redacted)",
"paymentId": "(redacted)",
},
"method": "Paid",
"section": "treasury",
},
]
`;

exports[`Polkadot Asset Hub Treasury > Check status of a spend and remove it from the storage if processed > spend processed events 1`] = `
[
{
"data": {
"index": "(redacted)",
},
"method": "SpendProcessed",
"section": "treasury",
},
]
`;

exports[`Polkadot Asset Hub Treasury > Check status of a spend and remove it from the storage if processed > treasury spend approval events 1`] = `
[
{
"data": "(redacted)",
"method": "AssetSpendApproved",
"section": "treasury",
},
]
`;

exports[`Polkadot Asset Hub Treasury > Claim a spend > payout events 1`] = `
[
{
"data": {
"index": "(redacted)",
"paymentId": "(redacted)",
},
"method": "Paid",
"section": "treasury",
},
]
`;

exports[`Polkadot Asset Hub Treasury > Claim a spend > treasury spend approval events 1`] = `
[
{
"data": "(redacted)",
"method": "AssetSpendApproved",
"section": "treasury",
},
]
`;

exports[`Polkadot Asset Hub Treasury > Propose and approve a spend of treasury funds > treasury spend approval events 1`] = `
[
{
"data": "(redacted)",
"method": "AssetSpendApproved",
"section": "treasury",
},
]
`;

exports[`Polkadot Asset Hub Treasury > Void previously approved spend > treasury spend approval events 1`] = `
[
{
"data": "(redacted)",
"method": "AssetSpendApproved",
"section": "treasury",
},
]
`;

exports[`Polkadot Asset Hub Treasury > Void previously approved spend > treasury spend voided events 1`] = `
[
{
"data": {
"index": "(redacted)",
},
"method": "AssetSpendVoided",
"section": "treasury",
},
]
`;
11 changes: 11 additions & 0 deletions packages/polkadot/src/assetHubPolkadot.treasury.e2e.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { assetHubPolkadot, polkadot } from '@e2e-test/networks/chains'
import { baseTreasuryE2ETests, type ParaTestConfig, registerTestTree } from '@e2e-test/shared'

const testConfig: ParaTestConfig = {
testSuiteName: 'Polkadot Asset Hub Treasury',
addressEncoding: 0,
blockProvider: 'NonLocal',
asyncBacking: 'Enabled',
}

registerTestTree(baseTreasuryE2ETests(polkadot, assetHubPolkadot, testConfig))
Loading
Loading