mirror of
https://github.com/d0zingcat/solana-agent-kit.git
synced 2026-06-08 07:36:45 +00:00
fixed token deploy
This commit is contained in:
@@ -18,7 +18,6 @@
|
|||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@raydium-io/raydium-sdk-v2": "0.1.95-alpha",
|
|
||||||
"@bonfida/spl-name-service": "^3.0.7",
|
"@bonfida/spl-name-service": "^3.0.7",
|
||||||
"@coral-xyz/anchor": "0.29",
|
"@coral-xyz/anchor": "0.29",
|
||||||
"@langchain/core": "^0.3.18",
|
"@langchain/core": "^0.3.18",
|
||||||
@@ -29,16 +28,18 @@
|
|||||||
"@lightprotocol/stateless.js": "^0.17.1",
|
"@lightprotocol/stateless.js": "^0.17.1",
|
||||||
"@metaplex-foundation/mpl-core": "^1.1.1",
|
"@metaplex-foundation/mpl-core": "^1.1.1",
|
||||||
"@metaplex-foundation/mpl-token-metadata": "^3.3.0",
|
"@metaplex-foundation/mpl-token-metadata": "^3.3.0",
|
||||||
|
"@metaplex-foundation/mpl-toolbox": "^0.9.4",
|
||||||
"@metaplex-foundation/umi": "^0.9.2",
|
"@metaplex-foundation/umi": "^0.9.2",
|
||||||
"@metaplex-foundation/umi-bundle-defaults": "^0.9.2",
|
"@metaplex-foundation/umi-bundle-defaults": "^0.9.2",
|
||||||
"@metaplex-foundation/umi-web3js-adapters": "^0.9.2",
|
"@metaplex-foundation/umi-web3js-adapters": "^0.9.2",
|
||||||
"@orca-so/common-sdk": "0.6.4",
|
"@orca-so/common-sdk": "0.6.4",
|
||||||
"@orca-so/whirlpools-sdk": "^0.13.12",
|
"@orca-so/whirlpools-sdk": "^0.13.12",
|
||||||
|
"@raydium-io/raydium-sdk-v2": "0.1.95-alpha",
|
||||||
"@solana/spl-token": "^0.4.9",
|
"@solana/spl-token": "^0.4.9",
|
||||||
"@solana/web3.js": "^1.95.4",
|
"@solana/web3.js": "^1.95.4",
|
||||||
|
"bn.js": "^5.2.1",
|
||||||
"bs58": "^6.0.0",
|
"bs58": "^6.0.0",
|
||||||
"decimal.js": "^10.4.3",
|
"decimal.js": "^10.4.3",
|
||||||
"bn.js": "^5.2.1",
|
|
||||||
"dotenv": "^16.4.5",
|
"dotenv": "^16.4.5",
|
||||||
"form-data": "^4.0.1",
|
"form-data": "^4.0.1",
|
||||||
"langchain": "^0.3.6",
|
"langchain": "^0.3.6",
|
||||||
@@ -51,4 +52,4 @@
|
|||||||
"ts-node": "^10.9.2",
|
"ts-node": "^10.9.2",
|
||||||
"typescript": "^5.7.2"
|
"typescript": "^5.7.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { createUmi } from "@metaplex-foundation/umi-bundle-defaults";
|
|||||||
import { generateSigner, keypairIdentity } from "@metaplex-foundation/umi";
|
import { generateSigner, keypairIdentity } from "@metaplex-foundation/umi";
|
||||||
import { createFungible, mintV1, TokenStandard } from "@metaplex-foundation/mpl-token-metadata";
|
import { createFungible, mintV1, TokenStandard } from "@metaplex-foundation/mpl-token-metadata";
|
||||||
import { fromWeb3JsKeypair, fromWeb3JsPublicKey, toWeb3JsPublicKey } from "@metaplex-foundation/umi-web3js-adapters";
|
import { fromWeb3JsKeypair, fromWeb3JsPublicKey, toWeb3JsPublicKey } from "@metaplex-foundation/umi-web3js-adapters";
|
||||||
|
import {mplToolbox} from "@metaplex-foundation/mpl-toolbox"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deploy a new SPL token
|
* Deploy a new SPL token
|
||||||
@@ -25,7 +26,7 @@ export async function deploy_token(
|
|||||||
): Promise<{ mint: PublicKey }> {
|
): Promise<{ mint: PublicKey }> {
|
||||||
try {
|
try {
|
||||||
// Create UMI instance from agent
|
// 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)));
|
umi.use(keypairIdentity(fromWeb3JsKeypair(agent.wallet)));
|
||||||
|
|
||||||
// Create new token mint
|
// Create new token mint
|
||||||
|
|||||||
Reference in New Issue
Block a user