Skip to content

Instantly share code, notes, and snippets.

View kyriediculous's full-sized avatar

Nico Vergauwen kyriediculous

View GitHub Profile
// 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 <info@tenderize.me>
// 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
@kyriediculous
kyriediculous / contracts...Interfaces.sol
Created October 1, 2021 02:45
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 / .deps...npm...@openzeppelin...contracts...access...Ownable.sol
Created October 1, 2021 02:45
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=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
@kyriediculous
kyriediculous / .deps...npm...@openzeppelin...contracts...access...Ownable.sol
Created October 1, 2021 02:43
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=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.