Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
This repository was archived by the owner on May 22, 2025. It is now read-only.

[Bug]: Make transaction error #2259

@godlovericea

Description

@godlovericea

Issue description

When I make a transaction with nodejs, It is error:

Version

"@iota/iota-sdk": "^0.4.0",

Expected behaviour

Success to make tx

Actual behaviour

When I make a transaction with nodejs, It is error:

Can the issue reliably be reproduced?

Yes

Steps to reproduce the issue

try {
        const iotaClient = new IotaClient({ url: getFullnodeUrl('mainnet') });
        const keypair = Ed25519Keypair.fromSecretKey(fromHEX(privateKey));
        const tx = new Transaction();
        const [coin] = tx.splitCoins(tx.gas, [value]);
        tx.transferObjects([coin], to);
        const result = await iotaClient.signAndExecuteTransaction({ signer: keypair, transaction: tx });
        const res = await iotaClient.waitForTransaction({ digest: result.digest });
        ctx.body = SUCCESS_RES(res.digest)
    } catch (error) {
        ctx.body = ERROR_RES("IOTA交易失败:" + error, "IOTA交易失败:" + error)
    }

I have made tx successfully on testnet:
https://explorer.rebased.iota.org/txblock/2htcHzEjNNyGwvFB5WkDKrG64bnTr2guNSsVj4L6T5xb?network=testnet

Errors

I can not make tx on mainnet

Duplicate declaration

  • I have searched the issues tracker this issue and there is none

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Product Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions