1

I am creating a funcgible ESDT token. This is my code:


//import {TokenOperationsFactory} from "@multiversx/sdk-core";
const {
  TokenOperationsFactory,
  TokenOperationsFactoryConfig
} = require('@multiversx/sdk-core');

// BROADCAST USING A NETWORK PROVIDER
const { ApiNetworkProvider } = require('@multiversx/sdk-network-providers');

// WALLET
const { UserSigner } = require('@multiversx/sdk-wallet');
const { promises } = require('fs');
require('dotenv').config();

async function MakeToken() {
  const key = await promises.readFile('./key.json', { encoding: 'utf8' });
  const walletObject = JSON.parse(key);
  let signer = await UserSigner.fromWallet(walletObject, process.env.PASSWORD);
  const provider = new ApiNetworkProvider('https://devnet-api.multiversx.com');

  const args = {
    issuer: signer.getAddress(),
    tokenName: 'ACCEL Finance',
    tokenTicker: 'ACCEL1',
    initialSupply: 1000,
    canFreeze: true,
    canWipe: true,
    canPause: true,
    canMint: true,
    canBurn: true,
    canChangeOwner: true,
    canUpgrade: true,
    canAddSpecialRoles: true,
  };

  let factory = new TokenOperationsFactory(new TokenOperationsFactoryConfig('D'));

  const Transaction = factory.issueFungible(args);
  let serializedTransaction = await transaction.serializeForSigning();
  const transactionSignature = await signer.sign(serializedTransaction);
  transaction.applySignature(transactionSignature);
 
}

MakeToken();

I got my transaction hash and signature as expected:

TX hash: c16544faa13371d114559bba7eb07372001d89c7862fc49b909a7e5445e66fe9

TX sig: f8b4d21f7242dc5d8134944bc5e24ff7987af49bd5d3ae54112f350e8359746f79a62b398caad28c5af8eab7f63a94d0d368b30d698c49409a7eff336e319b0c

But the problem is i can't my find transaction in devnet-explorer when i checked with transaction hash, i is not even showing in my transaction history. Why?? what mistake i did?

Rio
  • 39
  • 1
  • I can't see the section where you're effectively sending the transaction to the API provider. My hunch is that you might have an issue around that area, either not sending the actual transaction or maybe not setting the correct transaction nonce. Transactions have to contain the current nonce your account reached, otherwise the transaction will be ignored automatically if nonce is lower than expected, or dropped after a while if nonce is higher than expected. – Brother Jder May 31 '23 at 09:08

0 Answers0