-
Notifications
You must be signed in to change notification settings - Fork 75
feat(svm): fill tests with codama and solana kit #922
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(svm): fill tests with codama and solana kit #922
Conversation
Signed-off-by: Pablo Maldonado <pablo@umaproject.org>
| @@ -1,31 +1,49 @@ | |||
| import * as anchor from "@coral-xyz/anchor"; | |||
| import { BN, web3 } from "@coral-xyz/anchor"; | |||
| import { getApproveCheckedInstruction } from "@solana-program/token"; | |||
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.
add this to package.json
test/svm/SvmSpoke.Fill.ts
Outdated
| program: address(program.programId.toString()), | ||
| eventAuthority, | ||
| signer, | ||
| remainingAccounts: fillRemainingAccounts, |
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 is not in FillRelayAsyncInput props
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.
You are right, remaining accounts are passed here:
contracts/test/svm/SvmSpoke.Fill.ts
Lines 726 to 730 in 583d129
| 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.
test/svm/SvmSpoke.Fill.ts
Outdated
| ...(await SvmSpokeClient.getFillRelayInstructionAsync(fillRelayInput)), | ||
| accounts: (await SvmSpokeClient.getFillRelayInstructionAsync(fillRelayInput)).accounts.map((account) => |
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.
would we better have single call to getFillRelayInstructionAsync and store result in a variable rather than call it twice here
…-codama-equivalence-in-fill-tests
Signed-off-by: Pablo Maldonado <pablo@umaproject.org>
Signed-off-by: Pablo Maldonado <pablo@umaproject.org>
Changes proposed in this PR: