Skip to content

Conversation

@dhirajs0
Copy link
Contributor

Added end-to-end tests to cover the main flows of the pallet_bounties module.

Key scenarios covered:

  • Creating a child bounty from a parent bounty
  • Assigning and accepting a child bounty curator
  • Awarding and claiming a child bounty
  • Child bounty closure and payout
  • Handling child bounty rejection or cancellation

closes issue #293

WIP

@github-actions
Copy link
Contributor

The end-to-end tests for the child_bounties pallet are comprehensive, covering both success and failure scenarios. However, there are several instances in the failure test cases where the error being checked is from the bounties pallet instead of the childBounties pallet. This is likely a copy-paste error and should be corrected to ensure the tests are validating the correct error conditions.


Review Suggestions

packages/shared/src/child_bounties.ts:1115, 1561, 1656, 1745, 1862, 1992, 2273, 2430

Multiple tests are checking for errors from the bounties pallet instead of the childBounties pallet. The error checks should be updated to reference the correct pallet to ensure the tests are validating the intended error conditions.

For example, on line 1115, client.api.errors.bounties.Premature should be client.api.errors.childBounties.Premature. This issue is present for InvalidValue, InvalidFee, UnexpectedStatus, PendingPayout, RequireCurator, ReasonTooBig, and InvalidIndex errors in their respective tests.

@dhirajs0
Copy link
Contributor Author

The end-to-end tests for the child_bounties pallet are comprehensive, covering both success and failure scenarios. However, there are several instances in the failure test cases where the error being checked is from the bounties pallet instead of the childBounties pallet. This is likely a copy-paste error and should be corrected to ensure the tests are validating the correct error conditions.

Review Suggestions

packages/shared/src/child_bounties.ts:1115, 1561, 1656, 1745, 1862, 1992, 2273, 2430

Multiple tests are checking for errors from the bounties pallet instead of the childBounties pallet. The error checks should be updated to reference the correct pallet to ensure the tests are validating the intended error conditions.

For example, on line 1115, client.api.errors.bounties.Premature should be client.api.errors.childBounties.Premature. This issue is present for InvalidValue, InvalidFee, UnexpectedStatus, PendingPayout, RequireCurator, ReasonTooBig, and InvalidIndex errors in their respective tests.

You don't have context of the pallet.
Keep you below pallet in context while reviewing.
https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/child-bounties/src/lib.rs

@rockbmb rockbmb merged commit d35064e into open-web3-stack:master Oct 21, 2025
87 checks passed
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