Skip to content

Corwdloan contributions withdrawal test#270

Merged
x3c41a merged 23 commits intomainfrom
corwdloan-contributions-withdrawal
Nov 6, 2025
Merged

Corwdloan contributions withdrawal test#270
x3c41a merged 23 commits intomainfrom
corwdloan-contributions-withdrawal

Conversation

@dhirajs0
Copy link
Copy Markdown
Contributor

@dhirajs0 dhirajs0 commented Oct 30, 2025

It tests the crowdloan contributors can withdraw their funds after it's eligible block post migration.

One more general function test would be to check that the original contributors can unlock their amount. we dont test that currently. We could force-set some far futured blocknumber and the check that everyone can unlock the funds.

I have tested it on post migration snapshot from ci run here, it is working on PAH on my local test.

ahOps pallet handling the crowdloan data Link
It takes close to 1-3 hrs to complete locally as there was 2446 crowdload contributors.

@dhirajs0 dhirajs0 marked this pull request as ready for review October 31, 2025 11:24
@dhirajs0 dhirajs0 requested review from rockbmb and x3c41a October 31, 2025 11:25

// break the loop if countOfWithdrawals is greater than or equal to 100
// as running the entire test might take too long to complete
if(countOfWithdrawals >= MAX_WITHDRAWAL_CALLS)
Copy link
Copy Markdown
Contributor Author

@dhirajs0 dhirajs0 Oct 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

limited it to 100 calls, as it was taking long time to process all the contributions.

}

const ALICE_FUNDING_AMOUNT = 100_000_000_000_000_000n; // initail funing to Alice for transaction fees
const PAST_RC_BLOCK_NUMBER = 28_380_000; // // any past RC block number can be used
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be any past rc block, we update the the withdrawal block with it to make them eligible for withdrawal

@dhirajs0 dhirajs0 mentioned this pull request Oct 31, 2025
Comment thread justfiles/ahm.justfile Outdated
Comment thread migration-tests/crowdloan_contributions/crowdloan_contribution.ts
Comment thread migration-tests/crowdloan_contributions/crowdloan_contribution.ts Outdated
Comment thread migration-tests/crowdloan_contributions/crowdloan_contribution.ts Outdated
Comment thread justfiles/ahm.justfile
Comment thread package.json
Comment thread migration-tests/crowdloan_contributions/crowdloan_contribution.ts
@x3c41a x3c41a merged commit 5fdb311 into main Nov 6, 2025
1 of 2 checks passed
@x3c41a x3c41a deleted the corwdloan-contributions-withdrawal branch November 6, 2025 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants