Merge pull request #34 from eibelsalil/main

fixed token deploy
This commit is contained in:
ARYAN
2024-12-22 04:25:43 +05:30
committed by GitHub
2 changed files with 6 additions and 4 deletions

View File

@@ -18,7 +18,6 @@
"author": "",
"license": "ISC",
"dependencies": {
"@raydium-io/raydium-sdk-v2": "0.1.95-alpha",
"@bonfida/spl-name-service": "^3.0.7",
"@coral-xyz/anchor": "0.29",
"@langchain/core": "^0.3.18",
@@ -29,16 +28,18 @@
"@lightprotocol/stateless.js": "^0.17.1",
"@metaplex-foundation/mpl-core": "^1.1.1",
"@metaplex-foundation/mpl-token-metadata": "^3.3.0",
"@metaplex-foundation/mpl-toolbox": "^0.9.4",
"@metaplex-foundation/umi": "^0.9.2",
"@metaplex-foundation/umi-bundle-defaults": "^0.9.2",
"@metaplex-foundation/umi-web3js-adapters": "^0.9.2",
"@orca-so/common-sdk": "0.6.4",
"@orca-so/whirlpools-sdk": "^0.13.12",
"@raydium-io/raydium-sdk-v2": "0.1.95-alpha",
"@solana/spl-token": "^0.4.9",
"@solana/web3.js": "^1.95.4",
"bn.js": "^5.2.1",
"bs58": "^6.0.0",
"decimal.js": "^10.4.3",
"bn.js": "^5.2.1",
"dotenv": "^16.4.5",
"form-data": "^4.0.1",
"langchain": "^0.3.6",
@@ -51,4 +52,4 @@
"ts-node": "^10.9.2",
"typescript": "^5.7.2"
}
}
}

View File

@@ -4,6 +4,7 @@ import { createUmi } from "@metaplex-foundation/umi-bundle-defaults";
import { generateSigner, keypairIdentity } from "@metaplex-foundation/umi";
import { createFungible, mintV1, TokenStandard } from "@metaplex-foundation/mpl-token-metadata";
import { fromWeb3JsKeypair, fromWeb3JsPublicKey, toWeb3JsPublicKey } from "@metaplex-foundation/umi-web3js-adapters";
import {mplToolbox} from "@metaplex-foundation/mpl-toolbox"
/**
* Deploy a new SPL token
@@ -25,7 +26,7 @@ export async function deploy_token(
): Promise<{ mint: PublicKey }> {
try {
// Create UMI instance from agent
const umi = createUmi(agent.connection.rpcEndpoint)
const umi = createUmi(agent.connection.rpcEndpoint).use(mplToolbox())
umi.use(keypairIdentity(fromWeb3JsKeypair(agent.wallet)));
// Create new token mint