Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Staking Builder for Tao #5510

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft

Adding Staking Builder for Tao #5510

wants to merge 8 commits into from

Conversation

abhijit0943
Copy link

No description provided.

@abhijit0943 abhijit0943 deleted the abhijit branch February 10, 2025 17:58
@abhijit0943 abhijit0943 restored the abhijit branch February 10, 2025 18:23
@abhijit0943 abhijit0943 reopened this Feb 10, 2025
@abhijit0943 abhijit0943 force-pushed the abhijit branch 7 times, most recently from b4ed320 to 134d9a7 Compare February 11, 2025 10:54
should.deepEqual(txJson.tip, 0);
should.deepEqual(txJson.transactionVersion, 22);
should.deepEqual(txJson.chainName, 'Westend');
should.deepEqual(txJson.eraPeriod, 64);
Copy link
Contributor

Choose a reason for hiding this comment

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

one interesting thing to check could be if it is able to re-build the transaction to the same transaction bytes - i think that this is something that happens during our internal transaction signing flow. could add something like this to the test:

const rawTx = tx.toBroadcastFormat();
const rebuilder = factory.from(rawTx);
rebuilder.sender({ ... }).validity({ ... }); // not sure if this part is needed
const rebuiltTx = await rebuilder.build();
assert(rebuiltTx.toBroadcastFormat() === rawTx);

Comment on lines +44 to +53
if (this._addToStake) {
tx = methods.staking.bondExtra({ maxAdditional: this._amount }, baseTxInfo.baseTxInfo, baseTxInfo.options);
} else {
tx = methods.staking.bond(
{ controller: this._controller, value: this._amount, payee: this._payee },
baseTxInfo.baseTxInfo,
baseTxInfo.options
);
}
if (this._validityWindow && (tx as any).signature && baseTxInfo.options.registry) {
Copy link
Contributor

Choose a reason for hiding this comment

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

isn't this the DOT specific methods?

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.

3 participants