0

I am setting up chainlink node for Xinfin Network for Apothem. While submitting the transactions, it is reverted on chain. We tried to debug and the json looks like below.

{
      "id": "9a750361-9f69-40dd-8531-11d164d0ce69",
      "result": {
        "data": {
          "data": "0x000000000000000000000000a7290519dbe15a7b319932b11e2e77bf4c54033bec2ae99132df9b8e8dcc0182ad5f05a5511a29043a91aa91c9ef9c2507f7d69f0000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000a7290519dbe15a7b319932b11e2e77bf4c54033b92cdaaf3000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060cdb8d400000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000005663676574783f68747470733a2f2f6d696e2d6170692e63727970746f636f6d706172652e636f6d2f646174612f70726963653f6673796d3d455448267473796d733d5553446470617468635553446574696d65731864",
          "result": "0x00000000000000000000000000000000000000000000000000000000000008be",
          "topics": [
            "0xd8d7ecc4800d25fa53ce0372f13a416d98907a7ef3d8d3bdd79cf4fe75529c65",
            "0x3078363636323339333733393336333736343636333533313632333433333335"
          ],
          "address": "0xe86e772417d3f1fc9a0a6f0dc25c04ac2c60759d",
          "logIndex": "0x3",
          "blockHash": "0x56a0ae954a3c1ae8321dd7d02f86ba75e6d2bddef60de746ed0b6f9acff69b85",
          "blockNumber": "0x12f1de6",
          "transactionHash": "0x94c895e831bf10787a5f7ea33b6e476098b2316890edf983f0c8f9d3d1f0b504",
          "transactionIndex": "0x0"
        },
        "error": "transaction 0xcb2b9135a3952403611f00206a82a2745e6c5b7f90331503088afdc4edbe3eea reverted on-chain"
      },
      "status": "errored",
      "task": {
        "ID": 202,
        "jobSpecId": "fb97967df51b4357bfb4b4dc8de68c9d",
        "type": "ethtx",
        "confirmations": null,
        "params": {
        },
        "CreatedAt": "2021-06-19T14:53:23.259696+05:30",
        "UpdatedAt": "2021-06-19T14:53:23.259696+05:30",
        "DeletedAt": null
      },
      "minimumConfirmations": null,
      "confirmations": null
    }

When I tried to debug the "Data" value using decoder, it is like below

{ method: null,
  types: [ 'address' ],
  inputs: [ '0x0000000000000000000000000000000000000000' ],
  names: [ '_link' ] }

Please assist, is this the reason txn is failing?,what is the expected construct. I do not find details regarding these in chainlink.

My job spec is

{
  "initiators": [
    {
      "type": "external",
      "params": {
        "name": "xdc",
        "body": {
          "endpoint": "xinfin-testnet",
          "addresses": ["0xe86e772417d3f1fc9a0a6f0dc25c04ac2c60759d"]
        }
      }
    }
  ],
  "tasks": [
    {
      "type": "cryptoprice"
    },
    {
      "type": "copy",
        "params": {
        "copyPath": [
          "result"
        ]
      }
    },
    {
      "type": "multiply"
    },
    {
      "type": "ethuint256"
    },
    {
       "type": "EthTx"
    }
  ]
}```
7
  • 1
    can you also post the on-chain code that's consuming this job? In particular, the function that does the request, and the function that fulfills the response Jun 21 '21 at 0:56
  • Hi - thanks for the reply, this issue link has the details -> ethereum.stackexchange.com/questions/101816/…
    – Lokesh
    Jun 21 '21 at 5:51
  • Our blockchain is Xinfin Network, and I am bit curious to know -- Can ETHTx adapter handle the parameters? or should we customize our external adapter to handle it?,
    – Lokesh
    Jun 21 '21 at 5:53
  • yes if you're just sending the price of a crypto (ETH in this case by the looks of it), then it should handle it fine. Anyway, according to the blockchain explorer, the tx was successful? explorer.apothem.network/tx/… Can you confirm the CL node has enough ETH to fulfill the request? Jun 21 '21 at 8:13
  • yes you are right, but it is not succssful transaction. We have "No block confirmation" shown in explorer and this txn is not included in blocks. Yes I have enough XDC and contract is funded.
    – Lokesh
    Jun 21 '21 at 12:17
0

I have solved it by following below steps: Mostly the tranaction revert occurs due to few factors, such as "fulfilmentissue" or "enough fund not available" issue. but in my case, it was missing - "Dataprefix & functionselector" values.

So I have setup a external-initiators and created a blockchain file for Xinfin, made sure it works fine which resulted proper value in Txn construct.

When you are setting up Chainlink for your own blockchain, make sure you are creating your own blockchain file.

I will share the document on how to do the same, when ready.

thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.