Advertisement
pawn007

cron job

Aug 2nd, 2019
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. Transfer the ownership of your TestnetConsumer contract to your node
  2. In remix, click the drop down menu of the TestnetConsumer contract, and paste your node address in the transerOwnership box and click the button.
  3. Send LINK to the TestnetConsumer contract.
  4. Ensure there is ETH on your node.
  5. In the node GUI, click on New Job and paste the JSON blob below.
  6. Make sure that the 'address' is your TestnetConsumer address and the 'dataPrefix' is 0x followed by the 256 characters from your testnet transaction.
  7.  
  8. {
  9. "initiators": [
  10. {
  11. "type": "cron",
  12. "params": {
  13. "schedule": "0 */10 * * * *"
  14. }
  15. }
  16. ],
  17. "tasks": [
  18. {
  19. "type": "ethtx",
  20. "confirmations": 0,
  21. "params": {
  22. "address": "0x000000000000000000000000",
  23. "functionSelector": "requestEthereumPrice(address,string)",
  24. "dataPrefix": "0x0000000000000000000000000000000000000"
  25. }
  26. }
  27. ]
  28. }
  29.  
  30.  
  31. In 10 minutes, check to see if any jobs have turned up and find the tx hash on etherscan to see whether or not they have failed.
  32.  
  33. twiigz06/23/2019
  34. amazing. I'm a bit confused as to where I find this "256 characters from your testnet transaction"
  35. what is that referring to exactly?
  36.  
  37. AZ06/23/2019
  38. did you follow the 'Fulfilling requests' section of the docs?
  39. When you test your node with the requestEthereumPrice transaction, click the etherscan link and scroll down
  40. you should find something that looks like this
  41. Function: requestEthereumPrice(address _oracle, string _jobId) ***
  42.  
  43. MethodID: 0xab643c10
  44. [0]: 0000000000000000000000000000000000000000000000000000000000000000
  45. [1]: 0000000000000000000000000000000000000000000000000000000000000000
  46. [2]: 0000000000000000000000000000000000000000000000000000000000000000
  47. [3]: 0000000000000000000000000000000000000000000000000000000000000000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement