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

feat(txs): Add a Priority Fee Cap #145

Merged
merged 2 commits into from
Dec 19, 2024
Merged

Conversation

0xIchigo
Copy link
Contributor

This PR aims to add a priority fee cap for smart transactions. The idea is that the user should be able to cap priority fees at a specific number and use that instead of what is strictly returned by the Priority Fee API. This PR also reworks the send options for smart transactions to make it more intuitive

@@ -546,24 +547,32 @@ export class RpcClient {
* @param {TransactionInstruction[]} instructions - The transaction instructions
* @param {Signer[]} signers - The transaction's signers. The first signer should be the fee payer
* @param {AddressLookupTableAccount[]} lookupTables - The lookup tables to be included in a versioned transaction. Defaults to `[]`
* @param {Signer} feePayer - Optional fee payer separate from the signers
* @param {SerializeConfig} serializeOptions - Options for transaction serialization. This applies only to legacy transactions. Defaults to `{ requireAllSignatures = true, verifySignatures: true }`
* @param {SmartTransactionOptions} options - Options for customizing the transaction, including an optional fee payer separate from the signers, a
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: You don't need to define all options, instead you can JSDoc the options themselves

@@ -370,4 +373,11 @@ export type PollTransactionOptions = {
timeout?: number;
// In milliseconds
interval?: number;
}

export interface SmartTransactionOptions extends SendOptions {
Copy link
Contributor

Choose a reason for hiding this comment

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

Add jsdoc here

@0xIchigo 0xIchigo merged commit eb8e8a6 into main Dec 19, 2024
@0xIchigo 0xIchigo mentioned this pull request Jan 6, 2025
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