Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Oracle tests #33

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.7.6;


contract MockChainLinkAggregatorProxy {
function decimals() external view returns (uint8) {}

function latestRoundData()
external
view
returns (
uint80 roundId,
int256 answer, // rate in PRECISION of 10^18
uint256 startedAt,
uint256 updatedAt,
uint80 answeredInRound
) {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {PermissionAdmin} from '@kyber.network/utils-sc/contracts/PermissionAdmin
import {Utils} from '@kyber.network/utils-sc/contracts/Utils.sol';
import {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';


// solhint-disable-next-line max-line-length
// Refer to https://github.com/smartcontractkit/chainlink/blob/develop/evm-contracts/src/v0.6/interfaces/AggregatorV3Interface.sol
interface IChainLinkAggregatorProxy {
Expand Down
10 changes: 5 additions & 5 deletions hardhat.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require("@nomiclabs/hardhat-truffle5");
require("@nomiclabs/hardhat-web3");
require("@nomiclabs/hardhat-etherscan");
require("hardhat-gas-reporter");
// require("hardhat-gas-reporter");
require('solidity-coverage');

require('dotenv').config();
Expand All @@ -12,10 +12,10 @@ const {accounts} = require('./test-wallets.js');
module.exports = {
defaultNetwork: 'hardhat',

gasReporter: {
currency: 'USD',
gasPrice: 100
},
// gasReporter: {
// currency: 'USD',
// gasPrice: 100
// },

networks: {
develop: {
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@
"yargs": "16.0.3"
},
"devDependencies": {
"@eth-optimism/smock": "0.2.1-alpha.0",
"@kyber.network/utils-sc": "2.2.1",
"@nomiclabs/hardhat-ethers": "2.0.0",
"@nomiclabs/hardhat-ethers": "2.0.2",
"@nomiclabs/hardhat-etherscan": "2.1.1",
"@nomiclabs/hardhat-truffle5": "2.0.0",
"@nomiclabs/hardhat-web3": "2.0.0",
"@openzeppelin/test-helpers": "0.5.6",
"@openzeppelin/test-helpers": "0.5.10",
"chai": "4.2.0",
"chai-as-promised": "7.1.1",
"chai-bn": "0.2.1",
Expand Down
Loading