Skip to content

Instantly share code, notes, and snippets.

import { createPublicClient, http, parseAbiItem, formatEther, type Address } from 'viem';
import { arbitrum, mainnet } from 'viem/chains';
const ALCHEMY_RPC_URL = 'https://arb-mainnet.g.alchemy.com/v2/xic2ssHjtluHp2iH8O5NmbrcdcH2CMdJ';
const client = createPublicClient({
chain: arbitrum,
transport: http(ALCHEMY_RPC_URL),
});
pragma solidity ^0.8.25;
import { UD60x18, ud, UNIT as UNIT_60x18, ZERO as ZERO_60x18 } from "@prb/math/UD60x18.sol";
import { ERC20 } from "@solady/tokens/ERC20.sol";
import { WETH } from "@solady/tokens/WETH.sol";
import { SafeTransferLib } from "@solady/utils/SafeTransferLib.sol";
import { OwnableUpgradeable } from "@openzeppelin/upgradeable/access/OwnableUpgradeable.sol";
import { Initializable } from "@openzeppelin/upgradeable/proxy/utils/Initializable.sol";
import { UUPSUpgradeable } from "@openzeppelin/upgradeable/proxy/utils/UUPSUpgradeable.sol";
[
{
"type": "constructor",
"inputs": [
{
"name": "_registry",
"type": "address",
"internalType": "address"
},
{
// SPDX-License-Identifier: MIT
//
// _____ _ _
// |_ _| | | (_)
// | | ___ _ __ __| | ___ _ __ _ _______
// | |/ _ \ '_ \ / _` |/ _ \ '__| |_ / _ \
// | | __/ | | | (_| | __/ | | |/ / __/
// \_/\___|_| |_|\__,_|\___|_| |_/___\___|
//
// Copyright (c) Tenderize Labs Ltd
const chains = {
'1': 'https://eth-mainnet.g.alchemyapi.io/v2/',
'42161': 'https://arb-mainnet.g.alchemyapi.io/v2/'
}
if (
secrets.alchemy == ""
) {
throw Error(
// SPDX-FileCopyrightText: 2023 Tenderize <[email protected]>
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract VulnerableContract {
mapping(address => uint256) public balances;
constructor() payable {}
function loadTasks () {
const tasksPath = path.join(__dirname, 'tasks')
fs.readdirSync(tasksPath).forEach(task => {
require(`${tasksPath}/${task}`)
})
}
if (
fs.existsSync(path.join(__dirname, 'artifacts')) &&
fs.existsSync(path.join(__dirname, 'typechain-types'))
@kyriediculous
kyriediculous / contracts...Interfaces.sol
Created October 1, 2021 11:35
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.9+commit.e5eed63a.js&optimize=false&runs=200&gist=
pragma solidity ^0.8.8;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
interface IRoundsManager {
// Events
event NewRound(uint256 indexed round, bytes32 blockHash);
// Deprecated events
@kyriediculous
kyriediculous / contracts...Interfaces.sol
Created October 1, 2021 03:04
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.8+commit.dddeac2f.js&optimize=false&runs=200&gist=
pragma solidity ^0.8.8;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
interface IRoundsManager {
// Events
event NewRound(uint256 indexed round, bytes32 blockHash);
// Deprecated events
@kyriediculous
kyriediculous / contracts...Interfaces.sol
Created October 1, 2021 02:46
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.8+commit.dddeac2f.js&optimize=false&runs=200&gist=
pragma solidity ^0.8.8;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
interface IRoundsManager {
// Events
event NewRound(uint256 indexed round, bytes32 blockHash);
// Deprecated events