Address Contract Partially Verified
Address
0xC269D6432CA563189B53EDC383a73abB4BD5Aab4
Balance
0 ETH
Nonce
1
Code Size
77 bytes
Creator
0xfE84D520...D56a at tx 0x2b44c9f1...24c793
Proxy
EIP-1967 Proxy Implementation: 0x0012B7C2...7968
Indexed Transactions
0
Contract Bytecode
77 bytes
0x60806040527f0000000000000000000000000012b7c26b8c081a29a61cd52526cf63053679683660008037600080366000846127105a03f43d806000803e818015604857816000f35b816000fd
Verified Source Code Partial Match
Compiler: v0.8.19+commit.7dd6d404
EVM: paris
SingleAssetRedemptionQueueFactory.sol 49 lines
// 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.8.19;
import {NonUpgradableProxy} from "../../utils/0.8.19/NonUpgradableProxy.sol";
import {ISingleAssetRedemptionQueue} from "./ISingleAssetRedemptionQueue.sol";
/// @title SingleAssetRedemptionQueueFactory Contract
/// @author Enzyme Council <[email protected]>
/// @notice A factory for SingleAssetRedemptionQueue proxy instances
contract SingleAssetRedemptionQueueFactory {
event ProxyDeployed(address indexed deployer, address indexed proxyAddress, address indexed vaultProxy);
address internal immutable LIB_ADDRESS;
constructor(address _libAddress) {
LIB_ADDRESS = _libAddress;
}
function deployProxy(
address _vaultProxy,
address _redemptionAssetAddress,
uint256 _bypassableSharesThreshold,
address[] calldata _managers
) external returns (address proxyAddress_) {
bytes memory constructData = abi.encodeWithSelector(
ISingleAssetRedemptionQueue.init.selector,
_vaultProxy,
_redemptionAssetAddress,
_bypassableSharesThreshold,
_managers
);
proxyAddress_ = address(new NonUpgradableProxy({_constructData: constructData, _contractLogic: LIB_ADDRESS}));
emit ProxyDeployed(msg.sender, proxyAddress_, _vaultProxy);
return proxyAddress_;
}
}
NonUpgradableProxy.sol 51 lines
// 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.8.19;
/// @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.8.19,
/// 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.
contract NonUpgradableProxy {
address private immutable CONTRACT_LOGIC;
constructor(bytes memory _constructData, address _contractLogic) {
CONTRACT_LOGIC = _contractLogic;
assembly {
// EIP-1967 slot: `bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)`
sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, _contractLogic)
}
if (_constructData.length > 0) {
(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) }
}
}
}
ISingleAssetRedemptionQueue.sol 59 lines
// 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.
*/
import {IERC20} from "../../external-interfaces/IERC20.sol";
pragma solidity >=0.6.0 <0.9.0;
/// @title ISingleAssetRedemptionQueue Interface
/// @author Enzyme Council <[email protected]>
interface ISingleAssetRedemptionQueue {
function init(
address _vaultProxy,
IERC20 _redemptionAsset,
uint256 _bypassableSharesAmount,
address[] calldata _managers
) external;
function addManagers(address[] calldata _managers) external;
function getBypassableSharesThreshold() external view returns (uint256 sharesAmount_);
function getNextNewId() external view returns (uint256 id_);
function getNextQueuedId() external view returns (uint256 id_);
function getRedemptionAsset() external view returns (IERC20 asset_);
function getSharesForRequest(uint256 _id) external view returns (uint256 sharesAmount_);
function getUserForRequest(uint256 _id) external view returns (address user_);
function getVaultProxy() external view returns (address vaultProxy_);
function isManager(address _user) external view returns (bool isManager_);
function queueIsShutdown() external view returns (bool isShutdown_);
function redeemFromQueue(uint256 _endId, uint256[] calldata _idsToBypass) external;
function removeManagers(address[] calldata _managers) external;
function requestRedeem(uint256 _sharesAmount) external returns (uint256 id_);
function setBypassableSharesThreshold(uint256 _nextSharesThreshold) external;
function setRedemptionAsset(IERC20 _nextRedemptionAsset) external;
function shutdown() external;
function withdrawRequest(uint256 _id) external;
}
IERC20.sol 28 lines
// SPDX-License-Identifier: GPL-3.0 pragma solidity >=0.6.0 <0.9.0; /// @title IERC20 Interface /// @author Enzyme Council <[email protected]> interface IERC20 { // IERC20 - strict function allowance(address _owner, address _spender) external view returns (uint256 allowance_); function approve(address _spender, uint256 _value) external returns (bool approve_); function balanceOf(address _account) external view returns (uint256 balanceOf_); function totalSupply() external view returns (uint256 totalSupply_); function transfer(address _to, uint256 _value) external returns (bool transfer_); function transferFrom(address _from, address _to, uint256 _value) external returns (bool transferFrom_); // IERC20 - typical function decimals() external view returns (uint8 decimals_); function name() external view returns (string memory name_); function symbol() external view returns (string memory symbol_); }
Recent Transactions
No transactions found for this address