Skip to content

multiple new collateral pricefeeds #318

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

Open
wants to merge 23 commits into
base: development
Choose a base branch
from
Open
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
59 changes: 32 additions & 27 deletions brownie-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,7 @@ networks:
priority_fee: null
reverting_tx_gas_limit: max
default_contract_owner: true
cmd_settings:
port: 8555
gas_limit: 8000000
accounts: 10
evm_version: istanbul
mnemonic: brownie
block_time: 0
default_balance: 100
#time: 2020-05-08T14:54:08+0000
cmd_settings: null
live:
gas_limit: auto
gas_buffer: 1.1
Expand All @@ -44,43 +36,56 @@ compiler:
optimizer:
enabled: true
runs: 200
remappings:
remappings:
- "@openzeppelin-4.8.0=openzeppelin/[email protected]/contracts"
- "@openzeppelin-upgradeable-4.8.0=openzeppelin/[email protected]/contracts"
- "@openzeppelin-3.4.2=openzeppelin/[email protected]/contracts"
- "@openzeppelin-2.5.1=openzeppelin/[email protected]/contracts"
- "@openzeppelin-4.7.0=./node_modules/openzeppelin-4.7.0"
- "@openzeppelin-3.4.0=./node_modules/openzeppelin-3.4.0"
- "@openzeppelin-2.5.0=./node_modules/openzeppelin-2.5.0"
- "@uniswap=./node_modules/@uniswap"
- "@celer=./node_modules/celer"
- "@uniswap=uniswap"
# - "@uniswapv3-core=uniswap/[email protected]/contracts"
# - "@uniswapv3-periphery=uniswap/[email protected]/contracts"
# - "@uniswap=./node_modules/@uniswap"
# - "@celer=./node_modules/celer"
- "@celer=celer-network/[email protected]"
- "prb-math=./node_modules/prb-math"
# - "@prb-math=paulrberg/[email protected]"
- "@aave-v3-core=aave/[email protected]/contracts"

console:
show_colors: true
color_style: monokai
auto_suggest: true
completions: true

reports:
exclude_paths:
- contracts/testhelpers/**/*.*
- contracts/openzeppelin/**/*.*
- contracts/feeds/testnet/**/*.*
exclude_contracts:
- Address
- Context
- Ownable
- ReentrancyGuard
- SafeERC20
- SafeMath
- EnumerableBytes32Set
exclude_paths: null
exclude_contracts: null
only_include_project: true

hypothesis:
deadline: null
max_examples: 50
report_multiple_bugs: False
stateful_step_count: 10
phases:
explicit: true
reuse: true
generate: true
target: true
shrink: true

autofetch_sources: false
dependencies:
- OpenZeppelin/[email protected]
- OpenZeppelin/[email protected]
- OpenZeppelin/[email protected]
- openzeppelin/[email protected]
- openzeppelin/[email protected]
- openzeppelin/[email protected]
- openzeppelin/[email protected]
- openzeppelin/[email protected]
- paulrberg/[email protected]
- uniswap/[email protected]
- uniswap/[email protected]
- uniswap/[email protected]
dev_deployment_artifacts: false
2 changes: 1 addition & 1 deletion contracts/connectors/loantoken/LoanTokenLogicStandard.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import "../../../interfaces/IBZx.sol";
import "../../../interfaces/IPriceFeeds.sol";
import "../../mixins/Flags.sol";
import "../../interfaces/draft-IERC20Permit.sol";
import "../../interfaces/IERC20Detailed.sol";
import "../../interfaces/IERC20Detailed.sol"; // TODO replace with IERC20Metadata
import "@openzeppelin-2.5.0/token/ERC20/SafeERC20.sol";

contract LoanTokenLogicStandard is AdvancedToken, StorageExtension, Flags {
Expand Down
4 changes: 2 additions & 2 deletions contracts/feeds/IPriceFeedsExt.sol
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/**
* Copyright 2017-2022, OokiDao. All Rights Reserved.
* Copyright 2017-2023, OokiDao. All Rights Reserved.
* Licensed under the Apache License, Version 2.0.
*/

// SPDX-License-Identifier: Apache-2.0
pragma solidity >=0.5.17 <0.9.0;


interface IPriceFeedsExt {
function latestAnswer() external view returns (int256);
}
35 changes: 14 additions & 21 deletions contracts/feeds/OOKIPriceFeed.sol
Original file line number Diff line number Diff line change
@@ -1,29 +1,22 @@
/**
* Copyright 2017-2022, OokiDao. All Rights Reserved.
* Copyright 2017-2023, OokiDao. All Rights Reserved.
* Licensed under the Apache License, Version 2.0.
*/

pragma solidity 0.5.17;
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

import "./IPriceFeedsExt.sol";
import "../governance/PausableGuardian.sol";
import "contracts/feeds/IPriceFeedsExt.sol";
import "contracts/governance/PausableGuardian_0_8.sol";

contract OOKIPriceFeed is PausableGuardian, IPriceFeedsExt {
int256 public storedPrice = 2e6; // $0.02
contract OOKIPriceFeed is PausableGuardian_0_8, IPriceFeedsExt {
int256 public storedPrice = 2e6; // $0.02

function updateStoredPrice(
int256 price)
external
onlyGuardian
{
storedPrice = price;
}
function updateStoredPrice(int256 price) external onlyGuardian {
storedPrice = price;
}

function latestAnswer()
external
view
returns (int256)
{
return storedPrice;
}
}
function latestAnswer() external view returns (int256) {
return storedPrice;
}
}
26 changes: 0 additions & 26 deletions contracts/feeds/PriceFeedIToken.sol

This file was deleted.

Loading