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 { 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), | |
}); |
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
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"; |
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
[ | |
{ | |
"type": "constructor", | |
"inputs": [ | |
{ | |
"name": "_registry", | |
"type": "address", | |
"internalType": "address" | |
}, | |
{ |
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 | |
// | |
// _____ _ _ | |
// |_ _| | | (_) | |
// | | ___ _ __ __| | ___ _ __ _ _______ | |
// | |/ _ \ '_ \ / _` |/ _ \ '__| |_ / _ \ | |
// | | __/ | | | (_| | __/ | | |/ / __/ | |
// \_/\___|_| |_|\__,_|\___|_| |_/___\___| | |
// | |
// Copyright (c) Tenderize Labs Ltd |
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
const chains = { | |
'1': 'https://eth-mainnet.g.alchemyapi.io/v2/', | |
'42161': 'https://arb-mainnet.g.alchemyapi.io/v2/' | |
} | |
if ( | |
secrets.alchemy == "" | |
) { | |
throw Error( |
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-FileCopyrightText: 2023 Tenderize <info@tenderize.me> | |
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
contract VulnerableContract { | |
mapping(address => uint256) public balances; | |
constructor() payable {} |
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
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')) |
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
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 |
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
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 |
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
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 |
NewerOlder