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
// SPDX-License-Identifier: MIT | |
pragma solidity 0.8.20; | |
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; | |
interface IThunderLoan { | |
function repay(address token, uint256 amount) external; | |
function deposit(IERC20 token, uint256 amount) external; | |
function redeem(IERC20 token, uint256 amountOfAssetToken) external; |
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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.7.6; | |
pragma experimental ABIEncoderV2; | |
import {Test, console} from "forge-std/Test.sol"; | |
import {PuppyRaffle} from "../src/PuppyRaffle.sol"; | |
import {Attackpuppy} from "./attacker.sol"; | |
contract POCTest is Test { | |
PuppyRaffle puppyRaffle; |
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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.7.6; | |
pragma experimental ABIEncoderV2; | |
interface IPuppy { | |
function enterRaffle(address[] memory newPlayers) external payable; | |
function getActivePlayerIndex( | |
address player | |
) external view returns (uint256); |
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
import { ethers, network } from 'hardhat' | |
async function main() { | |
const uniswapAddr = '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D' | |
const UNI = '0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984' | |
const DAI = '0x6B175474E89094C44Da98b954EedeAC495271d0F' | |
const path = [UNI, DAI] | |
const to = '0xd8500DA651A2e472AD870cDf76B5756F9c113257' | |
const currentTimestampInSeconds = Math.round(Date.now() / 1000) | |
const deadline = currentTimestampInSeconds + 86400 |
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
import { ethers, network } from 'hardhat' | |
async function main() { | |
let [admin1] = await ethers.getSigners() | |
const amount = ethers.parseEther('1') | |
const amount5 = ethers.parseEther('2') | |
// const FACTORY = '0x3c68027368aC1938926f1716AfFAC8A95dDa6267' | |
await admin1.sendTransaction({ | |
to: '0x5832A489EA41Ea03882b1bCD00bdC35958F4e5C8', |
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
// SPDX-License-Identifier: UNLICENSED | |
pragma solidity 0.8.19; | |
import "./IMultisig.sol"; | |
interface IFactory { | |
function createMultisig( | |
address[] memory _admins | |
) external payable returns (IMultisig newMultisig); | |
} |
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
import { ethers } from 'hardhat' | |
async function main() { | |
const currentTimestampInSeconds = Math.round(Date.now() / 1000) | |
const unlockTime = currentTimestampInSeconds + 60 | |
const lockedAmount = ethers.parseEther('0.001') | |
const lock = await ethers.deployContract('Lock', [unlockTime], { | |
value: lockedAmount, |
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
/ SPDX-License-Identifier: UNLICENSED | |
pragma solidity ^0.8.13; | |
import {Test, console} from 'forge-std/Test.sol'; | |
import {DePayForwarderV2} from '../contracts/DePayForwarderV2.sol'; | |
import {DePayRouterV2} from '../contracts/DePayRouterV2.sol'; | |
import {IDePayRouterV2} from '../contracts/interfaces/IDePayRouterV2.sol'; | |
contract DePayRouterV2Test is Test { | |
DePayForwarderV2 public forwarder; |
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
import {Test, console} from 'forge-std/Test.sol'; | |
import {DePayForwarderV2} from '../contracts/DePayForwarderV2.sol'; | |
import {DePayRouterV2} from '../contracts/DePayRouterV2.sol'; | |
import {TestReceiver} from '../contracts/TestReceiver.sol'; | |
import {IDePayRouterV2} from '../contracts/interfaces/IDePayRouterV2.sol'; | |
contract DePayRouterV2Test is Test { | |
DePayForwarderV2 public forwarder; | |
DePayRouterV2 public router; |
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
// SPDX-License-Identifier: UNLICENSED | |
pragma solidity ^0.8.13; | |
import {Test, console} from 'forge-std/Test.sol'; | |
import {DePayForwarderV2} from '../contracts/DePayForwarderV2.sol'; | |
import {DePayRouterV2} from '../contracts/DePayRouterV2.sol'; | |
import {TestReceiver} from '../contracts/TestReceiver.sol'; | |
import {IDePayRouterV2} from '../contracts/interfaces/IDePayRouterV2.sol'; |