Skip to content

Instantly share code, notes, and snippets.

@Federico2014
Federico2014 / .deps...npm...@openzeppelin...contracts-upgradeable...access...OwnableUpgradeable.sol
Created February 23, 2024 03:13
Created using tron-ide: Realtime Tron Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at http://tronide.io/#version=soljson_v0.8.20+commit.5f1834b.js&optimize=true&runs=200&gist=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol";
import {Initializable} from "../proxy/utils/Initializable.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
@Federico2014
Federico2014 / .deps...npm...@openzeppelin...contracts...access...Ownable.sol
Created February 22, 2024 10:12
Created using tron-ide: Realtime Tron Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at http://tronide.io/#version=soljson_v0.8.6+commit.0e36fba.js&optimize=true&runs=200&gist=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {Context} from "../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
@Federico2014
Federico2014 / .deps...npm...@openzeppelin...contracts-upgradeable...access...OwnableUpgradeable.sol
Created February 19, 2024 04:05
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.24+commit.e11b9ed9.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
@Federico2014
Federico2014 / .deps...npm...@openzeppelin...contracts-upgradeable...access...OwnableUpgradeable.sol
Created November 22, 2023 08:45
Created using tron-ide: Realtime Tron Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at http://tronide.io/#version=soljson_v0.8.20+commit.5f1834b.js&optimize=true&runs=200&gist=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol";
import {Initializable} from "../proxy/utils/Initializable.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
@Federico2014
Federico2014 / .deps...npm...@openzeppelin...contracts-upgradeable...access...OwnableUpgradeable.sol
Created November 22, 2023 07:41
Created using tron-ide: Realtime Tron Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at http://tronide.io/#version=soljson_v0.8.20+commit.5f1834b.js&optimize=true&runs=200&gist=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
@Federico2014
Federico2014 / ERC20PermitMock.sol
Created March 27, 2023 10:56
Created using tron-ide: Realtime Tron Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at http://tronide.io/#version=soljson_v0.8.18+commit.f18bedf.js&optimize=true&runs=200&gist=
// SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.17;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract ERC20PermitMock is ERC20 {
constructor(
string memory name,
string memory symbol,
@Federico2014
Federico2014 / ERC20PermitMock.sol
Created March 27, 2023 08:20
Created using tron-ide: Realtime Tron Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at http://tronide.io/#version=soljson_v0.8.18+commit.f18bedf.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.17;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract ERC20PermitMock is ERC20 {
constructor(
string memory name,
string memory symbol,
@Federico2014
Federico2014 / ERC20PermitMock.sol
Created March 10, 2023 11:24
Created using tron-ide: Realtime Tron Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at http://tronide.io/#version=soljson_v0.8.18+commit.f18bedf.js&optimize=true&runs=200&gist=
// SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.17;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract ERC20PermitMock is ERC20 {
constructor(
string memory name,
string memory symbol,
@Federico2014
Federico2014 / DepositContract.sol
Created March 1, 2023 10:14
Created using tron-ide: Realtime Tron Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at http://tronide.io/#version=soljson_v0.8.6+commit.0e36fba.js&optimize=true&runs=200&gist=
// SPDX-License-Identifier: AGPL-3.0
pragma solidity 0.8.15;
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
/**
* This contract will be used as a helper for all the sparse merkle tree related functions
* Based on the implementation of the deposit eth2.0 contract https://github.com/ethereum/consensus-specs/blob/dev/solidity_deposit_contract/deposit_contract.sol
*/
contract DepositContract is Initializable {
@Federico2014
Federico2014 / polygon...EmergencyManager.sol
Created January 12, 2023 06:29
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.15+commit.e14f2714.js&optimize=true&runs=200&gist=
// SPDX-License-Identifier: AGPL-3.0
pragma solidity 0.8.15;
/**
* @dev Contract helper responsible to manage the emergency state
*/
contract EmergencyManager {
// Indicates whether the emergency state is active or not
bool public isEmergencyState;