Skip to content

Instantly share code, notes, and snippets.

// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.19;
import "./IMultisig.sol";
interface IFactory {
function createMultisig(
address[] memory _admins
) external payable returns (IMultisig newMultisig);
}
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',
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
// 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);
// 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;
// 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;
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.7;
import {Test, console2} from "forge-std/Test.sol";
import {Curves} from "../contracts/Curves.sol";
import {FeeSplitter} from "../contracts/FeeSplitter.sol";
import {CurvesERC20Factory} from "../contracts/CurvesERC20Factory.sol";
contract testCurve is Test {
FeeSplitter feespliter;
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.7;
import {Test, console2} from "forge-std/Test.sol";
import {Curves} from "../contracts/Curves.sol";
import {FeeSplitter} from "../contracts/FeeSplitter.sol";
import {CurvesERC20Factory} from "../contracts/CurvesERC20Factory.sol";
contract testCurve is Test {
FeeSplitter feespliter;

The first file is a foundry test that run on a state for setting paycrest admin functionalities, which allow users to create order and in turn allow aggregator to settle part payment in order to validate the POC of the bug in question the second file is a full stack traces of all the transactions involved in the test file.

The first file above shows the process of setting supported institutions twice and the second file is the stack trace that validated the duplication of institution in the array of institution