Skip to content

token-swap run test fail #354

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

Open
kuchaguangjie opened this issue Feb 5, 2025 · 1 comment
Open

token-swap run test fail #354

kuchaguangjie opened this issue Feb 5, 2025 · 1 comment

Comments

@kuchaguangjie
Copy link

test for token-swap, on localnet, get error:

  Create AMM
    ✔ Creation (387ms)
    ✔ Invalid fee (71ms)

  Create pool
    1) "before each" hook for "Creation"

  Deposit liquidity
    2) "before each" hook for "Deposit equal amounts"

  Swap
    3) "before each" hook for "Swap from A to B"

  Withdraw liquidity
    4) "before each" hook for "Withdraw everything"


  2 passing (11s)
  4 failing

  1) Create pool
       "before each" hook for "Creation":
     TypeError: Cannot read properties of undefined (reading 'toString')
      at Transaction.sign (node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@solana/web3.js/src/transaction/legacy.ts:671:36)
      at Connection.sendTransaction (node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@solana/web3.js/src/connection.ts:5846:21)
      at processTicksAndRejections (node:internal/process/task_queues:105:5)
      at sendAndConfirmTransaction (node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@solana/web3.js/src/utils/send-and-confirm-transaction.ts:35:21)

  2) Deposit liquidity
       "before each" hook for "Deposit equal amounts":
     TypeError: Cannot read properties of undefined (reading 'toString')
      at Transaction.sign (node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@solana/web3.js/src/transaction/legacy.ts:671:36)
      at Connection.sendTransaction (node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@solana/web3.js/src/connection.ts:5846:21)
      at processTicksAndRejections (node:internal/process/task_queues:105:5)
      at sendAndConfirmTransaction (node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@solana/web3.js/src/utils/send-and-confirm-transaction.ts:35:21)

  3) Swap
       "before each" hook for "Swap from A to B":
     TypeError: Cannot read properties of undefined (reading 'toString')
      at Transaction.sign (node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@solana/web3.js/src/transaction/legacy.ts:671:36)
      at Connection.sendTransaction (node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@solana/web3.js/src/connection.ts:5846:21)
      at processTicksAndRejections (node:internal/process/task_queues:105:5)
      at sendAndConfirmTransaction (node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@solana/web3.js/src/utils/send-and-confirm-transaction.ts:35:21)

  4) Withdraw liquidity
       "before each" hook for "Withdraw everything":
     TypeError: Cannot read properties of undefined (reading 'toString')
      at Transaction.sign (node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@solana/web3.js/src/transaction/legacy.ts:671:36)
      at Connection.sendTransaction (node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@solana/web3.js/src/connection.ts:5846:21)
      at processTicksAndRejections (node:internal/process/task_queues:105:5)
      at sendAndConfirmTransaction (node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@solana/web3.js/src/utils/send-and-confirm-transaction.ts:35:21)

@kuchaguangjie
Copy link
Author

Maybe it's due to anchor version, I saw the project using 0.30.0.

I upgraded to version 0.30.1 for both anchor program & ts client, rebuild, but still the same error.
Can you run that test and pass ?

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

No branches or pull requests

1 participant