Skip to content

Instantly share code, notes, and snippets.

@xux1217
xux1217 / gist:b889bebf725f4539e44c0475455323ba
Created January 18, 2022 20:35
TransparentUpgradeableProxy_flatten.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM
* instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to
* be specified by overriding the virtual {_implementation} function.
*
* Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a