Browse Source

Switch to using @coral-xyz/anchor packages (#2318)

Henry-E 2 years ago
parent
commit
4bef8c40ef
100 changed files with 232 additions and 231 deletions
  1. 2 2
      .github/actions/setup-ts/action.yaml
  2. 1 1
      .github/workflows/no-cashing-tests.yaml
  3. 1 1
      .github/workflows/tests.yaml
  4. 3 2
      CHANGELOG.md
  5. 9 9
      README.md
  6. 1 1
      cli/npm-package/package.json
  7. 15 15
      cli/src/template.rs
  8. 1 1
      docs/src/pages/docs/cli.md
  9. 4 4
      docs/src/pages/docs/cross-program-invocations.md
  10. 1 1
      docs/src/pages/docs/installation.md
  11. 4 4
      docs/src/pages/docs/pdas.md
  12. 1 1
      examples/tutorial/basic-0/client.js
  13. 1 1
      examples/tutorial/basic-0/tests/basic-0.js
  14. 1 1
      examples/tutorial/basic-1/tests/basic-1.js
  15. 1 1
      examples/tutorial/basic-2/tests/basic-2.js
  16. 1 1
      examples/tutorial/basic-3/tests/basic-3.js
  17. 1 1
      examples/tutorial/basic-4/tests/basic-4.js
  18. 1 1
      examples/tutorial/package.json
  19. 23 23
      examples/tutorial/yarn.lock
  20. 2 2
      tests/anchor-cli-account/tests/account.ts
  21. 1 1
      tests/anchor-cli-idl/migrations/deploy.ts
  22. 2 2
      tests/anchor-cli-idl/tests/idl.ts
  23. 1 1
      tests/bpf-upgradeable-state/migrations/deploy.ts
  24. 3 3
      tests/bpf-upgradeable-state/tests/bpf-upgradable-state.ts
  25. 1 1
      tests/cashiers-check/migrations/deploy.js
  26. 1 1
      tests/cashiers-check/tests/cashiers-check.js
  27. 1 1
      tests/cfo/migrations/deploy.js
  28. 1 1
      tests/cfo/scripts/fees.js
  29. 1 1
      tests/cfo/scripts/list-market.js
  30. 1 1
      tests/cfo/scripts/trade-bot.js
  31. 1 1
      tests/cfo/tests/cfo.js
  32. 2 2
      tests/cfo/tests/utils/index.js
  33. 1 1
      tests/cfo/tests/utils/stake.js
  34. 1 1
      tests/chat/migrations/deploy.js
  35. 1 1
      tests/chat/tests/chat.js
  36. 1 1
      tests/composite/tests/composite.js
  37. 1 1
      tests/cpi-returns/migrations/deploy.ts
  38. 2 2
      tests/cpi-returns/tests/cpi-return.ts
  39. 1 1
      tests/custom-coder/migrations/deploy.ts
  40. 3 3
      tests/custom-coder/tests/spl-associated-token-coder.ts
  41. 2 2
      tests/custom-coder/tests/spl-token-coder.ts
  42. 2 2
      tests/custom-coder/tests/system-coder.ts
  43. 2 2
      tests/declare-id/tests/declare-id.ts
  44. 2 2
      tests/errors/tests/errors.ts
  45. 2 2
      tests/escrow/tests/escrow.ts
  46. 1 1
      tests/events/migrations/deploy.js
  47. 1 1
      tests/events/tests/events.js
  48. 1 1
      tests/floats/migrations/deploy.ts
  49. 2 2
      tests/floats/tests/floats.ts
  50. 1 1
      tests/ido-pool/migrations/deploy.js
  51. 2 2
      tests/ido-pool/tests/ido-pool.js
  52. 1 1
      tests/ido-pool/tests/utils/index.js
  53. 1 1
      tests/interface/tests/interface.js
  54. 1 1
      tests/lockup/migrations/deploy.js
  55. 1 1
      tests/lockup/tests/lockup.js
  56. 1 1
      tests/lockup/tests/utils.js
  57. 1 1
      tests/misc/migrations/deploy.js
  58. 2 2
      tests/misc/miscNonRentExempt.ts
  59. 2 2
      tests/misc/tests/idl_doc/idl_doc.ts
  60. 2 2
      tests/misc/tests/init-if-needed/init-if-needed.ts
  61. 2 2
      tests/misc/tests/misc/misc.ts
  62. 3 3
      tests/multiple-suites-run-single/package.json
  63. 2 2
      tests/multiple-suites-run-single/tests/should-run/shouldRun.ts
  64. 1 1
      tests/multiple-suites/migrations/deploy.ts
  65. 2 2
      tests/multiple-suites/tests/another-suite/another-suite.ts
  66. 2 2
      tests/multiple-suites/tests/fourth-and-fifth-suite/fifth-suite/fifthSuite.ts
  67. 2 2
      tests/multiple-suites/tests/fourth-and-fifth-suite/forth-suite/forth-suite.ts
  68. 2 2
      tests/multiple-suites/tests/multiple-suites/multiple-suites.ts
  69. 2 2
      tests/multiple-suites/tests/third-suite/sub-dir-one/subDirOne.ts
  70. 2 2
      tests/multiple-suites/tests/third-suite/sub-dir-two/subDirTwo.ts
  71. 1 1
      tests/multisig/migrations/deploy.js
  72. 1 1
      tests/multisig/tests/multisig.js
  73. 2 2
      tests/optional/tests/optional.ts
  74. 4 4
      tests/package.json
  75. 1 1
      tests/pda-derivation/migrations/deploy.ts
  76. 3 3
      tests/pda-derivation/tests/typescript.spec.ts
  77. 1 1
      tests/pyth/tests/oracleUtils.ts
  78. 2 2
      tests/pyth/tests/pyth.spec.ts
  79. 3 3
      tests/realloc/package.json
  80. 2 2
      tests/realloc/tests/realloc.ts
  81. 1 1
      tests/relations-derivation/migrations/deploy.ts
  82. 2 2
      tests/relations-derivation/tests/typescript.spec.ts
  83. 1 1
      tests/spl/token-proxy/tests/token-proxy.js
  84. 1 1
      tests/swap/migrations/deploy.js
  85. 1 1
      tests/swap/tests/swap.js
  86. 2 2
      tests/swap/tests/utils/index.js
  87. 1 1
      tests/system-accounts/tests/system-accounts.js
  88. 1 1
      tests/sysvars/tests/sysvars.js
  89. 1 1
      tests/tictactoe/migrations/deploy.js
  90. 1 1
      tests/tictactoe/tests/tictactoe.js
  91. 1 1
      tests/typescript/migrations/deploy.ts
  92. 1 1
      tests/typescript/tests/typescript.spec.ts
  93. 2 2
      tests/validator-clone/tests/validator-clone.ts
  94. 36 36
      tests/yarn.lock
  95. 1 1
      tests/zero-copy/migrations/deploy.js
  96. 1 1
      tests/zero-copy/tests/zero-copy.js
  97. 1 1
      ts/package.json
  98. 3 3
      ts/packages/anchor/README.md
  99. 1 1
      ts/packages/anchor/package.json
  100. 2 2
      ts/packages/spl-associated-token-account/package.json

+ 2 - 2
.github/actions/setup-ts/action.yaml

@@ -28,7 +28,7 @@ runs:
       shell: bash
       shell: bash
     - run: cd ts/packages/spl-token && yarn --frozen-lockfile && yarn build:node && yarn link && cd ../../../
     - run: cd ts/packages/spl-token && yarn --frozen-lockfile && yarn build:node && yarn link && cd ../../../
       shell: bash
       shell: bash
-    - run: cd examples/tutorial && yarn link @project-serum/anchor && yarn --frozen-lockfile && cd ../../
+    - run: cd examples/tutorial && yarn link @coral-xyz/anchor && yarn --frozen-lockfile && cd ../../
       shell: bash
       shell: bash
-    - run: cd tests && yarn link @project-serum/anchor && yarn link @project-serum/spl-associated-token-account && yarn link @project-serum/spl-token && yarn --frozen-lockfile && cd ..
+    - run: cd tests && yarn link @coral-xyz/anchor && yarn link @coral-xyz/spl-associated-token-account && yarn link @coral-xyz/spl-token && yarn --frozen-lockfile && cd ..
       shell: bash
       shell: bash

+ 1 - 1
.github/workflows/no-cashing-tests.yaml

@@ -229,7 +229,7 @@ jobs:
           path: ~/.cargo/bin/
           path: ~/.cargo/bin/
       - run: chmod +x ~/.cargo/bin/anchor
       - run: chmod +x ~/.cargo/bin/anchor
 
 
-      - run: cd "$(mktemp -d)" && anchor init hello-anchor && cd hello-anchor && yarn link @project-serum/anchor && yarn && anchor test && yarn lint:fix
+      - run: cd "$(mktemp -d)" && anchor init hello-anchor && cd hello-anchor && yarn link @coral-xyz/anchor && yarn && anchor test && yarn lint:fix
       - uses: ./.github/actions/git-diff/
       - uses: ./.github/actions/git-diff/
 
 
   test-programs:
   test-programs:

+ 1 - 1
.github/workflows/tests.yaml

@@ -339,7 +339,7 @@ jobs:
           path: ~/.cargo/bin/
           path: ~/.cargo/bin/
       - run: chmod +x ~/.cargo/bin/anchor
       - run: chmod +x ~/.cargo/bin/anchor
 
 
-      - run: cd "$(mktemp -d)" && anchor init hello-anchor && cd hello-anchor && yarn link @project-serum/anchor && yarn && anchor test && yarn lint:fix
+      - run: cd "$(mktemp -d)" && anchor init hello-anchor && cd hello-anchor && yarn link @coral-xyz/anchor && yarn && anchor test && yarn lint:fix
       - uses: ./.github/actions/git-diff/
       - uses: ./.github/actions/git-diff/
 
 
   test-programs:
   test-programs:

+ 3 - 2
CHANGELOG.md

@@ -14,7 +14,7 @@ The minor version will be incremented upon a breaking change and the patch versi
 
 
 ### Features
 ### Features
 
 
-- cli: Add `--run` to `anchor test` for running a subset of test suites ([#1828](https://github.com/project-serum/anchor/issues/1828)).
+- cli: Add `--run` to `anchor test` for running a subset of test suites ([#1828](https://github.com/coral-xyz/anchor/issues/1828)).
 - client: Add `transaction` functions to RequestBuilder ([#1958](https://github.com/coral-xyz/anchor/pull/1958)).
 - client: Add `transaction` functions to RequestBuilder ([#1958](https://github.com/coral-xyz/anchor/pull/1958)).
 - spl: Add `create_metadata_accounts_v3` and `set_collection_size` wrappers ([#2119](https://github.com/coral-xyz/anchor/pull/2119)).
 - spl: Add `create_metadata_accounts_v3` and `set_collection_size` wrappers ([#2119](https://github.com/coral-xyz/anchor/pull/2119)).
 - spl: Add `MetadataAccount` account deserialization. ([#2014](https://github.com/coral-xyz/anchor/pull/2014)).
 - spl: Add `MetadataAccount` account deserialization. ([#2014](https://github.com/coral-xyz/anchor/pull/2014)).
@@ -38,7 +38,7 @@ The minor version will be incremented upon a breaking change and the patch versi
 - cli: Allow custom cluster config ([#2271](https://github.com/coral-xyz/anchor/pull/2271)).
 - cli: Allow custom cluster config ([#2271](https://github.com/coral-xyz/anchor/pull/2271)).
 - ts: Add optional flag to parseLogs to throw an error on decoding failure ([#2043](https://github.com/coral-xyz/anchor/pull/2043)).
 - ts: Add optional flag to parseLogs to throw an error on decoding failure ([#2043](https://github.com/coral-xyz/anchor/pull/2043)).
 - cli: Add `test.validator.geyser_plugin_config` support ([#2016](https://github.com/coral-xyz/anchor/pull/2016)).
 - cli: Add `test.validator.geyser_plugin_config` support ([#2016](https://github.com/coral-xyz/anchor/pull/2016)).
-- cli: Add `account` subcommand to cli ([#1923](https://github.com/project-serum/anchor/pull/1923))
+- cli: Add `account` subcommand to cli ([#1923](https://github.com/coral-xyz/anchor/pull/1923))
 - cli: Add `ticks_per_slot` option to Validator args ([#1875](https://github.com/coral-xyz/anchor/pull/1875)).
 - cli: Add `ticks_per_slot` option to Validator args ([#1875](https://github.com/coral-xyz/anchor/pull/1875)).
 
 
 ### Fixes
 ### Fixes
@@ -61,6 +61,7 @@ The minor version will be incremented upon a breaking change and the patch versi
 - lang: Add `Discriminator` and `Owner` trait implementation for structures representing instructions ([#1997](https://github.com/coral-xyz/anchor/pull/1997)).
 - lang: Add `Discriminator` and `Owner` trait implementation for structures representing instructions ([#1997](https://github.com/coral-xyz/anchor/pull/1997)).
 - ts: '@coral-xyz/borsh' package is now part of the yarn monorepo ([#2290](https://github.com/coral-xyz/anchor/pull/2290)). The borsh package needs to be built before the anchor package can be built but this should happen automatically when running `yarn build` in packages/anchor, see [#2299](https://github.com/coral-xyz/anchor/pull/2299) and [#2306](https://github.com/coral-xyz/anchor/pull/2306).
 - ts: '@coral-xyz/borsh' package is now part of the yarn monorepo ([#2290](https://github.com/coral-xyz/anchor/pull/2290)). The borsh package needs to be built before the anchor package can be built but this should happen automatically when running `yarn build` in packages/anchor, see [#2299](https://github.com/coral-xyz/anchor/pull/2299) and [#2306](https://github.com/coral-xyz/anchor/pull/2306).
 - lang: Add support for optionally passing in accounts using the syntax `Optional<Account<'info, T>>`. Shouldn't affect existing programs but may be a breaking change to tools that use the anchor generated IDL. [#2101](https://github.com/coral-xyz/anchor/pull/2101).
 - lang: Add support for optionally passing in accounts using the syntax `Optional<Account<'info, T>>`. Shouldn't affect existing programs but may be a breaking change to tools that use the anchor generated IDL. [#2101](https://github.com/coral-xyz/anchor/pull/2101).
+- ts: Switch from `@project-serum/anchor` to the `@coral-xyz/anchor` package [#2318](https://github.com/coral-xyz/anchor/pull/2318).
 
 
 ## [0.25.0] - 2022-07-05
 ## [0.25.0] - 2022-07-05
 
 

+ 9 - 9
README.md

@@ -31,18 +31,18 @@ To jump straight to examples, go [here](https://github.com/coral-xyz/anchor/tree
 
 
 ## Packages
 ## Packages
 
 
-| Package                     | Description                                              | Version                                                                                                                                  | Docs                                                                                                            |
-| :-------------------------- | :------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------- |
-| `anchor-lang`               | Rust primitives for writing programs on Solana           | [![Crates.io](https://img.shields.io/crates/v/anchor-lang?color=blue)](https://crates.io/crates/anchor-lang)                             | [![Docs.rs](https://docs.rs/anchor-lang/badge.svg)](https://docs.rs/anchor-lang)                                |
-| `anchor-spl`                | CPI clients for SPL programs on Solana                   | ![crates](https://img.shields.io/crates/v/anchor-spl?color=blue)                                                                         | [![Docs.rs](https://docs.rs/anchor-spl/badge.svg)](https://docs.rs/anchor-spl)                                  |
-| `anchor-client`             | Rust client for Anchor programs                          | ![crates](https://img.shields.io/crates/v/anchor-client?color=blue)                                                                      | [![Docs.rs](https://docs.rs/anchor-client/badge.svg)](https://docs.rs/anchor-client)                            |
-| `@project-serum/anchor`     | TypeScript client for Anchor programs                    | [![npm](https://img.shields.io/npm/v/@project-serum/anchor.svg?color=blue)](https://www.npmjs.com/package/@project-serum/anchor)         | [![Docs](https://img.shields.io/badge/docs-typedoc-blue)](https://coral-xyz.github.io/anchor/ts/index.html)     |
-| `@project-serum/anchor-cli` | CLI to support building and managing an Anchor workspace | [![npm](https://img.shields.io/npm/v/@project-serum/anchor-cli.svg?color=blue)](https://www.npmjs.com/package/@project-serum/anchor-cli) | [![Docs](https://img.shields.io/badge/docs-typedoc-blue)](https://coral-xyz.github.io/anchor/cli/commands.html) |
+| Package                 | Description                                              | Version                                                                                                                          | Docs                                                                                                            |
+| :---------------------- | :------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------- |
+| `anchor-lang`           | Rust primitives for writing programs on Solana           | [![Crates.io](https://img.shields.io/crates/v/anchor-lang?color=blue)](https://crates.io/crates/anchor-lang)                     | [![Docs.rs](https://docs.rs/anchor-lang/badge.svg)](https://docs.rs/anchor-lang)                                |
+| `anchor-spl`            | CPI clients for SPL programs on Solana                   | ![crates](https://img.shields.io/crates/v/anchor-spl?color=blue)                                                                 | [![Docs.rs](https://docs.rs/anchor-spl/badge.svg)](https://docs.rs/anchor-spl)                                  |
+| `anchor-client`         | Rust client for Anchor programs                          | ![crates](https://img.shields.io/crates/v/anchor-client?color=blue)                                                              | [![Docs.rs](https://docs.rs/anchor-client/badge.svg)](https://docs.rs/anchor-client)                            |
+| `@coral-xyz/anchor`     | TypeScript client for Anchor programs                    | [![npm](https://img.shields.io/npm/v/@coral-xyz/anchor.svg?color=blue)](https://www.npmjs.com/package/@coral-xyz/anchor)         | [![Docs](https://img.shields.io/badge/docs-typedoc-blue)](https://coral-xyz.github.io/anchor/ts/index.html)     |
+| `@coral-xyz/anchor-cli` | CLI to support building and managing an Anchor workspace | [![npm](https://img.shields.io/npm/v/@coral-xyz/anchor-cli.svg?color=blue)](https://www.npmjs.com/package/@coral-xyz/anchor-cli) | [![Docs](https://img.shields.io/badge/docs-typedoc-blue)](https://coral-xyz.github.io/anchor/cli/commands.html) |
 
 
 ## Note
 ## Note
 
 
-* **Anchor is in active development, so all APIs are subject to change.**
-* **This code is unaudited. Use at your own risk.**
+- **Anchor is in active development, so all APIs are subject to change.**
+- **This code is unaudited. Use at your own risk.**
 
 
 ## Examples
 ## Examples
 
 

+ 1 - 1
cli/npm-package/package.json

@@ -1,5 +1,5 @@
 {
 {
-  "name": "@project-serum/anchor-cli",
+  "name": "@coral-xyz/anchor-cli",
   "version": "0.26.0",
   "version": "0.26.0",
   "description": "Anchor CLI tool",
   "description": "Anchor CLI tool",
   "homepage": "https://github.com/coral-xyz/anchor#readme",
   "homepage": "https://github.com/coral-xyz/anchor#readme",

+ 15 - 15
cli/src/template.rs

@@ -87,7 +87,7 @@ anchor-lang = "{2}"
 pub fn deploy_js_script_host(cluster_url: &str, script_path: &str) -> String {
 pub fn deploy_js_script_host(cluster_url: &str, script_path: &str) -> String {
     format!(
     format!(
         r#"
         r#"
-const anchor = require('@project-serum/anchor');
+const anchor = require('@coral-xyz/anchor');
 
 
 // Deploy script defined by the user.
 // Deploy script defined by the user.
 const userScript = require("{0}");
 const userScript = require("{0}");
@@ -114,7 +114,7 @@ main();
 
 
 pub fn deploy_ts_script_host(cluster_url: &str, script_path: &str) -> String {
 pub fn deploy_ts_script_host(cluster_url: &str, script_path: &str) -> String {
     format!(
     format!(
-        r#"import * as anchor from '@project-serum/anchor';
+        r#"import * as anchor from '@coral-xyz/anchor';
 
 
 // Deploy script defined by the user.
 // Deploy script defined by the user.
 const userScript = require("{0}");
 const userScript = require("{0}");
@@ -144,7 +144,7 @@ pub fn deploy_script() -> &'static str {
 // single deploy script that's invoked from the CLI, injecting a provider
 // single deploy script that's invoked from the CLI, injecting a provider
 // configured from the workspace's Anchor.toml.
 // configured from the workspace's Anchor.toml.
 
 
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 
 
 module.exports = async function (provider) {
 module.exports = async function (provider) {
   // Configure client to use the provider.
   // Configure client to use the provider.
@@ -160,7 +160,7 @@ pub fn ts_deploy_script() -> &'static str {
 // single deploy script that's invoked from the CLI, injecting a provider
 // single deploy script that's invoked from the CLI, injecting a provider
 // configured from the workspace's Anchor.toml.
 // configured from the workspace's Anchor.toml.
 
 
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 
 
 module.exports = async function (provider) {
 module.exports = async function (provider) {
   // Configure client to use the provider.
   // Configure client to use the provider.
@@ -202,7 +202,7 @@ pub struct Initialize {{}}
 
 
 pub fn mocha(name: &str) -> String {
 pub fn mocha(name: &str) -> String {
     format!(
     format!(
-        r#"const anchor = require("@project-serum/anchor");
+        r#"const anchor = require("@coral-xyz/anchor");
 
 
 describe("{}", () => {{
 describe("{}", () => {{
   // Configure the client to use the local cluster.
   // Configure the client to use the local cluster.
@@ -223,7 +223,7 @@ describe("{}", () => {{
 
 
 pub fn jest(name: &str) -> String {
 pub fn jest(name: &str) -> String {
     format!(
     format!(
-        r#"const anchor = require("@project-serum/anchor");
+        r#"const anchor = require("@coral-xyz/anchor");
 
 
 describe("{}", () => {{
 describe("{}", () => {{
   // Configure the client to use the local cluster.
   // Configure the client to use the local cluster.
@@ -251,7 +251,7 @@ pub fn package_json(jest: bool) -> String {
             "lint": "prettier */*.js \"*/**/*{{.js,.ts}}\" --check"
             "lint": "prettier */*.js \"*/**/*{{.js,.ts}}\" --check"
         }},
         }},
         "dependencies": {{
         "dependencies": {{
-            "@project-serum/anchor": "^{0}"
+            "@coral-xyz/anchor": "^{0}"
         }},
         }},
         "devDependencies": {{
         "devDependencies": {{
             "jest": "^29.0.3",
             "jest": "^29.0.3",
@@ -269,7 +269,7 @@ pub fn package_json(jest: bool) -> String {
         "lint": "prettier */*.js \"*/**/*{{.js,.ts}}\" --check"
         "lint": "prettier */*.js \"*/**/*{{.js,.ts}}\" --check"
     }},
     }},
     "dependencies": {{
     "dependencies": {{
-        "@project-serum/anchor": "^{0}"
+        "@coral-xyz/anchor": "^{0}"
     }},
     }},
     "devDependencies": {{
     "devDependencies": {{
         "chai": "^4.3.4",
         "chai": "^4.3.4",
@@ -292,7 +292,7 @@ pub fn ts_package_json(jest: bool) -> String {
             "lint": "prettier */*.js \"*/**/*{{.js,.ts}}\" --check"
             "lint": "prettier */*.js \"*/**/*{{.js,.ts}}\" --check"
         }},
         }},
         "dependencies": {{
         "dependencies": {{
-            "@project-serum/anchor": "^{0}"
+            "@coral-xyz/anchor": "^{0}"
         }},
         }},
         "devDependencies": {{
         "devDependencies": {{
             "@types/bn.js": "^5.1.0",
             "@types/bn.js": "^5.1.0",
@@ -314,7 +314,7 @@ pub fn ts_package_json(jest: bool) -> String {
         "lint": "prettier */*.js \"*/**/*{{.js,.ts}}\" --check"
         "lint": "prettier */*.js \"*/**/*{{.js,.ts}}\" --check"
     }},
     }},
     "dependencies": {{
     "dependencies": {{
-        "@project-serum/anchor": "^{0}"
+        "@coral-xyz/anchor": "^{0}"
     }},
     }},
     "devDependencies": {{
     "devDependencies": {{
         "chai": "^4.3.4",
         "chai": "^4.3.4",
@@ -335,8 +335,8 @@ pub fn ts_package_json(jest: bool) -> String {
 
 
 pub fn ts_mocha(name: &str) -> String {
 pub fn ts_mocha(name: &str) -> String {
     format!(
     format!(
-        r#"import * as anchor from "@project-serum/anchor";
-import {{ Program }} from "@project-serum/anchor";
+        r#"import * as anchor from "@coral-xyz/anchor";
+import {{ Program }} from "@coral-xyz/anchor";
 import {{ {} }} from "../target/types/{}";
 import {{ {} }} from "../target/types/{}";
 
 
 describe("{}", () => {{
 describe("{}", () => {{
@@ -362,8 +362,8 @@ describe("{}", () => {{
 
 
 pub fn ts_jest(name: &str) -> String {
 pub fn ts_jest(name: &str) -> String {
     format!(
     format!(
-        r#"import * as anchor from "@project-serum/anchor";
-import {{ Program }} from "@project-serum/anchor";
+        r#"import * as anchor from "@coral-xyz/anchor";
+import {{ Program }} from "@coral-xyz/anchor";
 import {{ {} }} from "../target/types/{}";
 import {{ {} }} from "../target/types/{}";
 
 
 describe("{}", () => {{
 describe("{}", () => {{
@@ -445,7 +445,7 @@ pub fn node_shell(
 ) -> Result<String> {
 ) -> Result<String> {
     let mut eval_string = format!(
     let mut eval_string = format!(
         r#"
         r#"
-const anchor = require('@project-serum/anchor');
+const anchor = require('@coral-xyz/anchor');
 const web3 = anchor.web3;
 const web3 = anchor.web3;
 const PublicKey = anchor.web3.PublicKey;
 const PublicKey = anchor.web3.PublicKey;
 const Keypair = anchor.web3.Keypair;
 const Keypair = anchor.web3.Keypair;

+ 1 - 1
docs/src/pages/docs/cli.md

@@ -209,7 +209,7 @@ from the workspace's `Anchor.toml`. For example,
 ```javascript
 ```javascript
 // File: migrations/deploys.js
 // File: migrations/deploys.js
 
 
-const anchor = require('@project-serum/anchor')
+const anchor = require('@coral-xyz/anchor')
 
 
 module.exports = async function (provider) {
 module.exports = async function (provider) {
   anchor.setProvider(provider)
   anchor.setProvider(provider)

+ 4 - 4
docs/src/pages/docs/cross-program-invocations.md

@@ -147,8 +147,8 @@ impl<'info> PullStrings<'info> {
 We can verify that everything works as expected by replacing the contents of the `puppet.ts` file with:
 We can verify that everything works as expected by replacing the contents of the `puppet.ts` file with:
 
 
 ```ts
 ```ts
-import * as anchor from '@project-serum/anchor'
-import { Program } from '@project-serum/anchor'
+import * as anchor from '@coral-xyz/anchor'
+import { Program } from '@coral-xyz/anchor'
 import { Keypair } from '@solana/web3.js'
 import { Keypair } from '@solana/web3.js'
 import { expect } from 'chai'
 import { expect } from 'chai'
 import { Puppet } from '../target/types/puppet'
 import { Puppet } from '../target/types/puppet'
@@ -286,8 +286,8 @@ impl<'info> PullStrings<'info> {
 Finally, change the test:
 Finally, change the test:
 
 
 ```ts
 ```ts
-import * as anchor from '@project-serum/anchor'
-import { Program } from '@project-serum/anchor'
+import * as anchor from '@coral-xyz/anchor'
+import { Program } from '@coral-xyz/anchor'
 import { Keypair } from '@solana/web3.js'
 import { Keypair } from '@solana/web3.js'
 import { Puppet } from '../target/types/puppet'
 import { Puppet } from '../target/types/puppet'
 import { PuppetMaster } from '../target/types/puppet_master'
 import { PuppetMaster } from '../target/types/puppet_master'

+ 1 - 1
docs/src/pages/docs/installation.md

@@ -56,7 +56,7 @@ anchor --version
 
 
 ### Install using pre-build binary on x86_64 Linux
 ### Install using pre-build binary on x86_64 Linux
 
 
-Anchor binaries are available via an NPM package [`@project-serum/anchor-cli`](https://www.npmjs.com/package/@project-serum/anchor-cli). Only `x86_64` Linux is supported currently, you must build from source for other OS'.
+Anchor binaries are available via an NPM package [`@coral-xyz/anchor-cli`](https://www.npmjs.com/package/@coral-xyz/anchor-cli). Only `x86_64` Linux is supported currently, you must build from source for other OS'.
 
 
 ### Build from source for other operating systems without avm
 ### Build from source for other operating systems without avm
 
 

+ 4 - 4
docs/src/pages/docs/pdas.md

@@ -190,8 +190,8 @@ pub fn change_user_name(ctx: Context<ChangeUserName>, new_name: String) -> Resul
 Finally, let's add a test. Copy this into `game.ts`
 Finally, let's add a test. Copy this into `game.ts`
 
 
 ```ts
 ```ts
-import * as anchor from '@project-serum/anchor'
-import { Program } from '@project-serum/anchor'
+import * as anchor from '@coral-xyz/anchor'
+import { Program } from '@coral-xyz/anchor'
 import { PublicKey } from '@solana/web3.js'
 import { PublicKey } from '@solana/web3.js'
 import { Game } from '../target/types/game'
 import { Game } from '../target/types/game'
 import { expect } from 'chai'
 import { expect } from 'chai'
@@ -306,8 +306,8 @@ The `authority` account is now an `UncheckedAccount` instead of a `Signer`. When
 Finally, this is the new `puppet.ts`:
 Finally, this is the new `puppet.ts`:
 
 
 ```ts
 ```ts
-import * as anchor from '@project-serum/anchor'
-import { Program } from '@project-serum/anchor'
+import * as anchor from '@coral-xyz/anchor'
+import { Program } from '@coral-xyz/anchor'
 import { Keypair, PublicKey } from '@solana/web3.js'
 import { Keypair, PublicKey } from '@solana/web3.js'
 import { Puppet } from '../target/types/puppet'
 import { Puppet } from '../target/types/puppet'
 import { PuppetMaster } from '../target/types/puppet_master'
 import { PuppetMaster } from '../target/types/puppet_master'

+ 1 - 1
examples/tutorial/basic-0/client.js

@@ -2,7 +2,7 @@
 // It is not expected users directly test with this example. For a more
 // It is not expected users directly test with this example. For a more
 // ergonomic example, see `tests/basic-0.js` in this workspace.
 // ergonomic example, see `tests/basic-0.js` in this workspace.
 
 
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 
 
 // Configure the local cluster.
 // Configure the local cluster.
 anchor.setProvider(anchor.AnchorProvider.local());
 anchor.setProvider(anchor.AnchorProvider.local());

+ 1 - 1
examples/tutorial/basic-0/tests/basic-0.js

@@ -1,4 +1,4 @@
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 
 
 describe("basic-0", () => {
 describe("basic-0", () => {
   // Configure the client to use the local cluster.
   // Configure the client to use the local cluster.

+ 1 - 1
examples/tutorial/basic-1/tests/basic-1.js

@@ -1,5 +1,5 @@
 const assert = require("assert");
 const assert = require("assert");
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 const { SystemProgram } = anchor.web3;
 const { SystemProgram } = anchor.web3;
 
 
 describe("basic-1", () => {
 describe("basic-1", () => {

+ 1 - 1
examples/tutorial/basic-2/tests/basic-2.js

@@ -1,5 +1,5 @@
 const assert = require("assert");
 const assert = require("assert");
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 const { SystemProgram } = anchor.web3;
 const { SystemProgram } = anchor.web3;
 
 
 describe("basic-2", () => {
 describe("basic-2", () => {

+ 1 - 1
examples/tutorial/basic-3/tests/basic-3.js

@@ -1,5 +1,5 @@
 const assert = require("assert");
 const assert = require("assert");
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 const { SystemProgram } = anchor.web3;
 const { SystemProgram } = anchor.web3;
 
 
 describe("basic-3", () => {
 describe("basic-3", () => {

+ 1 - 1
examples/tutorial/basic-4/tests/basic-4.js

@@ -1,5 +1,5 @@
 const assert = require("assert");
 const assert = require("assert");
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 
 
 describe("basic-4", () => {
 describe("basic-4", () => {
   const provider = anchor.AnchorProvider.local();
   const provider = anchor.AnchorProvider.local();

+ 1 - 1
examples/tutorial/package.json

@@ -13,7 +13,7 @@
     "basic-4"
     "basic-4"
   ],
   ],
   "dependencies": {
   "dependencies": {
-    "@project-serum/anchor": "file:../../ts/packages/anchor"
+    "@coral-xyz/anchor": "file:../../ts/packages/anchor"
   },
   },
   "devDependencies": {
   "devDependencies": {
     "mocha": "^9.1.3",
     "mocha": "^9.1.3",

+ 23 - 23
examples/tutorial/yarn.lock

@@ -16,10 +16,29 @@
   dependencies:
   dependencies:
     regenerator-runtime "^0.13.11"
     regenerator-runtime "^0.13.11"
 
 
-"@coral-xyz/borsh@^0.2.6":
-  version "0.2.6"
-  resolved "https://registry.yarnpkg.com/@coral-xyz/borsh/-/borsh-0.2.6.tgz#0f11b223bf2967574310705afd3c53ce26688ada"
-  integrity sha512-y6nmHw1bFcJib7sMHsQPpC8r47xhqDZVvhUdna7NUPzpSbOZG6f46N21+aXsQ2w/tG8Ggls488J/ZmwbgVmyjg==
+"@coral-xyz/anchor@file:../../ts/packages/anchor":
+  version "0.26.0"
+  dependencies:
+    "@coral-xyz/borsh" "^0.26.0"
+    "@solana/web3.js" "^1.68.0"
+    base64-js "^1.5.1"
+    bn.js "^5.1.2"
+    bs58 "^4.0.1"
+    buffer-layout "^1.2.2"
+    camelcase "^6.3.0"
+    cross-fetch "^3.1.5"
+    crypto-hash "^1.3.0"
+    eventemitter3 "^4.0.7"
+    js-sha256 "^0.9.0"
+    pako "^2.0.3"
+    snake-case "^3.0.4"
+    superstruct "^0.15.4"
+    toml "^3.0.0"
+
+"@coral-xyz/borsh@^0.26.0":
+  version "0.26.0"
+  resolved "https://registry.yarnpkg.com/@coral-xyz/borsh/-/borsh-0.26.0.tgz#d054f64536d824634969e74138f9f7c52bbbc0d5"
+  integrity sha512-uCZ0xus0CszQPHYfWAqKS5swS1UxvePu83oOF+TWpUkedsNlg6p2p4azxZNSSqwXb9uXMFgxhuMBX9r3Xoi0vQ==
   dependencies:
   dependencies:
     bn.js "^5.1.2"
     bn.js "^5.1.2"
     buffer-layout "^1.2.0"
     buffer-layout "^1.2.0"
@@ -39,25 +58,6 @@
   resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.7.0.tgz#d15357f7c227e751d90aa06b05a0e5cf993ba8c1"
   resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.7.0.tgz#d15357f7c227e751d90aa06b05a0e5cf993ba8c1"
   integrity sha512-kbacwGSsH/CTout0ZnZWxnW1B+jH/7r/WAAKLBtrRJ/+CUH7lgmQzl3GTrQua3SGKWNSDsS6lmjnDpIJ5Dxyaw==
   integrity sha512-kbacwGSsH/CTout0ZnZWxnW1B+jH/7r/WAAKLBtrRJ/+CUH7lgmQzl3GTrQua3SGKWNSDsS6lmjnDpIJ5Dxyaw==
 
 
-"@project-serum/anchor@file:../../ts/packages/anchor":
-  version "0.26.0"
-  dependencies:
-    "@coral-xyz/borsh" "^0.2.6"
-    "@solana/web3.js" "^1.68.0"
-    base64-js "^1.5.1"
-    bn.js "^5.1.2"
-    bs58 "^4.0.1"
-    buffer-layout "^1.2.2"
-    camelcase "^6.3.0"
-    cross-fetch "^3.1.5"
-    crypto-hash "^1.3.0"
-    eventemitter3 "^4.0.7"
-    js-sha256 "^0.9.0"
-    pako "^2.0.3"
-    snake-case "^3.0.4"
-    superstruct "^0.15.4"
-    toml "^3.0.0"
-
 "@solana/buffer-layout@^4.0.0":
 "@solana/buffer-layout@^4.0.0":
   version "4.0.1"
   version "4.0.1"
   resolved "https://registry.yarnpkg.com/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz#b996235eaec15b1e0b5092a8ed6028df77fa6c15"
   resolved "https://registry.yarnpkg.com/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz#b996235eaec15b1e0b5092a8ed6028df77fa6c15"

+ 2 - 2
tests/anchor-cli-account/tests/account.ts

@@ -1,5 +1,5 @@
-import * as anchor from "@project-serum/anchor";
-import { Program } from "@project-serum/anchor";
+import * as anchor from "@coral-xyz/anchor";
+import { Program } from "@coral-xyz/anchor";
 import { AccountCommand } from "../target/types/account_command";
 import { AccountCommand } from "../target/types/account_command";
 import { assert } from "chai";
 import { assert } from "chai";
 import { execSync } from "child_process";
 import { execSync } from "child_process";

+ 1 - 1
tests/anchor-cli-idl/migrations/deploy.ts

@@ -2,7 +2,7 @@
 // single deploy script that's invoked from the CLI, injecting a provider
 // single deploy script that's invoked from the CLI, injecting a provider
 // configured from the workspace's Anchor.toml.
 // configured from the workspace's Anchor.toml.
 
 
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 
 
 module.exports = async function (provider) {
 module.exports = async function (provider) {
   // Configure client to use the provider.
   // Configure client to use the provider.

+ 2 - 2
tests/anchor-cli-idl/tests/idl.ts

@@ -1,5 +1,5 @@
-import * as anchor from "@project-serum/anchor";
-import { Program } from "@project-serum/anchor";
+import * as anchor from "@coral-xyz/anchor";
+import { Program } from "@coral-xyz/anchor";
 import { IdlCommandsOne } from "../target/types/idl_commands_one";
 import { IdlCommandsOne } from "../target/types/idl_commands_one";
 import { IdlCommandsTwo } from "../target/types/idl_commands_two";
 import { IdlCommandsTwo } from "../target/types/idl_commands_two";
 import { assert } from "chai";
 import { assert } from "chai";

+ 1 - 1
tests/bpf-upgradeable-state/migrations/deploy.ts

@@ -2,7 +2,7 @@
 // single deploy script that's invoked from the CLI, injecting a provider
 // single deploy script that's invoked from the CLI, injecting a provider
 // configured from the workspace's Anchor.toml.
 // configured from the workspace's Anchor.toml.
 
 
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 
 
 module.exports = async function (provider) {
 module.exports = async function (provider) {
   // Configure client to use the provider.
   // Configure client to use the provider.

+ 3 - 3
tests/bpf-upgradeable-state/tests/bpf-upgradable-state.ts

@@ -1,6 +1,6 @@
-import * as anchor from "@project-serum/anchor";
-import { AnchorError, Program } from "@project-serum/anchor";
-import { findProgramAddressSync } from "@project-serum/anchor/dist/cjs/utils/pubkey";
+import * as anchor from "@coral-xyz/anchor";
+import { AnchorError, Program } from "@coral-xyz/anchor";
+import { findProgramAddressSync } from "@coral-xyz/anchor/dist/cjs/utils/pubkey";
 import { PublicKey } from "@solana/web3.js";
 import { PublicKey } from "@solana/web3.js";
 import { assert } from "chai";
 import { assert } from "chai";
 import { BpfUpgradeableState } from "../target/types/bpf_upgradeable_state";
 import { BpfUpgradeableState } from "../target/types/bpf_upgradeable_state";

+ 1 - 1
tests/cashiers-check/migrations/deploy.js

@@ -2,7 +2,7 @@
 // single deploy script that's invoked from the CLI, injecting a provider
 // single deploy script that's invoked from the CLI, injecting a provider
 // configured from the workspace's Anchor.toml.
 // configured from the workspace's Anchor.toml.
 
 
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 
 
 module.exports = async function (provider) {
 module.exports = async function (provider) {
   // Configure client to use the provider.
   // Configure client to use the provider.

+ 1 - 1
tests/cashiers-check/tests/cashiers-check.js

@@ -1,4 +1,4 @@
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 const serumCmn = require("@project-serum/common");
 const serumCmn = require("@project-serum/common");
 const { assert } = require("chai");
 const { assert } = require("chai");
 const { TOKEN_PROGRAM_ID } = require("@solana/spl-token");
 const { TOKEN_PROGRAM_ID } = require("@solana/spl-token");

+ 1 - 1
tests/cfo/migrations/deploy.js

@@ -2,7 +2,7 @@
 // single deploy script that's invoked from the CLI, injecting a provider
 // single deploy script that's invoked from the CLI, injecting a provider
 // configured from the workspace's Anchor.toml.
 // configured from the workspace's Anchor.toml.
 
 
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 
 
 module.exports = async function (provider) {
 module.exports = async function (provider) {
   // Configure client to use the provider.
   // Configure client to use the provider.

+ 1 - 1
tests/cfo/scripts/fees.js

@@ -2,7 +2,7 @@
 
 
 const process = require("process");
 const process = require("process");
 const fs = require("fs");
 const fs = require("fs");
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 const { Market, OpenOrders } = require("@project-serum/serum");
 const { Market, OpenOrders } = require("@project-serum/serum");
 const Account = anchor.web3.Account;
 const Account = anchor.web3.Account;
 const Program = anchor.Program;
 const Program = anchor.Program;

+ 1 - 1
tests/cfo/scripts/list-market.js

@@ -4,7 +4,7 @@
 
 
 const utils = require("../tests/utils");
 const utils = require("../tests/utils");
 const fs = require("fs");
 const fs = require("fs");
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 const provider = anchor.AnchorProvider.local();
 const provider = anchor.AnchorProvider.local();
 // hack so we don't have to update serum-common library
 // hack so we don't have to update serum-common library
 // to the new AnchorProvider class and Provider interface
 // to the new AnchorProvider class and Provider interface

+ 1 - 1
tests/cfo/scripts/trade-bot.js

@@ -3,7 +3,7 @@
 // Script to infinitely post orders that are immediately filled.
 // Script to infinitely post orders that are immediately filled.
 
 
 const process = require("process");
 const process = require("process");
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 const PublicKey = anchor.web3.PublicKey;
 const PublicKey = anchor.web3.PublicKey;
 const { runTradeBot } = require("../tests/utils");
 const { runTradeBot } = require("../tests/utils");
 
 

+ 1 - 1
tests/cfo/tests/cfo.js

@@ -1,6 +1,6 @@
 const { assert } = require("chai");
 const { assert } = require("chai");
 const { Token } = require("@solana/spl-token");
 const { Token } = require("@solana/spl-token");
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 const serumCmn = require("@project-serum/common");
 const serumCmn = require("@project-serum/common");
 const { Market } = require("@project-serum/serum");
 const { Market } = require("@project-serum/serum");
 const utf8 = anchor.utils.bytes.utf8;
 const utf8 = anchor.utils.bytes.utf8;

+ 2 - 2
tests/cfo/tests/utils/index.js

@@ -9,9 +9,9 @@ const TOKEN_PROGRAM_ID = require("@solana/spl-token").TOKEN_PROGRAM_ID;
 const TokenInstructions = require("@project-serum/serum").TokenInstructions;
 const TokenInstructions = require("@project-serum/serum").TokenInstructions;
 const { Market, OpenOrders } = require("@project-serum/serum");
 const { Market, OpenOrders } = require("@project-serum/serum");
 const DexInstructions = require("@project-serum/serum").DexInstructions;
 const DexInstructions = require("@project-serum/serum").DexInstructions;
-const web3 = require("@project-serum/anchor").web3;
+const web3 = require("@coral-xyz/anchor").web3;
 const Connection = web3.Connection;
 const Connection = web3.Connection;
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 const BN = anchor.BN;
 const BN = anchor.BN;
 const serumCmn = require("@project-serum/common");
 const serumCmn = require("@project-serum/common");
 const Account = web3.Account;
 const Account = web3.Account;

+ 1 - 1
tests/cfo/tests/utils/stake.js

@@ -1,4 +1,4 @@
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 const serumCmn = require("@project-serum/common");
 const serumCmn = require("@project-serum/common");
 const TokenInstructions = require("@project-serum/serum").TokenInstructions;
 const TokenInstructions = require("@project-serum/serum").TokenInstructions;
 const utils = require("../../deps/stake/tests/utils");
 const utils = require("../../deps/stake/tests/utils");

+ 1 - 1
tests/chat/migrations/deploy.js

@@ -2,7 +2,7 @@
 // single deploy script that's invoked from the CLI, injecting a provider
 // single deploy script that's invoked from the CLI, injecting a provider
 // configured from the workspace's Anchor.toml.
 // configured from the workspace's Anchor.toml.
 
 
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 
 
 module.exports = async function (provider) {
 module.exports = async function (provider) {
   // Configure client to use the provider.
   // Configure client to use the provider.

+ 1 - 1
tests/chat/tests/chat.js

@@ -1,4 +1,4 @@
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 const { assert } = require("chai");
 const { assert } = require("chai");
 const { PublicKey } = anchor.web3;
 const { PublicKey } = anchor.web3;
 
 

+ 1 - 1
tests/composite/tests/composite.js

@@ -1,5 +1,5 @@
 const { assert } = require("chai");
 const { assert } = require("chai");
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 
 
 describe("composite", () => {
 describe("composite", () => {
   const provider = anchor.AnchorProvider.local();
   const provider = anchor.AnchorProvider.local();

+ 1 - 1
tests/cpi-returns/migrations/deploy.ts

@@ -2,7 +2,7 @@
 // single deploy script that's invoked from the CLI, injecting a provider
 // single deploy script that's invoked from the CLI, injecting a provider
 // configured from the workspace's Anchor.toml.
 // configured from the workspace's Anchor.toml.
 
 
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 
 
 module.exports = async function (provider) {
 module.exports = async function (provider) {
   // Configure client to use the provider.
   // Configure client to use the provider.

+ 2 - 2
tests/cpi-returns/tests/cpi-return.ts

@@ -1,7 +1,7 @@
 import assert from "assert";
 import assert from "assert";
-import * as anchor from "@project-serum/anchor";
+import * as anchor from "@coral-xyz/anchor";
 import * as borsh from "borsh";
 import * as borsh from "borsh";
-import { Program } from "@project-serum/anchor";
+import { Program } from "@coral-xyz/anchor";
 import { Callee } from "../target/types/callee";
 import { Callee } from "../target/types/callee";
 import { Caller } from "../target/types/caller";
 import { Caller } from "../target/types/caller";
 import { ConfirmOptions } from "@solana/web3.js";
 import { ConfirmOptions } from "@solana/web3.js";

+ 1 - 1
tests/custom-coder/migrations/deploy.ts

@@ -2,7 +2,7 @@
 // single deploy script that's invoked from the CLI, injecting a provider
 // single deploy script that's invoked from the CLI, injecting a provider
 // configured from the workspace's Anchor.toml.
 // configured from the workspace's Anchor.toml.
 
 
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 
 
 module.exports = async function (provider) {
 module.exports = async function (provider) {
   // Configure client to use the provider.
   // Configure client to use the provider.

+ 3 - 3
tests/custom-coder/tests/spl-associated-token-coder.ts

@@ -1,6 +1,6 @@
-import { Native, AnchorProvider, setProvider } from "@project-serum/anchor";
-import { splAssociatedTokenAccountProgram } from "@project-serum/spl-associated-token-account";
-import { splTokenProgram } from "@project-serum/spl-token";
+import { Native, AnchorProvider, setProvider } from "@coral-xyz/anchor";
+import { splAssociatedTokenAccountProgram } from "@coral-xyz/spl-associated-token-account";
+import { splTokenProgram } from "@coral-xyz/spl-token";
 import { Keypair, PublicKey, SYSVAR_RENT_PUBKEY } from "@solana/web3.js";
 import { Keypair, PublicKey, SYSVAR_RENT_PUBKEY } from "@solana/web3.js";
 import * as assert from "assert";
 import * as assert from "assert";
 
 

+ 2 - 2
tests/custom-coder/tests/spl-token-coder.ts

@@ -1,5 +1,5 @@
-import { AnchorProvider, setProvider } from "@project-serum/anchor";
-import { splTokenProgram } from "@project-serum/spl-token";
+import { AnchorProvider, setProvider } from "@coral-xyz/anchor";
+import { splTokenProgram } from "@coral-xyz/spl-token";
 import { Keypair, SYSVAR_RENT_PUBKEY, PublicKey } from "@solana/web3.js";
 import { Keypair, SYSVAR_RENT_PUBKEY, PublicKey } from "@solana/web3.js";
 import BN from "bn.js";
 import BN from "bn.js";
 import { assert } from "chai";
 import { assert } from "chai";

+ 2 - 2
tests/custom-coder/tests/system-coder.ts

@@ -1,5 +1,5 @@
-import * as anchor from "@project-serum/anchor";
-import { Native } from "@project-serum/anchor";
+import * as anchor from "@coral-xyz/anchor";
+import { Native } from "@coral-xyz/anchor";
 import { TOKEN_PROGRAM_ID } from "@solana/spl-token";
 import { TOKEN_PROGRAM_ID } from "@solana/spl-token";
 import {
 import {
   Keypair,
   Keypair,

+ 2 - 2
tests/declare-id/tests/declare-id.ts

@@ -1,5 +1,5 @@
-import * as anchor from "@project-serum/anchor";
-import { AnchorError, Program } from "@project-serum/anchor";
+import * as anchor from "@coral-xyz/anchor";
+import { AnchorError, Program } from "@coral-xyz/anchor";
 import splToken from "@solana/spl-token";
 import splToken from "@solana/spl-token";
 import { DeclareId } from "../target/types/declare_id";
 import { DeclareId } from "../target/types/declare_id";
 import { assert } from "chai";
 import { assert } from "chai";

+ 2 - 2
tests/errors/tests/errors.ts

@@ -1,5 +1,5 @@
-import * as anchor from "@project-serum/anchor";
-import { Program, AnchorError } from "@project-serum/anchor";
+import * as anchor from "@coral-xyz/anchor";
+import { Program, AnchorError } from "@coral-xyz/anchor";
 import { Keypair, Transaction, TransactionInstruction } from "@solana/web3.js";
 import { Keypair, Transaction, TransactionInstruction } from "@solana/web3.js";
 import { TOKEN_PROGRAM_ID, Token } from "@solana/spl-token";
 import { TOKEN_PROGRAM_ID, Token } from "@solana/spl-token";
 import { assert, expect } from "chai";
 import { assert, expect } from "chai";

+ 2 - 2
tests/escrow/tests/escrow.ts

@@ -1,5 +1,5 @@
-import * as anchor from "@project-serum/anchor";
-import { Program, BN, IdlAccounts } from "@project-serum/anchor";
+import * as anchor from "@coral-xyz/anchor";
+import { Program, BN, IdlAccounts } from "@coral-xyz/anchor";
 import { PublicKey, Keypair, SystemProgram } from "@solana/web3.js";
 import { PublicKey, Keypair, SystemProgram } from "@solana/web3.js";
 import { TOKEN_PROGRAM_ID, Token } from "@solana/spl-token";
 import { TOKEN_PROGRAM_ID, Token } from "@solana/spl-token";
 import { assert } from "chai";
 import { assert } from "chai";

+ 1 - 1
tests/events/migrations/deploy.js

@@ -2,7 +2,7 @@
 // single deploy script that's invoked from the CLI, injecting a provider
 // single deploy script that's invoked from the CLI, injecting a provider
 // configured from the workspace's Anchor.toml.
 // configured from the workspace's Anchor.toml.
 
 
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 
 
 module.exports = async function (provider) {
 module.exports = async function (provider) {
   // Configure client to use the provider.
   // Configure client to use the provider.

+ 1 - 1
tests/events/tests/events.js

@@ -1,4 +1,4 @@
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 const { assert } = require("chai");
 const { assert } = require("chai");
 
 
 describe("events", () => {
 describe("events", () => {

+ 1 - 1
tests/floats/migrations/deploy.ts

@@ -2,7 +2,7 @@
 // single deploy script that's invoked from the CLI, injecting a provider
 // single deploy script that's invoked from the CLI, injecting a provider
 // configured from the workspace's Anchor.toml.
 // configured from the workspace's Anchor.toml.
 
 
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 
 
 module.exports = async function (provider) {
 module.exports = async function (provider) {
   // Configure client to use the provider.
   // Configure client to use the provider.

+ 2 - 2
tests/floats/tests/floats.ts

@@ -1,5 +1,5 @@
-import * as anchor from "@project-serum/anchor";
-import { Program, getProvider } from "@project-serum/anchor";
+import * as anchor from "@coral-xyz/anchor";
+import { Program, getProvider } from "@coral-xyz/anchor";
 import { Keypair, SystemProgram } from "@solana/web3.js";
 import { Keypair, SystemProgram } from "@solana/web3.js";
 import { Floats } from "../target/types/floats";
 import { Floats } from "../target/types/floats";
 import { assert } from "chai";
 import { assert } from "chai";

+ 1 - 1
tests/ido-pool/migrations/deploy.js

@@ -2,7 +2,7 @@
 // single deploy script that's invoked from the CLI, injecting a provider
 // single deploy script that's invoked from the CLI, injecting a provider
 // configured from the workspace's Anchor.toml.
 // configured from the workspace's Anchor.toml.
 
 
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 
 
 module.exports = async function (provider) {
 module.exports = async function (provider) {
   // Configure client to use the provider.
   // Configure client to use the provider.

+ 2 - 2
tests/ido-pool/tests/ido-pool.js

@@ -1,4 +1,4 @@
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 const { assert } = require("chai");
 const { assert } = require("chai");
 const {
 const {
   ASSOCIATED_TOKEN_PROGRAM_ID,
   ASSOCIATED_TOKEN_PROGRAM_ID,
@@ -11,7 +11,7 @@ const {
   createMint,
   createMint,
   createTokenAccount,
   createTokenAccount,
 } = require("./utils");
 } = require("./utils");
-const { token } = require("@project-serum/anchor/dist/cjs/utils");
+const { token } = require("@coral-xyz/anchor/dist/cjs/utils");
 
 
 describe("ido-pool", () => {
 describe("ido-pool", () => {
   const provider = anchor.AnchorProvider.local();
   const provider = anchor.AnchorProvider.local();

+ 1 - 1
tests/ido-pool/tests/utils/index.js

@@ -1,5 +1,5 @@
 const spl = require("@solana/spl-token");
 const spl = require("@solana/spl-token");
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 const serumCmn = require("@project-serum/common");
 const serumCmn = require("@project-serum/common");
 const TokenInstructions = require("@project-serum/serum").TokenInstructions;
 const TokenInstructions = require("@project-serum/serum").TokenInstructions;
 
 

+ 1 - 1
tests/interface/tests/interface.js

@@ -1,4 +1,4 @@
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 const { assert } = require("chai");
 const { assert } = require("chai");
 const nativeAssert = require("assert");
 const nativeAssert = require("assert");
 
 

+ 1 - 1
tests/lockup/migrations/deploy.js

@@ -2,7 +2,7 @@
 // immediately after a deploy.
 // immediately after a deploy.
 
 
 const serumCmn = require("@project-serum/common");
 const serumCmn = require("@project-serum/common");
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 const PublicKey = anchor.web3.PublicKey;
 const PublicKey = anchor.web3.PublicKey;
 
 
 module.exports = async function (provider) {
 module.exports = async function (provider) {

+ 1 - 1
tests/lockup/tests/lockup.js

@@ -1,4 +1,4 @@
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 const serumCmn = require("@project-serum/common");
 const serumCmn = require("@project-serum/common");
 const { TOKEN_PROGRAM_ID } = require("@solana/spl-token");
 const { TOKEN_PROGRAM_ID } = require("@solana/spl-token");
 const utils = require("./utils");
 const utils = require("./utils");

+ 1 - 1
tests/lockup/tests/utils.js

@@ -1,4 +1,4 @@
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 const serumCmn = require("@project-serum/common");
 const serumCmn = require("@project-serum/common");
 
 
 async function createBalanceSandbox(provider, r, registrySigner) {
 async function createBalanceSandbox(provider, r, registrySigner) {

+ 1 - 1
tests/misc/migrations/deploy.js

@@ -2,7 +2,7 @@
 // single deploy script that's invoked from the CLI, injecting a provider
 // single deploy script that's invoked from the CLI, injecting a provider
 // configured from the workspace's Anchor.toml.
 // configured from the workspace's Anchor.toml.
 
 
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 
 
 module.exports = async function (provider) {
 module.exports = async function (provider) {
   // Configure client to use the provider.
   // Configure client to use the provider.

+ 2 - 2
tests/misc/miscNonRentExempt.ts

@@ -1,5 +1,5 @@
-import * as anchor from "@project-serum/anchor";
-import { Program, AnchorError } from "@project-serum/anchor";
+import * as anchor from "@coral-xyz/anchor";
+import { Program, AnchorError } from "@coral-xyz/anchor";
 import {
 import {
   PublicKey,
   PublicKey,
   Keypair,
   Keypair,

+ 2 - 2
tests/misc/tests/idl_doc/idl_doc.ts

@@ -1,5 +1,5 @@
-import * as anchor from "@project-serum/anchor";
-import { Program, Wallet } from "@project-serum/anchor";
+import * as anchor from "@coral-xyz/anchor";
+import { Program, Wallet } from "@coral-xyz/anchor";
 import { IdlDoc } from "../../target/types/idl_doc";
 import { IdlDoc } from "../../target/types/idl_doc";
 const { expect } = require("chai");
 const { expect } = require("chai");
 const idl_doc_idl = require("../../target/idl/idl_doc.json");
 const idl_doc_idl = require("../../target/idl/idl_doc.json");

+ 2 - 2
tests/misc/tests/init-if-needed/init-if-needed.ts

@@ -1,5 +1,5 @@
-import * as anchor from "@project-serum/anchor";
-import { AnchorError, Program } from "@project-serum/anchor";
+import * as anchor from "@coral-xyz/anchor";
+import { AnchorError, Program } from "@coral-xyz/anchor";
 import { InitIfNeeded } from "../../target/types/init_if_needed";
 import { InitIfNeeded } from "../../target/types/init_if_needed";
 import { SystemProgram, LAMPORTS_PER_SOL } from "@solana/web3.js";
 import { SystemProgram, LAMPORTS_PER_SOL } from "@solana/web3.js";
 import { expect } from "chai";
 import { expect } from "chai";

+ 2 - 2
tests/misc/tests/misc/misc.ts

@@ -1,4 +1,4 @@
-import * as anchor from "@project-serum/anchor";
+import * as anchor from "@coral-xyz/anchor";
 import {
 import {
   Program,
   Program,
   BN,
   BN,
@@ -7,7 +7,7 @@ import {
   Wallet,
   Wallet,
   IdlTypes,
   IdlTypes,
   IdlEvents,
   IdlEvents,
-} from "@project-serum/anchor";
+} from "@coral-xyz/anchor";
 import {
 import {
   PublicKey,
   PublicKey,
   Keypair,
   Keypair,

+ 3 - 3
tests/multiple-suites-run-single/package.json

@@ -2,13 +2,13 @@
     "name": "multiple-suites-run-single",
     "name": "multiple-suites-run-single",
     "version": "0.24.2",
     "version": "0.24.2",
     "license": "(MIT OR Apache-2.0)",
     "license": "(MIT OR Apache-2.0)",
-    "homepage": "https://github.com/project-serum/anchor#readme",
+    "homepage": "https://github.com/coral-xyz/anchor#readme",
     "bugs": {
     "bugs": {
-      "url": "https://github.com/project-serum/anchor/issues"
+      "url": "https://github.com/coral-xyz/anchor/issues"
     },
     },
     "repository": {
     "repository": {
       "type": "git",
       "type": "git",
-      "url": "https://github.com/project-serum/anchor.git"
+      "url": "https://github.com/coral-xyz/anchor.git"
     },
     },
     "engines": {
     "engines": {
       "node": ">=11"
       "node": ">=11"

+ 2 - 2
tests/multiple-suites-run-single/tests/should-run/shouldRun.ts

@@ -1,5 +1,5 @@
-import * as anchor from "@project-serum/anchor";
-import { Program } from "@project-serum/anchor";
+import * as anchor from "@coral-xyz/anchor";
+import { Program } from "@coral-xyz/anchor";
 import { assert } from "chai";
 import { assert } from "chai";
 import { MultipleSuitesRunSingle } from "../../target/types/multiple_suites_run_single";
 import { MultipleSuitesRunSingle } from "../../target/types/multiple_suites_run_single";
 
 

+ 1 - 1
tests/multiple-suites/migrations/deploy.ts

@@ -2,7 +2,7 @@
 // single deploy script that's invoked from the CLI, injecting a provider
 // single deploy script that's invoked from the CLI, injecting a provider
 // configured from the workspace's Anchor.toml.
 // configured from the workspace's Anchor.toml.
 
 
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 
 
 module.exports = async function (provider) {
 module.exports = async function (provider) {
   // Configure client to use the provider.
   // Configure client to use the provider.

+ 2 - 2
tests/multiple-suites/tests/another-suite/another-suite.ts

@@ -1,5 +1,5 @@
-import * as anchor from "@project-serum/anchor";
-import { Program } from "@project-serum/anchor";
+import * as anchor from "@coral-xyz/anchor";
+import { Program } from "@coral-xyz/anchor";
 import { PublicKey } from "@solana/web3.js";
 import { PublicKey } from "@solana/web3.js";
 import { assert } from "chai";
 import { assert } from "chai";
 import { MultipleSuites } from "../../target/types/multiple_suites";
 import { MultipleSuites } from "../../target/types/multiple_suites";

+ 2 - 2
tests/multiple-suites/tests/fourth-and-fifth-suite/fifth-suite/fifthSuite.ts

@@ -1,5 +1,5 @@
-import * as anchor from "@project-serum/anchor";
-import { Program } from "@project-serum/anchor";
+import * as anchor from "@coral-xyz/anchor";
+import { Program } from "@coral-xyz/anchor";
 import { PublicKey } from "@solana/web3.js";
 import { PublicKey } from "@solana/web3.js";
 import { assert } from "chai";
 import { assert } from "chai";
 import { MultipleSuites } from "../../../target/types/multiple_suites";
 import { MultipleSuites } from "../../../target/types/multiple_suites";

+ 2 - 2
tests/multiple-suites/tests/fourth-and-fifth-suite/forth-suite/forth-suite.ts

@@ -1,5 +1,5 @@
-import * as anchor from "@project-serum/anchor";
-import { Program } from "@project-serum/anchor";
+import * as anchor from "@coral-xyz/anchor";
+import { Program } from "@coral-xyz/anchor";
 import { PublicKey } from "@solana/web3.js";
 import { PublicKey } from "@solana/web3.js";
 import { assert } from "chai";
 import { assert } from "chai";
 import { MultipleSuites } from "../../../target/types/multiple_suites";
 import { MultipleSuites } from "../../../target/types/multiple_suites";

+ 2 - 2
tests/multiple-suites/tests/multiple-suites/multiple-suites.ts

@@ -1,5 +1,5 @@
-import * as anchor from "@project-serum/anchor";
-import { Program } from "@project-serum/anchor";
+import * as anchor from "@coral-xyz/anchor";
+import { Program } from "@coral-xyz/anchor";
 import { PublicKey } from "@solana/web3.js";
 import { PublicKey } from "@solana/web3.js";
 import { assert } from "chai";
 import { assert } from "chai";
 import { MultipleSuites } from "../../target/types/multiple_suites";
 import { MultipleSuites } from "../../target/types/multiple_suites";

+ 2 - 2
tests/multiple-suites/tests/third-suite/sub-dir-one/subDirOne.ts

@@ -1,5 +1,5 @@
-import * as anchor from "@project-serum/anchor";
-import { Program } from "@project-serum/anchor";
+import * as anchor from "@coral-xyz/anchor";
+import { Program } from "@coral-xyz/anchor";
 import { PublicKey } from "@solana/web3.js";
 import { PublicKey } from "@solana/web3.js";
 import { MultipleSuites } from "../../../target/types/multiple_suites";
 import { MultipleSuites } from "../../../target/types/multiple_suites";
 import { assert } from "chai";
 import { assert } from "chai";

+ 2 - 2
tests/multiple-suites/tests/third-suite/sub-dir-two/subDirTwo.ts

@@ -1,5 +1,5 @@
-import * as anchor from "@project-serum/anchor";
-import { Program } from "@project-serum/anchor";
+import * as anchor from "@coral-xyz/anchor";
+import { Program } from "@coral-xyz/anchor";
 import { PublicKey } from "@solana/web3.js";
 import { PublicKey } from "@solana/web3.js";
 import { assert } from "chai";
 import { assert } from "chai";
 import { MultipleSuites } from "../../../target/types/multiple_suites";
 import { MultipleSuites } from "../../../target/types/multiple_suites";

+ 1 - 1
tests/multisig/migrations/deploy.js

@@ -2,7 +2,7 @@
 // single deploy script that's invoked from the CLI, injecting a provider
 // single deploy script that's invoked from the CLI, injecting a provider
 // configured from the workspace's Anchor.toml.
 // configured from the workspace's Anchor.toml.
 
 
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 
 
 module.exports = async function (provider) {
 module.exports = async function (provider) {
   // Configure client to use the provider.
   // Configure client to use the provider.

+ 1 - 1
tests/multisig/tests/multisig.js

@@ -1,4 +1,4 @@
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 const { assert } = require("chai");
 const { assert } = require("chai");
 
 
 describe("multisig", () => {
 describe("multisig", () => {

+ 2 - 2
tests/optional/tests/optional.ts

@@ -1,4 +1,4 @@
-import * as anchor from "@project-serum/anchor";
+import * as anchor from "@coral-xyz/anchor";
 import {
 import {
   Program,
   Program,
   web3,
   web3,
@@ -8,7 +8,7 @@ import {
   LangErrorMessage,
   LangErrorMessage,
   translateError,
   translateError,
   parseIdlErrors,
   parseIdlErrors,
-} from "@project-serum/anchor";
+} from "@coral-xyz/anchor";
 import { Optional } from "../target/types/optional";
 import { Optional } from "../target/types/optional";
 import { AllowMissingOptionals } from "../target/types/allow_missing_optionals";
 import { AllowMissingOptionals } from "../target/types/allow_missing_optionals";
 import { assert, expect } from "chai";
 import { assert, expect } from "chai";

+ 4 - 4
tests/package.json

@@ -43,16 +43,16 @@
     "bpf-upgradeable-state"
     "bpf-upgradeable-state"
   ],
   ],
   "dependencies": {
   "dependencies": {
-    "@project-serum/anchor": "file:../ts/packages/anchor",
+    "@coral-xyz/anchor": "file:../ts/packages/anchor",
     "@project-serum/common": "^0.0.1-beta.3",
     "@project-serum/common": "^0.0.1-beta.3",
     "@project-serum/serum": "^0.13.60",
     "@project-serum/serum": "^0.13.60",
-    "@project-serum/spl-associated-token-account": "file:../ts/packages/spl-associated-token-account",
-    "@project-serum/spl-token": "file:../ts/packages/spl-token",
+    "@coral-xyz/spl-associated-token-account": "file:../ts/packages/spl-associated-token-account",
+    "@coral-xyz/spl-token": "file:../ts/packages/spl-token",
     "@solana/spl-token": "^0.1.8",
     "@solana/spl-token": "^0.1.8",
     "@solana/web3.js": "^1.68.0"
     "@solana/web3.js": "^1.68.0"
   },
   },
   "resolutions": {
   "resolutions": {
-    "@project-serum/anchor/@solana/web3.js": "^1.68.0"
+    "@coral-xyz/anchor/@solana/web3.js": "^1.68.0"
   },
   },
   "devDependencies": {
   "devDependencies": {
     "@types/chai": "^4.3.0",
     "@types/chai": "^4.3.0",

+ 1 - 1
tests/pda-derivation/migrations/deploy.ts

@@ -2,7 +2,7 @@
 // single deploy script that's invoked from the CLI, injecting a provider
 // single deploy script that's invoked from the CLI, injecting a provider
 // configured from the workspace's Anchor.toml.
 // configured from the workspace's Anchor.toml.
 
 
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 
 
 module.exports = async function (provider) {
 module.exports = async function (provider) {
   // Configure client to use the provider.
   // Configure client to use the provider.

+ 3 - 3
tests/pda-derivation/tests/typescript.spec.ts

@@ -1,8 +1,8 @@
-import * as anchor from "@project-serum/anchor";
+import * as anchor from "@coral-xyz/anchor";
 import BN from "bn.js";
 import BN from "bn.js";
 import { Keypair } from "@solana/web3.js";
 import { Keypair } from "@solana/web3.js";
-import { findProgramAddressSync } from "@project-serum/anchor/dist/cjs/utils/pubkey";
-import { Program } from "@project-serum/anchor";
+import { findProgramAddressSync } from "@coral-xyz/anchor/dist/cjs/utils/pubkey";
+import { Program } from "@coral-xyz/anchor";
 import { PdaDerivation } from "../target/types/pda_derivation";
 import { PdaDerivation } from "../target/types/pda_derivation";
 import { expect } from "chai";
 import { expect } from "chai";
 const encode = anchor.utils.bytes.utf8.encode;
 const encode = anchor.utils.bytes.utf8.encode;

+ 1 - 1
tests/pyth/tests/oracleUtils.ts

@@ -1,5 +1,5 @@
 import { Buffer } from "buffer";
 import { Buffer } from "buffer";
-import { AnchorProvider, BN, Program, web3 } from "@project-serum/anchor";
+import { AnchorProvider, BN, Program, web3 } from "@coral-xyz/anchor";
 
 
 export const Magic = 0xa1b2c3d4;
 export const Magic = 0xa1b2c3d4;
 export const Version1 = 1;
 export const Version1 = 1;

+ 2 - 2
tests/pyth/tests/pyth.spec.ts

@@ -1,5 +1,5 @@
-import * as anchor from "@project-serum/anchor";
-import { BN, Program, web3 } from "@project-serum/anchor";
+import * as anchor from "@coral-xyz/anchor";
+import { BN, Program, web3 } from "@coral-xyz/anchor";
 import { assert } from "chai";
 import { assert } from "chai";
 import { createPriceFeed, setFeedPrice, getFeedData } from "./oracleUtils";
 import { createPriceFeed, setFeedPrice, getFeedData } from "./oracleUtils";
 
 

+ 3 - 3
tests/realloc/package.json

@@ -2,13 +2,13 @@
   "name": "realloc",
   "name": "realloc",
   "version": "0.26.0",
   "version": "0.26.0",
   "license": "(MIT OR Apache-2.0)",
   "license": "(MIT OR Apache-2.0)",
-  "homepage": "https://github.com/project-serum/anchor#readme",
+  "homepage": "https://github.com/coral-xyz/anchor#readme",
   "bugs": {
   "bugs": {
-    "url": "https://github.com/project-serum/anchor/issues"
+    "url": "https://github.com/coral-xyz/anchor/issues"
   },
   },
   "repository": {
   "repository": {
     "type": "git",
     "type": "git",
-    "url": "https://github.com/project-serum/anchor.git"
+    "url": "https://github.com/coral-xyz/anchor.git"
   },
   },
   "engines": {
   "engines": {
     "node": ">=11"
     "node": ">=11"

+ 2 - 2
tests/realloc/tests/realloc.ts

@@ -1,5 +1,5 @@
-import * as anchor from "@project-serum/anchor";
-import { AnchorError, Program } from "@project-serum/anchor";
+import * as anchor from "@coral-xyz/anchor";
+import { AnchorError, Program } from "@coral-xyz/anchor";
 import { assert } from "chai";
 import { assert } from "chai";
 import { Realloc } from "../target/types/realloc";
 import { Realloc } from "../target/types/realloc";
 
 

+ 1 - 1
tests/relations-derivation/migrations/deploy.ts

@@ -2,7 +2,7 @@
 // single deploy script that's invoked from the CLI, injecting a provider
 // single deploy script that's invoked from the CLI, injecting a provider
 // configured from the workspace's Anchor.toml.
 // configured from the workspace's Anchor.toml.
 
 
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 
 
 module.exports = async function (provider) {
 module.exports = async function (provider) {
   // Configure client to use the provider.
   // Configure client to use the provider.

+ 2 - 2
tests/relations-derivation/tests/typescript.spec.ts

@@ -1,5 +1,5 @@
-import * as anchor from "@project-serum/anchor";
-import { AnchorProvider, Program } from "@project-serum/anchor";
+import * as anchor from "@coral-xyz/anchor";
+import { AnchorProvider, Program } from "@coral-xyz/anchor";
 import { PublicKey } from "@solana/web3.js";
 import { PublicKey } from "@solana/web3.js";
 import { expect } from "chai";
 import { expect } from "chai";
 import { RelationsDerivation } from "../target/types/relations_derivation";
 import { RelationsDerivation } from "../target/types/relations_derivation";

+ 1 - 1
tests/spl/token-proxy/tests/token-proxy.js

@@ -1,4 +1,4 @@
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 const { assert } = require("chai");
 const { assert } = require("chai");
 
 
 describe("token", () => {
 describe("token", () => {

+ 1 - 1
tests/swap/migrations/deploy.js

@@ -2,7 +2,7 @@
 // single deploy script that's invoked from the CLI, injecting a provider
 // single deploy script that's invoked from the CLI, injecting a provider
 // configured from the workspace's Anchor.toml.
 // configured from the workspace's Anchor.toml.
 
 
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 
 
 module.exports = async function (provider) {
 module.exports = async function (provider) {
   // Configure client to use the provider.
   // Configure client to use the provider.

+ 1 - 1
tests/swap/tests/swap.js

@@ -1,5 +1,5 @@
 const { assert } = require("chai");
 const { assert } = require("chai");
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 const BN = anchor.BN;
 const BN = anchor.BN;
 const OpenOrders = require("@project-serum/serum").OpenOrders;
 const OpenOrders = require("@project-serum/serum").OpenOrders;
 const TOKEN_PROGRAM_ID = require("@solana/spl-token").TOKEN_PROGRAM_ID;
 const TOKEN_PROGRAM_ID = require("@solana/spl-token").TOKEN_PROGRAM_ID;

+ 2 - 2
tests/swap/tests/utils/index.js

@@ -9,9 +9,9 @@ const TOKEN_PROGRAM_ID = require("@solana/spl-token").TOKEN_PROGRAM_ID;
 const TokenInstructions = require("@project-serum/serum").TokenInstructions;
 const TokenInstructions = require("@project-serum/serum").TokenInstructions;
 const Market = require("@project-serum/serum").Market;
 const Market = require("@project-serum/serum").Market;
 const DexInstructions = require("@project-serum/serum").DexInstructions;
 const DexInstructions = require("@project-serum/serum").DexInstructions;
-const web3 = require("@project-serum/anchor").web3;
+const web3 = require("@coral-xyz/anchor").web3;
 const Connection = web3.Connection;
 const Connection = web3.Connection;
-const BN = require("@project-serum/anchor").BN;
+const BN = require("@coral-xyz/anchor").BN;
 const serumCmn = require("@project-serum/common");
 const serumCmn = require("@project-serum/common");
 const Account = web3.Account;
 const Account = web3.Account;
 const Transaction = web3.Transaction;
 const Transaction = web3.Transaction;

+ 1 - 1
tests/system-accounts/tests/system-accounts.js

@@ -1,4 +1,4 @@
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 const splToken = require("@solana/spl-token");
 const splToken = require("@solana/spl-token");
 const { assert } = require("chai");
 const { assert } = require("chai");
 
 

+ 1 - 1
tests/sysvars/tests/sysvars.js

@@ -1,4 +1,4 @@
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 const { assert } = require("chai");
 const { assert } = require("chai");
 
 
 describe("sysvars", () => {
 describe("sysvars", () => {

+ 1 - 1
tests/tictactoe/migrations/deploy.js

@@ -2,7 +2,7 @@
 // single deploy script that's invoked from the CLI, injecting a provider
 // single deploy script that's invoked from the CLI, injecting a provider
 // configured from the workspace's Anchor.toml.
 // configured from the workspace's Anchor.toml.
 
 
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 
 
 module.exports = async function (provider) {
 module.exports = async function (provider) {
   // Configure client to use the provider.
   // Configure client to use the provider.

+ 1 - 1
tests/tictactoe/tests/tictactoe.js

@@ -1,4 +1,4 @@
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 
 
 describe("tictactoe", () => {
 describe("tictactoe", () => {
   anchor.setProvider(anchor.AnchorProvider.env());
   anchor.setProvider(anchor.AnchorProvider.env());

+ 1 - 1
tests/typescript/migrations/deploy.ts

@@ -2,7 +2,7 @@
 // single deploy script that's invoked from the CLI, injecting a provider
 // single deploy script that's invoked from the CLI, injecting a provider
 // configured from the workspace's Anchor.toml.
 // configured from the workspace's Anchor.toml.
 
 
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 
 
 module.exports = async function (provider) {
 module.exports = async function (provider) {
   // Configure client to use the provider.
   // Configure client to use the provider.

+ 1 - 1
tests/typescript/tests/typescript.spec.ts

@@ -1,4 +1,4 @@
-import * as anchor from "@project-serum/anchor";
+import * as anchor from "@coral-xyz/anchor";
 
 
 describe("typescript", () => {
 describe("typescript", () => {
   // Configure the client to use the local cluster.
   // Configure the client to use the local cluster.

+ 2 - 2
tests/validator-clone/tests/validator-clone.ts

@@ -1,5 +1,5 @@
-import * as anchor from "@project-serum/anchor";
-import { Program } from "@project-serum/anchor";
+import * as anchor from "@coral-xyz/anchor";
+import { Program } from "@coral-xyz/anchor";
 import { assert } from "chai";
 import { assert } from "chai";
 import { ValidatorClone } from "../target/types/validator_clone";
 import { ValidatorClone } from "../target/types/validator_clone";
 
 

+ 36 - 36
tests/yarn.lock

@@ -16,14 +16,45 @@
   dependencies:
   dependencies:
     regenerator-runtime "^0.13.4"
     regenerator-runtime "^0.13.4"
 
 
-"@coral-xyz/borsh@^0.2.6":
-  version "0.2.6"
-  resolved "https://registry.yarnpkg.com/@coral-xyz/borsh/-/borsh-0.2.6.tgz#0f11b223bf2967574310705afd3c53ce26688ada"
-  integrity sha512-y6nmHw1bFcJib7sMHsQPpC8r47xhqDZVvhUdna7NUPzpSbOZG6f46N21+aXsQ2w/tG8Ggls488J/ZmwbgVmyjg==
+"@coral-xyz/anchor@=0.26.0", "@coral-xyz/anchor@file:../ts/packages/anchor":
+  version "0.26.0"
+  dependencies:
+    "@coral-xyz/borsh" "^0.26.0"
+    "@solana/web3.js" "^1.68.0"
+    base64-js "^1.5.1"
+    bn.js "^5.1.2"
+    bs58 "^4.0.1"
+    buffer-layout "^1.2.2"
+    camelcase "^6.3.0"
+    cross-fetch "^3.1.5"
+    crypto-hash "^1.3.0"
+    eventemitter3 "^4.0.7"
+    js-sha256 "^0.9.0"
+    pako "^2.0.3"
+    snake-case "^3.0.4"
+    superstruct "^0.15.4"
+    toml "^3.0.0"
+
+"@coral-xyz/borsh@^0.26.0":
+  version "0.26.0"
+  resolved "https://registry.yarnpkg.com/@coral-xyz/borsh/-/borsh-0.26.0.tgz#d054f64536d824634969e74138f9f7c52bbbc0d5"
+  integrity sha512-uCZ0xus0CszQPHYfWAqKS5swS1UxvePu83oOF+TWpUkedsNlg6p2p4azxZNSSqwXb9uXMFgxhuMBX9r3Xoi0vQ==
   dependencies:
   dependencies:
     bn.js "^5.1.2"
     bn.js "^5.1.2"
     buffer-layout "^1.2.0"
     buffer-layout "^1.2.0"
 
 
+"@coral-xyz/spl-associated-token-account@file:../ts/packages/spl-associated-token-account":
+  version "1.1.1"
+  dependencies:
+    "@coral-xyz/anchor" "=0.26.0"
+    "@native-to-anchor/buffer-layout" "=0.1.0"
+
+"@coral-xyz/spl-token@file:../ts/packages/spl-token":
+  version "0.26.0"
+  dependencies:
+    "@coral-xyz/anchor" "=0.26.0"
+    "@native-to-anchor/buffer-layout" "=0.1.0"
+
 "@native-to-anchor/buffer-layout@=0.1.0":
 "@native-to-anchor/buffer-layout@=0.1.0":
   version "0.1.0"
   version "0.1.0"
   resolved "https://registry.yarnpkg.com/@native-to-anchor/buffer-layout/-/buffer-layout-0.1.0.tgz#ff0cb66341bc820b8ee73bb1d1d43bae7e3554b0"
   resolved "https://registry.yarnpkg.com/@native-to-anchor/buffer-layout/-/buffer-layout-0.1.0.tgz#ff0cb66341bc820b8ee73bb1d1d43bae7e3554b0"
@@ -47,25 +78,6 @@
   resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.6.3.tgz#7eed12d9f4404b416999d0c87686836c4c5c9b94"
   resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.6.3.tgz#7eed12d9f4404b416999d0c87686836c4c5c9b94"
   integrity sha512-T04e4iTurVy7I8Sw4+c5OSN9/RkPlo1uKxAomtxQNLq8j1uPAqnsqG1bqvY3Jv7c13gyr6dui0zmh/I3+f/JaQ==
   integrity sha512-T04e4iTurVy7I8Sw4+c5OSN9/RkPlo1uKxAomtxQNLq8j1uPAqnsqG1bqvY3Jv7c13gyr6dui0zmh/I3+f/JaQ==
 
 
-"@project-serum/anchor@=0.25.0", "@project-serum/anchor@file:../ts/packages/anchor":
-  version "0.25.0"
-  dependencies:
-    "@coral-xyz/borsh" "^0.2.6"
-    "@solana/web3.js" "^1.68.0"
-    base64-js "^1.5.1"
-    bn.js "^5.1.2"
-    bs58 "^4.0.1"
-    buffer-layout "^1.2.2"
-    camelcase "^6.3.0"
-    cross-fetch "^3.1.5"
-    crypto-hash "^1.3.0"
-    eventemitter3 "^4.0.7"
-    js-sha256 "^0.9.0"
-    pako "^2.0.3"
-    snake-case "^3.0.4"
-    superstruct "^0.15.4"
-    toml "^3.0.0"
-
 "@project-serum/anchor@^0.11.1":
 "@project-serum/anchor@^0.11.1":
   version "0.11.1"
   version "0.11.1"
   resolved "https://registry.yarnpkg.com/@project-serum/anchor/-/anchor-0.11.1.tgz#155bff2c70652eafdcfd5559c81a83bb19cec9ff"
   resolved "https://registry.yarnpkg.com/@project-serum/anchor/-/anchor-0.11.1.tgz#155bff2c70652eafdcfd5559c81a83bb19cec9ff"
@@ -114,18 +126,6 @@
     bn.js "^5.1.2"
     bn.js "^5.1.2"
     buffer-layout "^1.2.0"
     buffer-layout "^1.2.0"
 
 
-"@project-serum/spl-associated-token-account@file:../ts/packages/spl-associated-token-account":
-  version "1.1.1"
-  dependencies:
-    "@native-to-anchor/buffer-layout" "=0.1.0"
-    "@project-serum/anchor" "=0.25.0"
-
-"@project-serum/spl-token@file:../ts/packages/spl-token":
-  version "3.3.0"
-  dependencies:
-    "@native-to-anchor/buffer-layout" "=0.1.0"
-    "@project-serum/anchor" "=0.25.0"
-
 "@solana/buffer-layout-utils@=0.2.0":
 "@solana/buffer-layout-utils@=0.2.0":
   version "0.2.0"
   version "0.2.0"
   resolved "https://registry.yarnpkg.com/@solana/buffer-layout-utils/-/buffer-layout-utils-0.2.0.tgz#b45a6cab3293a2eb7597cceb474f229889d875ca"
   resolved "https://registry.yarnpkg.com/@solana/buffer-layout-utils/-/buffer-layout-utils-0.2.0.tgz#b45a6cab3293a2eb7597cceb474f229889d875ca"
@@ -1428,4 +1428,4 @@ yn@^2.0.0:
 yocto-queue@^0.1.0:
 yocto-queue@^0.1.0:
   version "0.1.0"
   version "0.1.0"
   resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
   resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
-  integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==
+  integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==

+ 1 - 1
tests/zero-copy/migrations/deploy.js

@@ -2,7 +2,7 @@
 // single deploy script that's invoked from the CLI, injecting a provider
 // single deploy script that's invoked from the CLI, injecting a provider
 // configured from the workspace's Anchor.toml.
 // configured from the workspace's Anchor.toml.
 
 
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 
 
 module.exports = async function (provider) {
 module.exports = async function (provider) {
   // Configure client to use the provider.
   // Configure client to use the provider.

+ 1 - 1
tests/zero-copy/tests/zero-copy.js

@@ -1,4 +1,4 @@
-const anchor = require("@project-serum/anchor");
+const anchor = require("@coral-xyz/anchor");
 const { assert } = require("chai");
 const { assert } = require("chai");
 const nativeAssert = require("assert");
 const nativeAssert = require("assert");
 const PublicKey = anchor.web3.PublicKey;
 const PublicKey = anchor.web3.PublicKey;

+ 1 - 1
ts/package.json

@@ -1,5 +1,5 @@
 {
 {
-  "name": "@project-serum/monorepo",
+  "name": "@coral-xyz/monorepo",
   "private": true,
   "private": true,
   "workspaces": [
   "workspaces": [
     "packages/*",
     "packages/*",

+ 3 - 3
ts/packages/anchor/README.md

@@ -1,10 +1,10 @@
-# @project-serum/anchor
+# @coral-xyz/anchor
 
 
-[![npm](https://img.shields.io/npm/v/@project-serum/anchor.svg?color=blue)](https://www.npmjs.com/package/@project-serum/anchor)
+[![npm](https://img.shields.io/npm/v/@coral-xyz/anchor.svg?color=blue)](https://www.npmjs.com/package/@coral-xyz/anchor)
 [![Docs](https://img.shields.io/badge/docs-typedoc-blue)](https://coral-xyz.github.io/anchor/ts/index.html)
 [![Docs](https://img.shields.io/badge/docs-typedoc-blue)](https://coral-xyz.github.io/anchor/ts/index.html)
 
 
 TypeScript client for Anchor programs.
 TypeScript client for Anchor programs.
 
 
 ## Note
 ## Note
 
 
-* `@project-serum/anchor` depends on node.js native modules. Therefore, webpack 5 will not work with current version. You will either need to rollback to webpack 4, or use a polyfill for each missing dependency.
+- `@coral-xyz/anchor` depends on node.js native modules. Therefore, webpack 5 will not work with current version. You will either need to rollback to webpack 4, or use a polyfill for each missing dependency.

+ 1 - 1
ts/packages/anchor/package.json

@@ -1,5 +1,5 @@
 {
 {
-  "name": "@project-serum/anchor",
+  "name": "@coral-xyz/anchor",
   "version": "0.26.0",
   "version": "0.26.0",
   "description": "Anchor client",
   "description": "Anchor client",
   "module": "./dist/esm/index.js",
   "module": "./dist/esm/index.js",

+ 2 - 2
ts/packages/spl-associated-token-account/package.json

@@ -1,5 +1,5 @@
 {
 {
-  "name": "@project-serum/spl-associated-token-account",
+  "name": "@coral-xyz/spl-associated-token-account",
   "description": "Anchor client for Solana Program Library Associated Token Account",
   "description": "Anchor client for Solana Program Library Associated Token Account",
   "version": "1.1.1",
   "version": "1.1.1",
   "author": "acheron <acheroncrypto@gmail.com>",
   "author": "acheron <acheroncrypto@gmail.com>",
@@ -27,7 +27,7 @@
     "watch": "tsc -p tsconfig.cjs.json --watch"
     "watch": "tsc -p tsconfig.cjs.json --watch"
   },
   },
   "dependencies": {
   "dependencies": {
-    "@project-serum/anchor": "=0.26.0",
+    "@coral-xyz/anchor": "=0.26.0",
     "@native-to-anchor/buffer-layout": "=0.1.0"
     "@native-to-anchor/buffer-layout": "=0.1.0"
   },
   },
   "devDependencies": {
   "devDependencies": {

Some files were not shown because too many files changed in this diff