Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

block height exceeded #159

Open
sanshao opened this issue Jan 18, 2025 · 1 comment
Open

block height exceeded #159

sanshao opened this issue Jan 18, 2025 · 1 comment

Comments

@sanshao
Copy link

sanshao commented Jan 18, 2025

node_modules/@solana/web3.js/src/connection.ts:4047
throw new TransactionExpiredBlockheightExceededError(signature);
^
TransactionExpiredBlockheightExceededError: Signature 3io9vkDrsDDe6wkNCrnLu6qvSgpLgsubTZVGiXdW2ZKNQpKziYbFxr8KWVCd6B28Etm2Xx4P1tKMoHqLQfiDSUXp has expired: block height exceeded.
at Connection.confirmTransactionUsingBlockHeightExceedanceStrategy (/Users/sanshao/workspace/dex-bot/node_modules/@solana/web3.js/src/connection.ts:4047:15)
at processTicksAndRejections (node:internal/process/task_queues:105:5)
at async Connection.confirmTransaction (/Users/sanshao/workspace/dex-bot/node_modules/@solana/web3.js/src/connection.ts:3858:14)
at async TransactionBuilder.sendAndConfirm (/Users/sanshao/workspace/dex-bot/node_modules/@metaplex-foundation/umi/src/TransactionBuilder.ts:360:20)
at async SolClient.createToken (/Users/sanshao/workspace/dex-bot/src/dex/sol/SolClient.ts:88:29) {
signature: '3io9vkDrsDDe6wkNCrnLu6qvSgpLgsubTZVGiXdW2ZKNQpKziYbFxr8KWVCd6B28Etm2Xx4P1tKMoHqLQfiDSUXp'
}

@sanshao
Copy link
Author

sanshao commented Jan 18, 2025

`
const umi = createUmi(rpcUrl, "confirmed");

const userKeypair = Keypair.fromSecretKey(
Buffer.from(bs58.decode(privateKey))
);

const userWallet = umi.eddsa.createKeypairFromSecretKey(
  userKeypair.secretKey
);
const userWalletSigner = createSignerFromKeypair(umi, userWallet);

const { name, symbol, amount = 10 ** 8, decimals = 8, uri } = param;

const mint = generateSigner(umi);

umi.use(signerIdentity(userWalletSigner)).use(mplTokenMetadata());

console.log("start mint: ", mint.publicKey);

const createAndMintTx = await createAndMint(umi, {
  mint,
  authority: umi.identity,
  name,
  symbol,
  uri,
  sellerFeeBasisPoints: percentAmount(5.5),
  decimals,
  amount: amount * 10 ** decimals,
  tokenOwner: userWallet.publicKey,
  tokenStandard: TokenStandard.Fungible,
}).sendAndConfirm(umi, {
  confirm: {
    commitment: "confirmed",
  },
  send: {
    skipPreflight: true,
    /** The commitment level to use for the send transaction. */
    preflightCommitment: "confirmed",
    /** The maximum number of retries to use. */
    maxRetries: 3,
  },
});

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant