0

I am trying to decode transactions returned from an RPC call to a terra columbus-2 node with NodeJS . I was able to use the following code on columbus-1 but its not working on columbus-2:

 import { unmarshalTx, StdTx } from "@tendermint/amino-js";
 try {
    txValue = unmarshalTx(Buffer.from(tx.tx, "base64"));
  } catch (error) {
    logger.error(`Error unmarshalling tx: ${error} at height ${tx.height}`);
    return [];
  }

  const txString = txValue.value as StdTx;

For example this is a tx from block 435233:

"data": { "txs": [ "2AHwYl3uCkVviI6WChTv6V0vY5PdtycLwC2L19enrqjvFxIUaxF1zgAes8gY1wY3y7thcrQxZPYaEwoFdWx1bmESCjQzNzUwMDAwMDASEwoNCgV1bHVuYRIEMTAwMBDAmgwaagom61rphyED+KplnESZMfUApNN5L3lCn4Nre7wN3sEWO0kvONE+vqISQA76X/+aaLdVYY2Jihx1qL/Zi65aO/U4gu9aKXnUfUHXPiVT5fgwWkHlKKQtn9mlMKfogxrKkvum2W6TtZEhy2IiCjI2Njk0MDg0MjU=" ] }

When I attempt to unmarshal the string I get various versions of the following error: invalid wire type 6 at offset 12

I have tried multiple libraries (cosmjs, @terra-money/terra.js ,@cosmos-client/core;) amino and protobuf encodings as well as various versions of Terrad, but no luck. Would appreciate any information.

Thank you.

captjck
  • 1
  • 1

0 Answers0