question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to decode Contract Event

See original GitHub issue

When deploying the Smart Contract, I get Unable to decode Contract Event error.

Screenshot from 2020-11-14 18-44-15

The JSON that is visible here on the console also differs from the JSON that I get as a terminal output. This is from the Browser’s Console.

{
  "dispatchInfo": {
    "weight": 700500000,
    "class": "Normal",
    "paysFee": "Yes"
  },
  "events": [
    {
      "phase": {
        "ApplyExtrinsic": 1
      },
      "event": {
        "index": "0x0905",
        "data": [
          "5HjpDS3KA3iAZSHNzQfyXoa72o6nadQpSjBeAT6jQrezuQf2",
          "0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d"
        ]
      },
      "topics": [
        "0x696660f4c1d1f9fc5fbc8c946c1f89e4c8b35b12ffa60d1752ef92030625f1f5"
      ]
    },
    {
      "phase": {
        "ApplyExtrinsic": 1
      },
      "event": {
        "index": "0x0000",
        "data": [
          {
            "weight": 700500000,
            "class": "Normal",
            "paysFee": "Yes"
          }
        ]
      },
      "topics": []
    }
  ],
  "status": {
    "InBlock": "0x2ffc594155a50541c9dc08008cf0b1219f051b8ebfc36c23d7215e9c15c7622e"
  },
  "contractEvents": []
}

Whereas the terminal output is somewhat like:

{
  "dispatchInfo": {
    "weight": 150000000,
    "class": "Normal",
    "paysFee": "Yes"
  },
  "events": [
    {
      "phase": {
        "ApplyExtrinsic": 1
      },
      "event": {
        "index": "0x0000",
        "data": [
          {
            "weight": 150000000,
            "class": "Normal",
            "paysFee": "Yes"
          }
        ]
      },
      "topics": []
    }
  ],
  "status": {
    "Finalized": "0x3159371db6098be8c0c9552664aa7aa2c792e6c0c7d67ebbb08aef8a0a2eb193"
  }
}

PS : The above two JSONs are from two different transactions, but the idea is to point out that the terminal output of the response JSON from the api-contract doesn’t show full information as it is shown in the browser console.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:45 (25 by maintainers)

github_iconTop GitHub Comments

1reaction
JeremyConnorcommented, Nov 14, 2020

AssetTransfer.zip Here you go. The zip file contains both the ABI and the WASM file.

0reactions
polkadot-js-botcommented, Jun 3, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to decode input data - Ethereum Stack Exchange
The ABI contents I am using were received from Etherscan for the Aave collector contract which is below. [{"inputs":[{"internalType":"address"," ...
Read more >
node.js - How to resolve "Warning: Could not decode event!"
it shows me this error: Warning: Could not decode event! execution failed due to an exception. Reverted. How can I solve this problem?...
Read more >
Ethereum Logs Hands-On with Ethers.js | by Aw Kai Shin
This article focuses on decoding this log function and assumes some basic knowledge on Ethereum events and logs. As a refresher: Events are ......
Read more >
Can't decode Transaction Log data : r/ethdev - Reddit
I submitted an issue on the go-ethereum Github asking for help on decoding transaction event log data that contains the non indexed ...
Read more >
[SOLVED] Error with decoding string from the event in the ...
... events were saved as actual strings, but recently strings in events are now encoded and neither web3.js or ethers.js can't decode it, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found