Skip to content

Commit 6041842

Browse files
author
Edward
committed
Replace @coral-xyz/anchor with @anchor-lang/core
1 parent 3f8084d commit 6041842

3 files changed

Lines changed: 14 additions & 15 deletions

File tree

scripts/lib/command-help.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export function commandHelp() {
2-
console.log("Usage: yarn sync-package-json <command> [options]");
2+
console.log("Usage: npm run sync-package-json <command> [options]");
33
console.log("");
44
console.log("Commands:");
55
console.log(" check <path> Check package.json files");
@@ -12,15 +12,15 @@ export function commandHelp() {
1212
console.log(" path Path to directory");
1313
console.log("");
1414
console.log("Examples:");
15-
console.log(" yarn sync-package-json check");
16-
console.log(" yarn sync-package-json check basics");
17-
console.log(" yarn sync-package-json list");
18-
console.log(" yarn sync-package-json list basics");
19-
console.log(" yarn sync-package-json help");
20-
console.log(" yarn sync-package-json set @coral-xyz/anchor@0.29.0");
21-
console.log(" yarn sync-package-json set @coral-xyz/anchor@0.29.0 basics");
22-
console.log(" yarn sync-package-json update");
23-
console.log(" yarn sync-package-json update basics");
24-
console.log(" yarn sync-package-json update . @solana/web3.js @solana/spl-token");
15+
console.log(" npm run sync-package-json check");
16+
console.log(" npm run sync-package-json check basics");
17+
console.log(" npm run sync-package-json list");
18+
console.log(" npm run sync-package-json list basics");
19+
console.log(" npm run sync-package-json help");
20+
console.log(" npm run sync-package-json set @anchor-lang/core@0.29.0");
21+
console.log(" npm run sync-package-json set @anchor-lang/core@0.29.0 basics");
22+
console.log(" npm run sync-package-json update");
23+
console.log(" npm run sync-package-json update basics");
24+
console.log(" npm run sync-package-json update . @solana/web3.js @solana/spl-token");
2525
process.exit(0);
2626
}

tokens/token-2022/nft-meta-data-pointer/anchor-example/app/components/MintNftButton.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { Button, HStack, VStack } from "@chakra-ui/react";
2-
import { web3 } from "@coral-xyz/anchor";
32
import { ASSOCIATED_TOKEN_PROGRAM_ID, getAssociatedTokenAddressSync, TOKEN_2022_PROGRAM_ID } from "@solana/spl-token";
43
import { useConnection, useWallet } from "@solana/wallet-adapter-react";
5-
import { Keypair, PublicKey, SystemProgram } from "@solana/web3.js";
4+
import { Keypair, PublicKey, SYSVAR_RENT_PUBKEY, SystemProgram } from "@solana/web3.js";
65
import Image from "next/image";
76
import { useCallback, useState } from "react";
87
import { useGameState } from "@/contexts/GameStateProvider";
@@ -39,7 +38,7 @@ const MintNftButton = () => {
3938
tokenProgram: TOKEN_2022_PROGRAM_ID,
4039
tokenAccount: destinationTokenAccount,
4140
mint: mint.publicKey,
42-
rent: web3.SYSVAR_RENT_PUBKEY,
41+
rent: SYSVAR_RENT_PUBKEY,
4342
associatedTokenProgram: ASSOCIATED_TOKEN_PROGRAM_ID,
4443
nftAuthority: nftAuthority[0],
4544
})

tokens/token-2022/nft-meta-data-pointer/anchor-example/app/contexts/GameStateProvider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { BN } from "@coral-xyz/anchor";
1+
import { BN } from "@anchor-lang/core";
22
import { useConnection, useWallet } from "@solana/wallet-adapter-react";
33
import { PublicKey } from "@solana/web3.js";
44
import { createContext, useContext, useEffect, useState } from "react";

0 commit comments

Comments
 (0)