Skip to content

Conversation

@enddynayn
Copy link
Collaborator

@enddynayn enddynayn commented Oct 21, 2025

Purpose

We have account holders that need to be able to use proxies for Capacity staking.

Previously, only pallet_capacity::Call::stake could be called using the ProxyType::Staking.

Change summary

  • Added the ability to submit a Proxy.proxy extrinsic that calls RuntimeCall::Capacity(pallet_capacity::Call::claim_staking_reward).
  • e2e test for same

Added the ability to submit a Proxy.proxy extrinsic that calls
RuntimeCall::Capacity(pallet_capacity::Call::claim_staking_reward).

Previously, only pallet_capacity::Call::stake could be called using the ProxyType::Staking.

Currently only staking
@enddynayn enddynayn requested a review from wilwade as a code owner October 21, 2025 18:07
@codecov
Copy link

codecov bot commented Oct 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@shannonwells shannonwells requested review from a team, JoeCap08055, aramikm, claireclark1, mattheworris, saraswatpuneet and shannonwells and removed request for a team and claireclark1 October 22, 2025 19:36
Copy link
Collaborator

@saraswatpuneet saraswatpuneet left a comment

Choose a reason for hiding this comment

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

lgtm

@shannonwells shannonwells enabled auto-merge (squash) October 22, 2025 21:31
@aramikm aramikm removed the request for review from wilwade October 22, 2025 23:26
Copy link
Collaborator

@aramikm aramikm left a comment

Choose a reason for hiding this comment

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

Looks good! Do we need to test with a multisig account also since that was also one of the things they were doing.

@shannonwells shannonwells disabled auto-merge October 22, 2025 23:45
@shannonwells
Copy link
Collaborator

shannonwells commented Oct 23, 2025

@aramikm the multisig account is used to build the proxy address, which performs another proxy call. At the end it just comes in as a proxy call, so it should be fine.

@shannonwells
Copy link
Collaborator

@aramikm your question made me feel paranoid so I wrote a multisig proxy test :)

@shannonwells shannonwells requested a review from aramikm October 23, 2025 04:39
});

it('can boost, claim, and unstake via proxy account', async function () {
const boostAmount = 2n * DOLLARS;
Copy link
Collaborator

Choose a reason for hiding this comment

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

this test was not passing for the reasons I thought. It is now fixed and I added some checks.

);

// assert that bob got the claimed rewards.
const bobNewBalance = await getFreeBalance(bob);
Copy link
Collaborator

Choose a reason for hiding this comment

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

the proxy should not get the claimed rewards; bob, the "real" i.e. staker, should.


it('multisig call as a proxy works for capacity staking ops', async function () {
// Input the addresses that will make up the multisig account.
const alice = await createAndFundKeypair(fundingSource, 2000n * DOLLARS, 'alice');
Copy link
Collaborator

Choose a reason for hiding this comment

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

this could be cleaned up a little, but I wanted to ensure that it worked

);

// Helpers
// the weight for this is pretty high
Copy link
Collaborator

@shannonwells shannonwells Oct 23, 2025

Choose a reason for hiding this comment

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

I pulled the weights from the Frequency txn that failed and bumped them up a bit

@shannonwells shannonwells enabled auto-merge (squash) October 23, 2025 18:22
Copy link
Collaborator

@shannonwells shannonwells left a comment

Choose a reason for hiding this comment

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

Approving since the tests I wrote validate @enddynayn 's fix.

Copy link
Collaborator

@JoeCap08055 JoeCap08055 left a comment

Choose a reason for hiding this comment

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

Love the additional tests!
👍🏻

Copy link
Collaborator Author

@enddynayn enddynayn left a comment

Choose a reason for hiding this comment

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

👍 superb!

@shannonwells shannonwells merged commit bbd2d6b into main Oct 27, 2025
64 of 65 checks passed
@shannonwells shannonwells deleted the feat/add-claiming-stake-to-proxy-staking-filter branch October 27, 2025 16:41
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.

7 participants