|
@@ -122,7 +122,7 @@ describe("getCreateTokenInstructions", () => {
|
|
|
|
|
|
|
|
it("should create basic token instructions with default values", () => {
|
|
it("should create basic token instructions with default values", () => {
|
|
|
const args: GetCreateTokenInstructionsArgs = {
|
|
const args: GetCreateTokenInstructionsArgs = {
|
|
|
- payer: mockPayer,
|
|
|
|
|
|
|
+ feePayer: mockPayer,
|
|
|
mint: mockMint,
|
|
mint: mockMint,
|
|
|
metadataAddress: mockMetadataAddress,
|
|
metadataAddress: mockMetadataAddress,
|
|
|
metadata,
|
|
metadata,
|
|
@@ -174,7 +174,7 @@ describe("getCreateTokenInstructions", () => {
|
|
|
|
|
|
|
|
it("should throw error for unsupported token program", () => {
|
|
it("should throw error for unsupported token program", () => {
|
|
|
const args: GetCreateTokenInstructionsArgs = {
|
|
const args: GetCreateTokenInstructionsArgs = {
|
|
|
- payer: mockPayer,
|
|
|
|
|
|
|
+ feePayer: mockPayer,
|
|
|
mint: mockMint,
|
|
mint: mockMint,
|
|
|
metadataAddress: mockMetadataAddress,
|
|
metadataAddress: mockMetadataAddress,
|
|
|
metadata,
|
|
metadata,
|
|
@@ -189,7 +189,7 @@ describe("getCreateTokenInstructions", () => {
|
|
|
describe("should use original token program", () => {
|
|
describe("should use original token program", () => {
|
|
|
it("should use original token program when specified", () => {
|
|
it("should use original token program when specified", () => {
|
|
|
const args: GetCreateTokenInstructionsArgs = {
|
|
const args: GetCreateTokenInstructionsArgs = {
|
|
|
- payer: mockPayer,
|
|
|
|
|
|
|
+ feePayer: mockPayer,
|
|
|
mint: mockMint,
|
|
mint: mockMint,
|
|
|
metadataAddress: mockMetadataAddress,
|
|
metadataAddress: mockMetadataAddress,
|
|
|
tokenProgram: TOKEN_PROGRAM_ADDRESS,
|
|
tokenProgram: TOKEN_PROGRAM_ADDRESS,
|
|
@@ -214,7 +214,7 @@ describe("getCreateTokenInstructions", () => {
|
|
|
|
|
|
|
|
it("should use custom decimals when provided", () => {
|
|
it("should use custom decimals when provided", () => {
|
|
|
const args: GetCreateTokenInstructionsArgs = {
|
|
const args: GetCreateTokenInstructionsArgs = {
|
|
|
- payer: mockPayer,
|
|
|
|
|
|
|
+ feePayer: mockPayer,
|
|
|
metadataAddress: mockMetadataAddress,
|
|
metadataAddress: mockMetadataAddress,
|
|
|
mint: mockMint,
|
|
mint: mockMint,
|
|
|
decimals: 6,
|
|
decimals: 6,
|
|
@@ -233,7 +233,7 @@ describe("getCreateTokenInstructions", () => {
|
|
|
|
|
|
|
|
it("should use custom mint and freeze authorities when provided", () => {
|
|
it("should use custom mint and freeze authorities when provided", () => {
|
|
|
const args: GetCreateTokenInstructionsArgs = {
|
|
const args: GetCreateTokenInstructionsArgs = {
|
|
|
- payer: mockPayer,
|
|
|
|
|
|
|
+ feePayer: mockPayer,
|
|
|
mint: mockMint,
|
|
mint: mockMint,
|
|
|
metadataAddress: mockMetadataAddress,
|
|
metadataAddress: mockMetadataAddress,
|
|
|
metadata,
|
|
metadata,
|
|
@@ -260,7 +260,7 @@ describe("getCreateTokenInstructions", () => {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const args: GetCreateTokenInstructionsArgs = {
|
|
const args: GetCreateTokenInstructionsArgs = {
|
|
|
- payer: mockPayer,
|
|
|
|
|
|
|
+ feePayer: mockPayer,
|
|
|
mint: mockMint,
|
|
mint: mockMint,
|
|
|
metadataAddress: mockMetadataAddress,
|
|
metadataAddress: mockMetadataAddress,
|
|
|
metadata,
|
|
metadata,
|
|
@@ -297,7 +297,7 @@ describe("getCreateTokenInstructions", () => {
|
|
|
const customUpdateAuthority = { address: "customUpdateAuth" } as KeyPairSigner;
|
|
const customUpdateAuthority = { address: "customUpdateAuth" } as KeyPairSigner;
|
|
|
|
|
|
|
|
const args: GetCreateTokenInstructionsArgs = {
|
|
const args: GetCreateTokenInstructionsArgs = {
|
|
|
- payer: mockPayer,
|
|
|
|
|
|
|
+ feePayer: mockPayer,
|
|
|
mint: mockMint,
|
|
mint: mockMint,
|
|
|
metadataAddress: mockMetadataAddress,
|
|
metadataAddress: mockMetadataAddress,
|
|
|
updateAuthority: customUpdateAuthority,
|
|
updateAuthority: customUpdateAuthority,
|
|
@@ -317,7 +317,7 @@ describe("getCreateTokenInstructions", () => {
|
|
|
describe("should use token22 program", () => {
|
|
describe("should use token22 program", () => {
|
|
|
it("should use Token-2022 program when specified", () => {
|
|
it("should use Token-2022 program when specified", () => {
|
|
|
const args: GetCreateTokenInstructionsArgs = {
|
|
const args: GetCreateTokenInstructionsArgs = {
|
|
|
- payer: mockPayer,
|
|
|
|
|
|
|
+ feePayer: mockPayer,
|
|
|
mint: mockMint,
|
|
mint: mockMint,
|
|
|
metadataAddress: mockMint.address,
|
|
metadataAddress: mockMint.address,
|
|
|
tokenProgram: TOKEN_2022_PROGRAM_ADDRESS,
|
|
tokenProgram: TOKEN_2022_PROGRAM_ADDRESS,
|
|
@@ -342,7 +342,7 @@ describe("getCreateTokenInstructions", () => {
|
|
|
|
|
|
|
|
it("should use custom decimals when provided", () => {
|
|
it("should use custom decimals when provided", () => {
|
|
|
const args: GetCreateTokenInstructionsArgs = {
|
|
const args: GetCreateTokenInstructionsArgs = {
|
|
|
- payer: mockPayer,
|
|
|
|
|
|
|
+ feePayer: mockPayer,
|
|
|
mint: mockMint,
|
|
mint: mockMint,
|
|
|
metadataAddress: mockMint.address,
|
|
metadataAddress: mockMint.address,
|
|
|
decimals: 6,
|
|
decimals: 6,
|
|
@@ -362,7 +362,7 @@ describe("getCreateTokenInstructions", () => {
|
|
|
|
|
|
|
|
it("should use custom mint and freeze authorities when provided", () => {
|
|
it("should use custom mint and freeze authorities when provided", () => {
|
|
|
const args: GetCreateTokenInstructionsArgs = {
|
|
const args: GetCreateTokenInstructionsArgs = {
|
|
|
- payer: mockPayer,
|
|
|
|
|
|
|
+ feePayer: mockPayer,
|
|
|
mint: mockMint,
|
|
mint: mockMint,
|
|
|
metadataAddress: mockMint.address,
|
|
metadataAddress: mockMint.address,
|
|
|
metadata,
|
|
metadata,
|
|
@@ -390,7 +390,7 @@ describe("getCreateTokenInstructions", () => {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const args: GetCreateTokenInstructionsArgs = {
|
|
const args: GetCreateTokenInstructionsArgs = {
|
|
|
- payer: mockPayer,
|
|
|
|
|
|
|
+ feePayer: mockPayer,
|
|
|
mint: mockMint,
|
|
mint: mockMint,
|
|
|
metadataAddress: mockMint.address,
|
|
metadataAddress: mockMint.address,
|
|
|
metadata,
|
|
metadata,
|
|
@@ -435,7 +435,7 @@ describe("getCreateTokenInstructions", () => {
|
|
|
const customUpdateAuthority = { address: "customUpdateAuth" } as KeyPairSigner;
|
|
const customUpdateAuthority = { address: "customUpdateAuth" } as KeyPairSigner;
|
|
|
|
|
|
|
|
const args: GetCreateTokenInstructionsArgs = {
|
|
const args: GetCreateTokenInstructionsArgs = {
|
|
|
- payer: mockPayer,
|
|
|
|
|
|
|
+ feePayer: mockPayer,
|
|
|
mint: mockMint,
|
|
mint: mockMint,
|
|
|
metadataAddress: mockMint.address,
|
|
metadataAddress: mockMint.address,
|
|
|
updateAuthority: customUpdateAuthority,
|
|
updateAuthority: customUpdateAuthority,
|