coral-xyz / anchor

⚓ Solana Sealevel Framework
https://anchor-lang.com
Apache License 2.0
3.58k stars 1.32k forks source link

examples: Remove unnecessary @project-serum packages #137

Open armaniferrante opened 3 years ago

armaniferrante commented 3 years ago

The fix here https://github.com/project-serum/anchor/commit/6576e0d7ff321801c8b5819ffd1bbda76e1e0148 exposed the fact that some of the project-serum packages are using old versions of web3.js that are incompatible with the latest version that anchor uses. These packages, e.g., @project-serum/serum and @project-serum/common should be removed from the examples and replaced with packages like @solana/spl-token, since they're only used for utility methods.

migui3230 commented 2 years ago

Ill take this one on!

armaniferrante commented 2 years ago

Ill take this one on!

You got it!

migui3230 commented 2 years ago

@armaniferrante is it only for this examples/spl/token-proxy/tests/token-proxy.js file? I'm seeing that the @project-serum/serum package and @project-serum/common package is being used in multiple other files. For example tests/cfo/deps/serum-dex/dex/tests/permissioned/tests/permissioned-markets.js and tests/swap/deps/serum-dex/dex/tests/permissioned/tests/utils/market-maker.js

armaniferrante commented 2 years ago

Let's remove all instances of @project-seurm/common. For @project-serum/serum, we should only remove it if it's using non idiomatic APIs, for example, getting the token program id or something of that nature.

migui3230 commented 2 years ago

Let's remove all instances of @project-seurm/common. For @project-serum/serum, we should only remove it if it's using non idiomatic APIs, for example, getting the token program id or something of that nature.

Ok so should I be changing the tests that use @project-serum/common and use @solana/spl-token instead or should I be getting rid of those tests entirely?

armaniferrante commented 2 years ago

Ok so should I be changing the tests that use @project-serum/common and use @solana/spl-token instead or should I be getting rid of those tests entirely?

Let's keep the tests but change the import to use @solana/spl-token.

migui3230 commented 2 years ago

1708