'Job error on a multi-chain chainlink node version:1.2.0
I have a chainlink node running on two chains evmChainID=4(rinkeby) and evmChainID=80001(Mumbai-polygon)
I have deployed a TestnetConsumer contract on Mumbai which fetches the latest Ethereum price.
The Jobspec created for the consuming contract is as follows:
type = "directrequest"
schemaVersion = 1
name = "Get > Uint256-MUMBAI-POLYGON"
externalJobID = "1d77fe57-fd0c-4ee7-ba6e-e5e40a0e72c4"
maxTaskDuration = "0s"
contractAddress = "0x-my-oracle-contract"
evmChainID = "80001"
minIncomingConfirmations = 0
observationSource = """
decode_log [type="ethabidecodelog"
abi="OracleRequest(bytes32 indexed specId, address requester, bytes32 requestId, uint256 payment, address callbackAddr, bytes4 callbackFunctionId, uint256 cancelExpiration, uint256 dataVersion, bytes data)"
data="$(jobRun.logData)"
topics="$(jobRun.logTopics)"]
decode_cbor [type="cborparse" data="$(decode_log.data)"]
fetch [type="http" method=GET url="$(decode_cbor.get)"]
parse [type="jsonparse" path="$(decode_cbor.path)" data="$(fetch)"]
multiply [type="multiply" input="$(parse)" times=100]
encode_data [type="ethabiencode" abi="(uint256 value)" data="{ \\"value\\": $(multiply) }"]
encode_tx [type="ethabiencode"
abi="fulfillOracleRequest(bytes32 requestId, uint256 payment, address callbackAddress, bytes4 callbackFunctionId, uint256 expiration, bytes32 data)"
data="{\\"requestId\\": $(decode_log.requestId), \\"payment\\": $(decode_log.payment), \\"callbackAddress\\": $(decode_log.callbackAddr), \\"callbackFunctionId\\": $(decode_log.callbackFunctionId), \\"expiration\\": $(decode_log.cancelExpiration), \\"data\\": $(encode_data)}"
]
submit_tx [type="ethtx" to="0x-my-oracle-contract" data="$(encode_tx)" evmChainID="80001"]
decode_log -> decode_cbor -> fetch -> parse -> multiply -> encode_data -> encode_tx -> submit_tx
"""
The job runs keep getting success and error alternatively. The error happens because the node tries to send the txn using the key bound to evmChainID=4 as shown in the screenshot.
Errors:
while creating transaction: cannot send transaction on chain ID 80001; eth key with address 0xED3413f20d7F16B5E8934aFf935FD763a3Bd63Cf is pegged to chain ID 4: task run failed
It seems its an error related to some default config. Please help. Thanks
The expectation is the Job spec written specific for evmChainID=80001 will use the key bound to the same evmChainID. The keys were created with CLI.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
