Skip to content

Instantly share code, notes, and snippets.

@Federico2014
Federico2014 / PolygonZkEVMBridge.sol
Created September 13, 2024 06:26
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: AGPL-3.0
pragma solidity 0.8.20;
import "./lib/DepositContract.sol";
import "./lib/SafeTRC20Upgradeable.sol";
import "./lib/TokenWrapped.sol";
import "./interfaces/IBasePolygonZkEVMGlobalExitRoot.sol";
import "./interfaces/IBridgeMessageReceiver.sol";
import "./interfaces/IPolygonZkEVMBridge.sol";
@Federico2014
Federico2014 / PolygonZkEVMBridge.sol
Created September 13, 2024 03:42
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=false&runs=200&gist=
// SPDX-License-Identifier: AGPL-3.0
pragma solidity 0.8.20;
import "./lib/DepositContract.sol";
import "./lib/SafeTRC20Upgradeable.sol";
import "./lib/TokenWrapped.sol";
import "./interfaces/IBasePolygonZkEVMGlobalExitRoot.sol";
import "./interfaces/IBridgeMessageReceiver.sol";
import "./interfaces/IPolygonZkEVMBridge.sol";
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol)
pragma solidity ^0.8.20;
import {IAccessControl} from "@openzeppelin/contracts/access/IAccessControl.sol";
import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol";
import {ERC165Upgradeable} from "../utils/introspection/ERC165Upgradeable.sol";
import {Initializable} from "../proxy/utils/Initializable.sol";
@Federico2014
Federico2014 / ProxyAdminWrapper.sol
Created June 21, 2024 08: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.6+commit.0e36fba.js&optimize=true&runs=200&gist=
// SPDX-License-Identifier: AGPL-3.0
pragma solidity 0.8.20;
import "@openzeppelin/contracts@4.8.2/proxy/transparent/ProxyAdmin.sol";
contract ProxyAdminWrapper is ProxyAdmin {
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)
pragma solidity ^0.8.0;
/**
* @dev External interface of AccessControl declared to support ERC165 detection.
*/
interface IAccessControlUpgradeable {
/**
@Federico2014
Federico2014 / .deps...contracts....DS_Store
Created May 30, 2024 07:01
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.20+commit.a1b79de6.js&optimize=false&runs=200&gist=
Bud1%v2fdscboolbool
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)
pragma solidity ^0.8.0;
/**
* @dev External interface of AccessControl declared to support ERC165 detection.
*/
interface IAccessControlUpgradeable {
/**
@Federico2014
Federico2014 / .deps...npm...@openzeppelin...contracts...access...Ownable.sol
Created May 7, 2024 11:18
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...access...Ownable.sol
Created March 19, 2024 11:08
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 {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...access...Ownable.sol
Created February 27, 2024 03:09
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 {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