Проверенный контрактТочноеGPL-3.0
ComptrollerProxy
Адрес0x008c1e166a149ddd6eaafd63cdee8a7148eea247
- Баланс
0 ETH
- Транзакций
46
- Компилятор
solc 0.6.12
- Тот же код
ещё 799 контрактов
Подробности
- Компилятор
- solc 0.6.12+commit.27d51765
- Язык
- solidity
- Оптимизация
- Нет
- Версия EVM
- istanbul
- Лицензия
- GPL-3.0
- Совпадение
- Точноекод создания: да, код в сети: да
- Проверен на Sourcify
- Создан в блоке
- 24 906 647
- Транзакция создания
- 0x294823cc33…2d4dc1063e
- Реализация прокси
- 0x03f7f3b8…f721f1efComptrollerLib
- Основная копия (больше всего транзакций)
- 0x648b8d23…82eeeda9
contracts/release/core/fund/comptroller/ComptrollerProxy.sol
// SPDX-License-Identifier: GPL-3.0
/*
This file is part of the Enzyme Protocol.
(c) Enzyme Council <[email protected]>
For the full license information, please view the LICENSE
file that was distributed with this source code.
*/
pragma solidity 0.6.12;
import "../../../utils/NonUpgradableProxy.sol";
/// @title ComptrollerProxy Contract
/// @author Enzyme Council <[email protected]>
/// @notice A proxy contract for all ComptrollerProxy instances
contract ComptrollerProxy is NonUpgradableProxy {
constructor(bytes memory _constructData, address _comptrollerLib)
public
NonUpgradableProxy(_constructData, _comptrollerLib)
{}
}
contracts/release/utils/NonUpgradableProxy.sol
// SPDX-License-Identifier: GPL-3.0
/*
This file is part of the Enzyme Protocol.
(c) Enzyme Council <[email protected]>
For the full license information, please view the LICENSE
file that was distributed with this source code.
*/
pragma solidity 0.6.12;
/// @title NonUpgradableProxy Contract
/// @author Enzyme Council <[email protected]>
/// @notice A proxy contract for use with non-upgradable libs
/// @dev The recommended constructor-fallback pattern of a proxy in EIP-1822, updated for solc 0.6.12,
/// and using an immutable lib value to save on gas (since not upgradable).
/// The EIP-1967 storage slot for the lib is still assigned,
/// for ease of referring to UIs that understand the pattern, i.e., Etherscan.
abstract contract NonUpgradableProxy {
address private immutable CONTRACT_LOGIC;
constructor(bytes memory _constructData, address _contractLogic) public {
CONTRACT_LOGIC = _contractLogic;
assembly {
// EIP-1967 slot: `bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)`
sstore(
0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc,
_contractLogic
)
}
(bool success, bytes memory returnData) = _contractLogic.delegatecall(_constructData);
require(success, string(returnData));
}
// solhint-disable-next-line no-complex-fallback
fallback() external payable {
address contractLogic = CONTRACT_LOGIC;
assembly {
calldatacopy(0x0, 0x0, calldatasize())
let success := delegatecall(
sub(gas(), 10000),
contractLogic,
0x0,
calldatasize(),
0,
0
)
let retSz := returndatasize()
returndatacopy(0, 0, retSz)
switch success
case 0 {
revert(0, retSz)
}
default {
return(0, retSz)
}
}
}
}
Настройки компилятораПоказать
{
"metadata": {
"bytecodeHash": "ipfs",
"useLiteralContent": true
},
"libraries": {},
"optimizer": {
"runs": 200,
"details": {
"cse": true,
"yul": false,
"peephole": true,
"deduplicate": true,
"orderLiterals": true,
"jumpdestRemover": true,
"constantOptimizer": true
}
},
"evmVersion": "istanbul",
"remappings": []
}Исходный код и метаданные: Sourcify.
Исходный код принадлежит авторам контракта.