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

Parsing TransactionInstruction Data with New IInstruction Type #3595

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

0xCipherCoder
Copy link

Adds a fromLegacyTransactionInstruction function to convert the legacy shape to the modern one.
This pull request was created for https://app.gib.work/bounties/0a69df5e-4df3-497e-b180-2c5008e6dc18 in an attempt to solve a bounty #3593 . Payment for the bounty is immediately sent to the contributor after merge.

Copy link

changeset-bot bot commented Nov 18, 2024

⚠️ No Changeset found

Latest commit: 5ed6f8d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@mergify mergify bot added the community label Nov 18, 2024
@mergify mergify bot requested a review from a team November 18, 2024 17:40
@0xCipherCoder
Copy link
Author

@steveluscher I tried to run the below command and got the output as attached in the screenshot.

pnpm test:lint && pnpm test:typecheck && pnpm test:prettier

Screenshot 2024-11-21 173200

But there are few errors as well getting triggered -

src/__tests__/instruction-test.ts:1:29 - error TS7016: Could not find a declaration file for module '@solana/instructions'. '/Cipher/OpenSource/solana-web3.js/packages/instructions/dist/index.node.cjs' implicitly has an 'any' type.
  Try `npm i --save-dev @types/solana__instructions` if it exists or add a new declaration (.d.ts) file containing `declare module '@solana/instructions';`

1 import { AccountRole } from '@solana/instructions';
                              ~~~~~~~~~~~~~~~~~~~~~~

Is this expected?

@steveluscher
Copy link
Collaborator

Generally, you have to run those cross workspace. Our cross-workspace task runner is called Turborepo.

pnpm turbo test:lint test:typecheck test:prettier

Running with turbo will ensure that your package is built/tested, but also that all of the packages that it depends on are also built.

@0xCipherCoder
Copy link
Author

Generally, you have to run those cross workspace. Our cross-workspace task runner is called Turborepo.

pnpm turbo test:lint test:typecheck test:prettier

Running with turbo will ensure that your package is built/tested, but also that all of the packages that it depends on are also built.

Thanks! @steveluscher
I tried with this command and initially worked fine with assertion#lint exited. But running again its exiting at different stages due to WSL setup on local. Is there any other way to test it?

@solana/errors#test:lint: command (/Cipher/OpenSource/solana-web3.js/packages/errors) /home/cipher/.nvm/versions/node/v21.7.1/bin/pnpm run test:lint exited (137)

 Tasks:    85 successful, 101 total
Cached:    85 cached, 101 total
  Time:    51.547s 
Failed:    @solana/errors#test:lint

 ERROR  run failed: command  exited (137)

@0xCipherCoder
Copy link
Author

@steveluscher This worked fine with the particular package compact where changes are present. Is this fine?

Screenshot 2024-11-22 051608

Screenshot 2024-11-22 051342

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants