Skip to content

Commit

Permalink
mocks: rename to MockChainLink
Browse files Browse the repository at this point in the history
  • Loading branch information
arbaz-immunefi committed Feb 6, 2024
1 parent f034bd3 commit 2370f5d
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/openzeppelin-contracts
Submodule openzeppelin-contracts added at a28aaf
1 change: 1 addition & 0 deletions lib/openzeppelin-contracts-upgradeable
Submodule openzeppelin-contracts-upgradeable added at 25aabd
1 change: 1 addition & 0 deletions lib/v2-core
Submodule v2-core added at ee547b
1 change: 1 addition & 0 deletions lib/v2-periphery
Submodule v2-periphery added at 0335e8
5 changes: 5 additions & 0 deletions src/oracle/examples/MockOracleExample.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ pragma solidity ^0.8.0;
import "forge-std/console.sol";

import "../lib/MockPyth.sol";
import "../lib/MockChainLink.sol";

contract MockOracleExample {
// TODO: provide list of all referencable price feeds
Expand All @@ -15,10 +16,14 @@ contract MockOracleExample {
}

function _executeAttack() internal {
// PYTH
PythUpgradable pyth = PythUpgradable(0x4305FB66699C3B2702D4d05CF36551390A4c69C6);
PythUpgradable.Price memory p = pyth.getPriceUnsafe(pid);
console.logInt(p.price);
_completeAttack();

// CHAINLINK

}

function _completeAttack() internal {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import "../../tokens/Tokens.sol";
* This includes functions to mock oracle data for testing and to retrieve context information
* specific to the blockchain environment the contract is operating in.
*/
library ChainlinkOracle {
library MockChainLink {
struct Context {
EACAggregatorProxy aggregator;
}
Expand Down

0 comments on commit 2370f5d

Please sign in to comment.