Skip to content

Conversation

@md0x
Copy link
Contributor

@md0x md0x commented Mar 14, 2025

Changes proposed in this PR:

  • Add simple happy path Fill tests with Codama and solana kit

Signed-off-by: Pablo Maldonado <pablo@umaproject.org>
@linear
Copy link

linear bot commented Mar 14, 2025

@md0x md0x marked this pull request as ready for review March 14, 2025 17:00
@@ -1,31 +1,49 @@
import * as anchor from "@coral-xyz/anchor";
import { BN, web3 } from "@coral-xyz/anchor";
import { getApproveCheckedInstruction } from "@solana-program/token";
Copy link
Contributor

Choose a reason for hiding this comment

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

add this to package.json

program: address(program.programId.toString()),
eventAuthority,
signer,
remainingAccounts: fillRemainingAccounts,
Copy link
Contributor

Choose a reason for hiding this comment

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

this is not in FillRelayAsyncInput props

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right, remaining accounts are passed here:

const remainingAccounts: IAccountMeta<string>[] = fillRemainingAccounts.map((account) => ({
address: address(account.pubkey.toString()),
role: AccountRole.WRITABLE,
}));
(fillRelayIx.accounts as IAccountMeta<string>[]).push(...remainingAccounts);

And I forgot to remove it from this obj.

Comment on lines 722 to 723
...(await SvmSpokeClient.getFillRelayInstructionAsync(fillRelayInput)),
accounts: (await SvmSpokeClient.getFillRelayInstructionAsync(fillRelayInput)).accounts.map((account) =>
Copy link
Contributor

Choose a reason for hiding this comment

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

would we better have single call to getFillRelayInstructionAsync and store result in a variable rather than call it twice here

md0x added 3 commits March 25, 2025 10:15
Signed-off-by: Pablo Maldonado <pablo@umaproject.org>
Signed-off-by: Pablo Maldonado <pablo@umaproject.org>
@md0x md0x merged commit 9fa19fd into master Apr 14, 2025
9 checks passed
@md0x md0x deleted the pablo/acx-3906-validate-solana-web3-v2-kit-codama-equivalence-in-fill-tests branch April 14, 2025 07:25
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