From e1ec67eb8f504c267f53ec0bf0ea6908bd42b5b4 Mon Sep 17 00:00:00 2001 From: Steven Luscher Date: Fri, 14 Jun 2024 11:11:11 -0700 Subject: [PATCH] Rewrite the legacy token tests without `@solana/spl-token` (#2821) --- package.json | 1 - packages/library-legacy/package.json | 1 - .../library-legacy/test/connection.test.ts | 154 ++++++++---------- pnpm-lock.yaml | 138 +--------------- .../legacy-token-test-mint-account.json | 14 ++ .../legacy-token-test-token-account.json | 14 ++ .../legacy-token-test-token-owner.json | 11 ++ 7 files changed, 106 insertions(+), 227 deletions(-) create mode 100644 scripts/fixtures/legacy-token-test-mint-account.json create mode 100644 scripts/fixtures/legacy-token-test-token-account.json create mode 100644 scripts/fixtures/legacy-token-test-token-owner.json diff --git a/package.json b/package.json index adf7b376f13..5a597707814 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,6 @@ "packageManager": "pnpm@9.1.0", "pnpm": { "overrides": { - "@solana/web3.js": "workspace:*", "@wallet-standard/base": "pre", "conventional-changelog-conventionalcommits": ">= 8.0.0", "jsdom": "^22", diff --git a/packages/library-legacy/package.json b/packages/library-legacy/package.json index 49c943a64a1..05a39cf48b3 100644 --- a/packages/library-legacy/package.json +++ b/packages/library-legacy/package.json @@ -88,7 +88,6 @@ "@rollup/plugin-node-resolve": "^15.2.3", "@rollup/plugin-replace": "^5.0.7", "@rollup/plugin-terser": "^0.4.4", - "@solana/spl-token": "^0.4.6", "@types/bn.js": "^5.1.5", "@types/bs58": "^4.0.1", "@types/chai-as-promised": "^7.1.8", diff --git a/packages/library-legacy/test/connection.test.ts b/packages/library-legacy/test/connection.test.ts index 74129fa288f..2cb63ee499d 100644 --- a/packages/library-legacy/test/connection.test.ts +++ b/packages/library-legacy/test/connection.test.ts @@ -1,6 +1,5 @@ import bs58 from 'bs58'; import {Buffer} from 'buffer'; -import * as splToken from '@solana/spl-token'; import {expect, use} from 'chai'; import chaiAsPromised from 'chai-as-promised'; import {Agent as HttpAgent} from 'http'; @@ -4919,90 +4918,68 @@ describe('Connection', function () { const connection = new Connection(url, 'confirmed'); const newAccount = PublicKey.unique(); - let payerKeypair = new Keypair(); - let testTokenMintPubkey: PublicKey; - let testOwnerKeypair: Keypair; - let testTokenAccountPubkey: PublicKey; - let testSignature: TransactionSignature; + // See scripts/fixtures/legacy-token-test-mint-account.json + const testTokenMintPubkey = new PublicKey( + '7MbpdfJa5xqwexkp6WUvkYHTPo4VgxYACDBNFWYLwCdo', + ); + // See scripts/fixtures/legacy-token-test-token-owner.json + const testOwnerKeypair = Keypair.fromSecretKey( + // Public key: `AVGuygVeBmbYiJ47V7tgBNLSukNqW7pWZYJsKUNWhHpc` + new Uint8Array([ + 153, 120, 247, 45, 160, 119, 144, 219, 220, 209, 73, 91, 210, 102, 31, + 136, 155, 12, 68, 27, 226, 215, 61, 214, 10, 245, 247, 180, 236, 63, + 100, 202, 140, 247, 112, 54, 120, 32, 168, 118, 72, 115, 190, 34, 171, + 126, 15, 119, 252, 173, 50, 173, 8, 10, 96, 239, 21, 32, 94, 67, 37, + 43, 145, 249, + ]), + ); + // See scripts/fixtures/legacy-token-test-token-account.json + const testTokenAccountPubkey = new PublicKey( + 'EryTMgfSEabo5Fc7dN5z3nBQKzfHUJRpHAMnXdCrTq4S', + ); + let selfTransferSignature: TransactionSignature; // Setup token mints and accounts for token tests before(async function () { this.timeout(30 * 1000); - await connection.confirmTransaction( - await connection.requestAirdrop(payerKeypair.publicKey, 100000000000), - ); - - const mintOwnerKeypair = new Keypair(); - const accountOwnerKeypair = new Keypair(); - const mintPubkey = await splToken.createMint( - connection as any, - payerKeypair, - mintOwnerKeypair.publicKey, - null, // freeze authority - 2, // decimals - ); - - const tokenAccountPubkey = await splToken.createAccount( - connection as any, - payerKeypair, - mintPubkey, - accountOwnerKeypair.publicKey, - ); - - await splToken.mintTo( - connection as any, - payerKeypair, - mintPubkey, - tokenAccountPubkey, - mintOwnerKeypair, - 11111, - ); - - const mintPubkey2 = await splToken.createMint( - connection as any, - payerKeypair, - mintOwnerKeypair.publicKey, - null, // freeze authority - 2, // decimals - ); - - const tokenAccountPubkey2 = await splToken.createAccount( - connection as any, - payerKeypair, - mintPubkey2, - accountOwnerKeypair.publicKey, - ); - - await splToken.mintTo( - connection as any, - payerKeypair, - mintPubkey2, - tokenAccountPubkey2, - mintOwnerKeypair, - 100, - ); - - const tokenAccountDestPubkey = await splToken.createAccount( - connection as any, - payerKeypair, - mintPubkey, - accountOwnerKeypair.publicKey, - new Keypair() as any, + const selfTransferTransaction = new Transaction().add( + new TransactionInstruction({ + keys: [ + { + pubkey: testTokenAccountPubkey, + isSigner: false, + isWritable: true, + }, + { + pubkey: testTokenAccountPubkey, + isSigner: false, + isWritable: true, + }, + { + pubkey: testOwnerKeypair.publicKey, + isSigner: true, + isWritable: false, + }, + ], + programId: new PublicKey( + 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA', + ), + data: Buffer.from( + // prettier-ignore + [ + 3, // TRANSFER instruction + 1, 0, 0, 0, 0, 0, 0, 0, // 1 Lamport + ], + ), + }), ); - testSignature = await splToken.transfer( - connection as any, - payerKeypair, - tokenAccountPubkey, - tokenAccountDestPubkey, - accountOwnerKeypair, - 1, + selfTransferSignature = await sendAndConfirmTransaction( + connection, + selfTransferTransaction, + [testOwnerKeypair], ); - - testTokenMintPubkey = mintPubkey as PublicKey; - testOwnerKeypair = accountOwnerKeypair; - testTokenAccountPubkey = tokenAccountPubkey as PublicKey; }); it('get token supply', async () => { @@ -5020,7 +4997,7 @@ describe('Connection', function () { await connection.getTokenLargestAccounts(testTokenMintPubkey) ).value; - expect(largestAccounts).to.have.length(2); + expect(largestAccounts).to.have.length(1); const largestAccount = largestAccounts[0]; expect(largestAccount.address.equals(testTokenAccountPubkey)).to.be .true; @@ -5033,14 +5010,15 @@ describe('Connection', function () { }); it('get confirmed token transaction', async () => { - const parsedTx = - await connection.getParsedConfirmedTransaction(testSignature); + const parsedTx = await connection.getParsedConfirmedTransaction( + selfTransferSignature, + ); if (parsedTx === null) { expect(parsedTx).not.to.be.null; return; } const {signatures, message} = parsedTx.transaction; - expect(signatures[0]).to.eq(testSignature); + expect(signatures[0]).to.eq(selfTransferSignature); const ix = message.instructions[0]; if ('parsed' in ix) { expect(ix.program).to.eq('spl-token'); @@ -5089,7 +5067,7 @@ describe('Connection', function () { await connection.getMultipleParsedAccounts([ testTokenAccountPubkey, testTokenMintPubkey, - payerKeypair.publicKey, + testOwnerKeypair.publicKey, newAccount, ]) ).value; @@ -5121,12 +5099,12 @@ describe('Connection', function () { expect(parsedTokenMint).to.be.ok; } - const unparsedPayerAccount = accounts[2]; - if (unparsedPayerAccount) { - const data = unparsedPayerAccount.data; + const unparsedOwnerAccount = accounts[2]; + if (unparsedOwnerAccount) { + const data = unparsedOwnerAccount.data; expect(Buffer.isBuffer(data)).to.be.true; } else { - expect(unparsedPayerAccount).to.be.ok; + expect(unparsedOwnerAccount).to.be.ok; } const unknownAccount = accounts[3]; @@ -5175,14 +5153,14 @@ describe('Connection', function () { mint: testTokenMintPubkey, }) ).value; - expect(accountsWithMintFilter).to.have.length(2); + expect(accountsWithMintFilter).to.have.length(1); const accountsWithProgramFilter = ( await connection.getTokenAccountsByOwner(testOwnerKeypair.publicKey, { programId: TOKEN_PROGRAM_ID, }) ).value; - expect(accountsWithProgramFilter).to.have.length(3); + expect(accountsWithProgramFilter).to.have.length(1); const noAccounts = ( await connection.getTokenAccountsByOwner(newAccount, { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 902bbb4f513..49b6dbf67e4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,7 +5,6 @@ settings: excludeLinksFromLockfile: false overrides: - '@solana/web3.js': workspace:* '@wallet-standard/base': pre conventional-changelog-conventionalcommits: '>= 8.0.0' jsdom: ^22 @@ -290,7 +289,7 @@ importers: version: 5.4.5 devDependencies: '@solana/web3.js': - specifier: workspace:* + specifier: workspace:../library-legacy version: link:../library-legacy packages/crypto-impl: {} @@ -514,9 +513,6 @@ importers: '@rollup/plugin-terser': specifier: ^0.4.4 version: 0.4.4(rollup@4.18.0) - '@solana/spl-token': - specifier: ^0.4.6 - version: 0.4.6(fastestsmallesttextencoderdecoder@1.0.22) '@types/bn.js': specifier: ^5.1.5 version: 5.1.5 @@ -2993,35 +2989,10 @@ packages: '@sinonjs/text-encoding@0.7.2': resolution: {integrity: sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==} - '@solana/buffer-layout-utils@0.2.0': - resolution: {integrity: sha512-szG4sxgJGktbuZYDg2FfNmkMi0DYQoVjN2h7ta1W1hPrwzarcFLBq9UpX1UjNXsNpT9dn+chgprtWGioUAr4/g==} - engines: {node: '>= 10'} - '@solana/buffer-layout@4.0.1': resolution: {integrity: sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA==} engines: {node: '>=5.10'} - '@solana/codecs-core@2.0.0-preview.2': - resolution: {integrity: sha512-gLhCJXieSCrAU7acUJjbXl+IbGnqovvxQLlimztPoGgfLQ1wFYu+XJswrEVQqknZYK1pgxpxH3rZ+OKFs0ndQg==} - - '@solana/codecs-data-structures@2.0.0-preview.2': - resolution: {integrity: sha512-Xf5vIfromOZo94Q8HbR04TbgTwzigqrKII0GjYr21K7rb3nba4hUW2ir8kguY7HWFBcjHGlU5x3MevKBOLp3Zg==} - - '@solana/codecs-numbers@2.0.0-preview.2': - resolution: {integrity: sha512-aLZnDTf43z4qOnpTcDsUVy1Ci9im1Md8thWipSWbE+WM9ojZAx528oAql+Cv8M8N+6ALKwgVRhPZkto6E59ARw==} - - '@solana/codecs-strings@2.0.0-preview.2': - resolution: {integrity: sha512-EgBwY+lIaHHgMJIqVOGHfIfpdmmUDNoNO/GAUGeFPf+q0dF+DtwhJPEMShhzh64X2MeCZcmSO6Kinx0Bvmmz2g==} - peerDependencies: - fastestsmallesttextencoderdecoder: ^1.0.22 - - '@solana/codecs@2.0.0-preview.2': - resolution: {integrity: sha512-4HHzCD5+pOSmSB71X6w9ptweV48Zj1Vqhe732+pcAQ2cMNnN0gMPMdDq7j3YwaZDZ7yrILVV/3+HTnfT77t2yA==} - - '@solana/errors@2.0.0-preview.2': - resolution: {integrity: sha512-H2DZ1l3iYF5Rp5pPbJpmmtCauWeQXRJapkDg8epQ8BJ7cA2Ut/QEtC3CMmw/iMTcuS6uemFNLcWvlOfoQhvQuA==} - hasBin: true - '@solana/eslint-config-solana@3.0.3': resolution: {integrity: sha512-yTaeCbOBwjmK4oUkknixOpwOzzAK8+4YWvJEJFNHuueESetieDnAeEHV7rzJllFgHEWa9nXps9Q3aD4/XJp71A==} peerDependencies: @@ -3035,36 +3006,11 @@ packages: eslint-plugin-typescript-sort-keys: ^3.2.0 typescript: ^5.1.6 - '@solana/options@2.0.0-preview.2': - resolution: {integrity: sha512-FAHqEeH0cVsUOTzjl5OfUBw2cyT8d5Oekx4xcn5hn+NyPAfQJgM3CEThzgRD6Q/4mM5pVUnND3oK/Mt1RzSE/w==} - '@solana/prettier-config-solana@0.0.5': resolution: {integrity: sha512-igtLH1QaX5xzSLlqteexRIg9X1QKA03xKYQc2qY1TrMDDhxKXoRZOStQPWdita2FVJzxTGz/tdMGC1vS0biRcg==} peerDependencies: prettier: ^3.2.0 - '@solana/spl-token-group@0.0.4': - resolution: {integrity: sha512-7+80nrEMdUKlK37V6kOe024+T7J4nNss0F8LQ9OOPYdWCCfJmsGUzVx2W3oeizZR4IHM6N4yC9v1Xqwc3BTPWw==} - engines: {node: '>=16'} - peerDependencies: - '@solana/web3.js': workspace:* - - '@solana/spl-token-metadata@0.1.4': - resolution: {integrity: sha512-N3gZ8DlW6NWDV28+vCCDJoTqaCZiF/jDUnk3o8GRkAFzHObiR60Bs1gXHBa8zCPdvOwiG6Z3dg5pg7+RW6XNsQ==} - engines: {node: '>=16'} - peerDependencies: - '@solana/web3.js': workspace:* - - '@solana/spl-token@0.4.6': - resolution: {integrity: sha512-1nCnUqfHVtdguFciVWaY/RKcQz1IF4b31jnKgAmjU9QVN1q7dRUkTEWJZgTYIEtsULjVnC9jRqlhgGN39WbKKA==} - engines: {node: '>=16'} - peerDependencies: - '@solana/web3.js': workspace:* - - '@solana/spl-type-length-value@0.1.0': - resolution: {integrity: sha512-JBMGB0oR4lPttOZ5XiUGyvylwLQjt1CPJa6qQ5oM+MBCndfjz2TKKkw0eATlLLcYmq1jBVsNlJ2cD6ns2GR7lA==} - engines: {node: '>=16'} - '@solana/wallet-standard-features@1.2.0': resolution: {integrity: sha512-tUd9srDLkRpe1BYg7we+c4UhRQkq+XQWswsr/L1xfGmoRDF47BPSXf4zE7ZU2GRBGvxtGt7lwJVAufQyQYhxTQ==} engines: {node: '>=16'} @@ -3756,9 +3702,6 @@ packages: resolution: {integrity: sha512-trfYco6AoZ+rKhKnxA0hgX0HAbVP/s808/EuDSe2JDzUnCp/xAsli35Orvk67UrTEcwuxZqYZDmfA2RXJgxVvA==} engines: {node: '>= 10.0.0'} - bignumber.js@9.1.1: - resolution: {integrity: sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==} - binary-extensions@2.2.0: resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} engines: {node: '>=8'} @@ -10142,54 +10085,10 @@ snapshots: '@sinonjs/text-encoding@0.7.2': {} - '@solana/buffer-layout-utils@0.2.0': - dependencies: - '@solana/buffer-layout': 4.0.1 - '@solana/web3.js': link:packages/library-legacy - bigint-buffer: 1.1.5 - bignumber.js: 9.1.1 - '@solana/buffer-layout@4.0.1': dependencies: buffer: 6.0.3 - '@solana/codecs-core@2.0.0-preview.2': - dependencies: - '@solana/errors': 2.0.0-preview.2 - - '@solana/codecs-data-structures@2.0.0-preview.2': - dependencies: - '@solana/codecs-core': 2.0.0-preview.2 - '@solana/codecs-numbers': 2.0.0-preview.2 - '@solana/errors': 2.0.0-preview.2 - - '@solana/codecs-numbers@2.0.0-preview.2': - dependencies: - '@solana/codecs-core': 2.0.0-preview.2 - '@solana/errors': 2.0.0-preview.2 - - '@solana/codecs-strings@2.0.0-preview.2(fastestsmallesttextencoderdecoder@1.0.22)': - dependencies: - '@solana/codecs-core': 2.0.0-preview.2 - '@solana/codecs-numbers': 2.0.0-preview.2 - '@solana/errors': 2.0.0-preview.2 - fastestsmallesttextencoderdecoder: 1.0.22 - - '@solana/codecs@2.0.0-preview.2(fastestsmallesttextencoderdecoder@1.0.22)': - dependencies: - '@solana/codecs-core': 2.0.0-preview.2 - '@solana/codecs-data-structures': 2.0.0-preview.2 - '@solana/codecs-numbers': 2.0.0-preview.2 - '@solana/codecs-strings': 2.0.0-preview.2(fastestsmallesttextencoderdecoder@1.0.22) - '@solana/options': 2.0.0-preview.2 - transitivePeerDependencies: - - fastestsmallesttextencoderdecoder - - '@solana/errors@2.0.0-preview.2': - dependencies: - chalk: 5.3.0 - commander: 12.1.0 - '@solana/eslint-config-solana@3.0.3(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-plugin-jest@27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(jest@30.0.0-alpha.4(@types/node@18.19.21)(ts-node@10.9.2(@swc/core@1.3.93(@swc/helpers@0.5.11))(@types/node@18.19.21)(typescript@5.4.5)))(typescript@5.4.5))(eslint-plugin-react-hooks@4.6.2(eslint@8.57.0))(eslint-plugin-simple-import-sort@10.0.0(eslint@8.57.0))(eslint-plugin-sort-keys-fix@1.1.2)(eslint-plugin-typescript-sort-keys@3.2.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5)': dependencies: '@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5) @@ -10202,43 +10101,10 @@ snapshots: eslint-plugin-typescript-sort-keys: 3.2.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5) typescript: 5.4.5 - '@solana/options@2.0.0-preview.2': - dependencies: - '@solana/codecs-core': 2.0.0-preview.2 - '@solana/codecs-numbers': 2.0.0-preview.2 - '@solana/prettier-config-solana@0.0.5(prettier@3.3.1)': dependencies: prettier: 3.3.1 - '@solana/spl-token-group@0.0.4(fastestsmallesttextencoderdecoder@1.0.22)': - dependencies: - '@solana/codecs': 2.0.0-preview.2(fastestsmallesttextencoderdecoder@1.0.22) - '@solana/spl-type-length-value': 0.1.0 - transitivePeerDependencies: - - fastestsmallesttextencoderdecoder - - '@solana/spl-token-metadata@0.1.4(fastestsmallesttextencoderdecoder@1.0.22)': - dependencies: - '@solana/codecs': 2.0.0-preview.2(fastestsmallesttextencoderdecoder@1.0.22) - '@solana/spl-type-length-value': 0.1.0 - transitivePeerDependencies: - - fastestsmallesttextencoderdecoder - - '@solana/spl-token@0.4.6(fastestsmallesttextencoderdecoder@1.0.22)': - dependencies: - '@solana/buffer-layout': 4.0.1 - '@solana/buffer-layout-utils': 0.2.0 - '@solana/spl-token-group': 0.0.4(fastestsmallesttextencoderdecoder@1.0.22) - '@solana/spl-token-metadata': 0.1.4(fastestsmallesttextencoderdecoder@1.0.22) - buffer: 6.0.3 - transitivePeerDependencies: - - fastestsmallesttextencoderdecoder - - '@solana/spl-type-length-value@0.1.0': - dependencies: - buffer: 6.0.3 - '@solana/wallet-standard-features@1.2.0': dependencies: '@wallet-standard/base': 0.0.0-20240607222957 @@ -11032,8 +10898,6 @@ snapshots: dependencies: bindings: 1.5.0 - bignumber.js@9.1.1: {} - binary-extensions@2.2.0: {} bindings@1.5.0: diff --git a/scripts/fixtures/legacy-token-test-mint-account.json b/scripts/fixtures/legacy-token-test-mint-account.json new file mode 100644 index 00000000000..5842cbfaa08 --- /dev/null +++ b/scripts/fixtures/legacy-token-test-mint-account.json @@ -0,0 +1,14 @@ +{ + "pubkey": "7MbpdfJa5xqwexkp6WUvkYHTPo4VgxYACDBNFWYLwCdo", + "account": { + "lamports": 1461600, + "data": [ + "AQAAAHcJbkUYh4l63GiAnsWEYIXJ+GFRCPDM7Llpzw531Qu8ZysAAAAAAAACAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "base64" + ], + "owner": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", + "executable": false, + "rentEpoch": 0, + "space": 82 + } +} diff --git a/scripts/fixtures/legacy-token-test-token-account.json b/scripts/fixtures/legacy-token-test-token-account.json new file mode 100644 index 00000000000..99a33e0eb15 --- /dev/null +++ b/scripts/fixtures/legacy-token-test-token-account.json @@ -0,0 +1,14 @@ +{ + "pubkey": "EryTMgfSEabo5Fc7dN5z3nBQKzfHUJRpHAMnXdCrTq4S", + "account": { + "lamports": 2039280, + "data": [ + "Xm0cOPd0hEH7bBdAi+cMVTdGREX7rlH2xK4VEXbE7SKM93A2eCCodkhzviKrfg93/K0yrQgKYO8VIF5DJSuR+WYrAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "base64" + ], + "owner": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", + "executable": false, + "rentEpoch": 0, + "space": 165 + } +} diff --git a/scripts/fixtures/legacy-token-test-token-owner.json b/scripts/fixtures/legacy-token-test-token-owner.json new file mode 100644 index 00000000000..852550df3ee --- /dev/null +++ b/scripts/fixtures/legacy-token-test-token-owner.json @@ -0,0 +1,11 @@ +{ + "pubkey": "AVGuygVeBmbYiJ47V7tgBNLSukNqW7pWZYJsKUNWhHpc", + "account": { + "lamports": 10000000000, + "data": ["", "base64"], + "owner": "11111111111111111111111111111111", + "executable": false, + "rentEpoch": 0, + "space": 0 + } +}