Jump to content

Send a transaction with datas, by using erdjs (4.0.3) and a Ledger key

Recommended Posts


I come to you, because I'm trying to implements a Dapp on the Elrond Blockchain, by using your SDKs.

Actually, I can send Transaction without Data. Everything is OK, the ledger key ask me to confirm the transaction. And the transaction is executed with success.

But, I have problem when :

  • I try to add some data to the transaction
  • I try to execute a smart contract ( the smart contract function and parameters are added to the 'data' field of the generated transaction before sign it )

When I do this, the Ledger key return the 0x6e07 error when a call is made for the signature of the transaction. It means "Invalid data", and this confirm that I have a problem with the 'data' field of the transaction.


Here is an exemple of a working transaction (OK) :

let transaction = new erdjs.Transaction({
      nonce: accountNonce,
      receiver: new erdjs.Address(receiverAddress),
      value: erdjs.Balance.egld(0.1),
      data: new erdjs.TransactionPayload(""),
      gasLimit: new erdjs.GasLimit(70000),
      chainID: new erdjs.ChainID("local-testnet")


But, the errors occurs if I add data. For example :

data: new erdjs.TransactionPayload("Test")

(This is the only difference)


The error details :

ERROR Error: Uncaught (in promise): TransportStatusError: Ledger device: UNKNOWN_ERROR (0x6e07)
    at new TransportStatusError (erdjs.js:1370)
    at TransportWebUSB.Transport.send (erdjs.js:1983)
    at async Elrond.signTransaction (erdjs.js:791)
    at async Elrond.signTransaction (erdjs.js:2164)


With the debugger, just before the call for the signature, I check the 'data' field of the transaction :

data: TransactionPayload
  | data: Uint8Array(4) [84, 101, 115, 116]

So, the transaction contains the 'data' field of type TransactionPayload. The payload contains a 'data' field who is the representation of "Test" string in a byte Array.


What I am missing ? 


Thank you by advance for your Help.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...