-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1096c55
commit 3739b73
Showing
4 changed files
with
97 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
pragma solidity ^0.8.0; | ||
|
||
import "../OracleMock.sol"; | ||
import "../../tokens/Tokens.sol"; | ||
|
||
import "forge-std/console.sol"; | ||
|
||
contract OracleMockExample is OracleMock,Tokens { | ||
OracleProviders internal _op; | ||
|
||
function initiateAttack(OracleProviders op) external { | ||
_op = op; | ||
if (op == OracleProviders.CHAINLINK) { | ||
console.log("CHAINLNK"); | ||
} | ||
mockOracleData(op,bytes("xx")); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
pragma solidity ^0.8.13; | ||
|
||
import "forge-std/Test.sol"; | ||
import "../../src/oracle/examples/OracleMockExample.sol"; | ||
|
||
contract OracleMockExampleTest is Test { | ||
uint256 mainnetFork; | ||
|
||
OracleMockExample public oracleMockExample; | ||
|
||
function setUp() public { | ||
mainnetFork = vm.createFork("eth"); | ||
vm.selectFork(mainnetFork); | ||
|
||
oracleMockExample = new OracleMockExample(); | ||
} | ||
|
||
function testMe() public { | ||
console.log("XXX"); | ||
oracleMockExample.initiateAttack(OracleProviders.CHAINLINK); | ||
} | ||
} |