Skip to content

Commit

Permalink
Custom Chainlink Oracle CronJob (#52)
Browse files Browse the repository at this point in the history
* added custom chainlink to cronjob

* changed validAfter to be -60 sec from current time
  • Loading branch information
vignesha22 authored Dec 14, 2023
1 parent 2c066c7 commit 7123975
Show file tree
Hide file tree
Showing 2 changed files with 391 additions and 1 deletion.
363 changes: 363 additions & 0 deletions backend/src/abi/EtherspotChainlinkOracleAbi.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,363 @@
export default [
{
"inputs": [
{
"internalType": "string",
"name": "_pairName",
"type": "string"
},
{
"internalType": "address",
"name": "_token",
"type": "address"
},
{
"internalType": "address",
"name": "_owner",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "ActiveOracle",
"type": "error"
},
{
"inputs": [],
"name": "InactiveOracle",
"type": "error"
},
{
"inputs": [],
"name": "InvalidOwner",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "currentTime",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "priceLastUpdatedAt",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "outdatedBy",
"type": "uint256"
}
],
"name": "StalePriceData",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"anonymous": false,
"inputs": [],
"name": "PriceFeedUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint80",
"name": "roundId",
"type": "uint80"
},
{
"indexed": false,
"internalType": "int256",
"name": "answer",
"type": "int256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "startedAt",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "updatedAt",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint80",
"name": "answeredInRound",
"type": "uint80"
}
],
"name": "ReceivedPriceData",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "token",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "timestamp",
"type": "uint256"
}
],
"name": "UpdateReceived",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "token",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "timestamp",
"type": "uint256"
}
],
"name": "UpdateRequested",
"type": "event"
},
{
"inputs": [],
"name": "AGE",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "VERSION",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "activateOracle",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "active",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "cachedPrice",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "deactivateOracle",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "decimals",
"outputs": [
{
"internalType": "uint8",
"name": "",
"type": "uint8"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_price",
"type": "uint256"
}
],
"name": "fulfillPriceData",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "latestRoundData",
"outputs": [
{
"internalType": "uint80",
"name": "roundId",
"type": "uint80"
},
{
"internalType": "int256",
"name": "answer",
"type": "int256"
},
{
"internalType": "uint256",
"name": "startedAt",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "updatedAt",
"type": "uint256"
},
{
"internalType": "uint80",
"name": "answeredInRound",
"type": "uint80"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "pairName",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "priceLastUpdatedAt",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "requestPriceData",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "token",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]
Loading

0 comments on commit 7123975

Please sign in to comment.