-
Notifications
You must be signed in to change notification settings - Fork 54
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
fix: script to fill jupiter swap #819
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Reinis Martinsons <[email protected]>
Signed-off-by: Reinis Martinsons <[email protected]>
Signed-off-by: Reinis Martinsons <[email protected]>
Signed-off-by: Reinis Martinsons <[email protected]>
@@ -76,5 +116,33 @@ export async function sendTransactionWithLookupTable( | |||
versionedTx.sign([sender]); | |||
const txSignature = await connection.sendTransaction(versionedTx); | |||
|
|||
return { txSignature, lookupTableAddress }; | |||
// Confirm the versioned transaction | |||
await confirmTransaction(connection, txSignature); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might conflict once #811 is merged in, but seems better to have reusable transaction confirmation helper
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has some overlaps from #811 as we needed better tx confirmation for filling across+
Signed-off-by: Reinis Martinsons <[email protected]>
const svmSpokeIdl = require("../../target/idl/svm_spoke.json"); | ||
const svmSpokeProgram = new Program<SvmSpoke>(svmSpokeIdl, provider); | ||
const handlerIdl = require("../../target/idl/multicall_handler.json"); | ||
const handlerProgram = new Program<MulticallHandler>(handlerIdl, provider); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might want to simplify this once #806 is in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not related to this PR, but linter picked these up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might also consider passing priority fees to loadExecuteRelayerRefundLeafParams
, but that would require some refactor not directly related to this PR
Adds a script to test Across+ fills with Jupiter swap integration on mainnet. Note that all remaining tokens above minimum output amount can be stolen by anyone. This could be improved by either creating a sweeper program that reads actual handler ATA balance and transfers all of them to the recipient ATA or building this functionality in the Multicall handler.
Tested on below mainnet deployments: