Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60a06040 | 18213722 | 335 days ago | IN | 0 ETH | 0.01340946 |
Latest 11 internal transactions
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
20542618 | 9 days ago | Contract Creation | 0 ETH | |||
19530028 | 151 days ago | Contract Creation | 0 ETH | |||
19530028 | 151 days ago | Contract Creation | 0 ETH | |||
19265400 | 188 days ago | Contract Creation | 0 ETH | |||
19265400 | 188 days ago | Contract Creation | 0 ETH | |||
19226142 | 194 days ago | Contract Creation | 0 ETH | |||
18675071 | 271 days ago | Contract Creation | 0 ETH | |||
18662788 | 273 days ago | Contract Creation | 0 ETH | |||
18640318 | 276 days ago | Contract Creation | 0 ETH | |||
18640318 | 276 days ago | Contract Creation | 0 ETH | |||
18592773 | 282 days ago | Contract Creation | 0 ETH |
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
ConvexFactory
Compiler Version
v0.8.19+commit.7dd6d404
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.19; import "Clones.sol"; import "PrismaOwnable.sol"; interface IConvexDepositToken { function initialize(uint256 pid) external; function lpToken() external view returns (address); function depositPid() external view returns (uint256); } /** @notice Prisma Convex Factory @title Deploys clones of `ConvexDepositToken` as directed by the Prisma DAO */ contract ConvexFactory is PrismaOwnable { using Clones for address; address public depositTokenImpl; mapping(uint256 pid => address depositToken) public getDepositToken; event NewDeployment(address depositToken, address lpToken, uint256 convexPid); event ImplementationSet(address depositTokenImpl); constructor( address _prismaCore, address _depositTokenImpl, address[] memory _existingDeployments ) PrismaOwnable(_prismaCore) { depositTokenImpl = _depositTokenImpl; emit ImplementationSet(_depositTokenImpl); for (uint i = 0; i < _existingDeployments.length; i++) { address depositToken = _existingDeployments[i]; address lpToken = IConvexDepositToken(depositToken).lpToken(); uint256 pid = IConvexDepositToken(depositToken).depositPid(); getDepositToken[pid] = depositToken; emit NewDeployment(depositToken, lpToken, pid); } } /** @dev After calling this function, the owner should also call `Vault.registerReceiver` to enable PRISMA emissions on the newly deployed `ConvexDepositToken` */ function deployNewInstance(uint256 pid) external onlyOwner { // cloning reverts if duplicating the same pid with the same implementation // it is intentionally allowed to redeploy using the same pid with a new implementation address depositToken = depositTokenImpl.cloneDeterministic(bytes32(pid)); IConvexDepositToken(depositToken).initialize(pid); getDepositToken[pid] = depositToken; emit NewDeployment(depositToken, IConvexDepositToken(depositToken).lpToken(), pid); } function getDeterministicAddress(uint256 pid) external view returns (address) { return Clones.predictDeterministicAddress(depositTokenImpl, bytes32(pid)); } function setImplementation(address impl) external onlyOwner { depositTokenImpl = impl; emit ImplementationSet(impl); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (proxy/Clones.sol) pragma solidity ^0.8.0; /** * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for * deploying minimal proxy contracts, also known as "clones". * * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies * > a minimal bytecode implementation that delegates all calls to a known, fixed address. * * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2` * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the * deterministic method. * * _Available since v3.4._ */ library Clones { /** * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`. * * This function uses the create opcode, which should never revert. */ function clone(address implementation) internal returns (address instance) { /// @solidity memory-safe-assembly assembly { // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes // of the `implementation` address with the bytecode before the address. mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000)) // Packs the remaining 17 bytes of `implementation` with the bytecode after the address. mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3)) instance := create(0, 0x09, 0x37) } require(instance != address(0), "ERC1167: create failed"); } /** * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`. * * This function uses the create2 opcode and a `salt` to deterministically deploy * the clone. Using the same `implementation` and `salt` multiple time will revert, since * the clones cannot be deployed twice at the same address. */ function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) { /// @solidity memory-safe-assembly assembly { // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes // of the `implementation` address with the bytecode before the address. mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000)) // Packs the remaining 17 bytes of `implementation` with the bytecode after the address. mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3)) instance := create2(0, 0x09, 0x37, salt) } require(instance != address(0), "ERC1167: create2 failed"); } /** * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}. */ function predictDeterministicAddress( address implementation, bytes32 salt, address deployer ) internal pure returns (address predicted) { /// @solidity memory-safe-assembly assembly { let ptr := mload(0x40) mstore(add(ptr, 0x38), deployer) mstore(add(ptr, 0x24), 0x5af43d82803e903d91602b57fd5bf3ff) mstore(add(ptr, 0x14), implementation) mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73) mstore(add(ptr, 0x58), salt) mstore(add(ptr, 0x78), keccak256(add(ptr, 0x0c), 0x37)) predicted := keccak256(add(ptr, 0x43), 0x55) } } /** * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}. */ function predictDeterministicAddress(address implementation, bytes32 salt) internal view returns (address predicted) { return predictDeterministicAddress(implementation, salt, address(this)); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.19; import "IPrismaCore.sol"; /** @title Prisma Ownable @notice Contracts inheriting `PrismaOwnable` have the same owner as `PrismaCore`. The ownership cannot be independently modified or renounced. */ contract PrismaOwnable { IPrismaCore public immutable PRISMA_CORE; constructor(address _prismaCore) { PRISMA_CORE = IPrismaCore(_prismaCore); } modifier onlyOwner() { require(msg.sender == PRISMA_CORE.owner(), "Only owner"); _; } function owner() public view returns (address) { return PRISMA_CORE.owner(); } function guardian() public view returns (address) { return PRISMA_CORE.guardian(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IPrismaCore { event FeeReceiverSet(address feeReceiver); event GuardianSet(address guardian); event NewOwnerAccepted(address oldOwner, address owner); event NewOwnerCommitted(address owner, address pendingOwner, uint256 deadline); event NewOwnerRevoked(address owner, address revokedOwner); event Paused(); event PriceFeedSet(address priceFeed); event Unpaused(); function acceptTransferOwnership() external; function commitTransferOwnership(address newOwner) external; function revokeTransferOwnership() external; function setFeeReceiver(address _feeReceiver) external; function setGuardian(address _guardian) external; function setPaused(bool _paused) external; function setPriceFeed(address _priceFeed) external; function OWNERSHIP_TRANSFER_DELAY() external view returns (uint256); function feeReceiver() external view returns (address); function guardian() external view returns (address); function owner() external view returns (address); function ownershipTransferDeadline() external view returns (uint256); function paused() external view returns (bool); function pendingOwner() external view returns (address); function priceFeed() external view returns (address); function startTime() external view returns (uint256); }
{ "evmVersion": "paris", "optimizer": { "enabled": true, "runs": 200 }, "libraries": { "ConvexDepositFactory.sol": {} }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_prismaCore","type":"address"},{"internalType":"address","name":"_depositTokenImpl","type":"address"},{"internalType":"address[]","name":"_existingDeployments","type":"address[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"depositTokenImpl","type":"address"}],"name":"ImplementationSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"depositToken","type":"address"},{"indexed":false,"internalType":"address","name":"lpToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"convexPid","type":"uint256"}],"name":"NewDeployment","type":"event"},{"inputs":[],"name":"PRISMA_CORE","outputs":[{"internalType":"contract IPrismaCore","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"pid","type":"uint256"}],"name":"deployNewInstance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositTokenImpl","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"pid","type":"uint256"}],"name":"getDepositToken","outputs":[{"internalType":"address","name":"depositToken","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"pid","type":"uint256"}],"name":"getDeterministicAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"guardian","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"impl","type":"address"}],"name":"setImplementation","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a06040523480156200001157600080fd5b5060405162000b3838038062000b38833981016040819052620000349162000253565b6001600160a01b03838116608052600080546001600160a01b03191691841691821790556040519081527fab64f92ab780ecbf4f3866f57cee465ff36c89450dcce20237ca7a8d81fb7d139060200160405180910390a160005b815181101562000216576000828281518110620000af57620000af6200034d565b602002602001015190506000816001600160a01b0316635fcbd2856040518163ffffffff1660e01b8152600401602060405180830381865afa158015620000fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000120919062000363565b90506000826001600160a01b03166389f4e7ae6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000163573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000189919062000388565b60008181526001602090815260409182902080546001600160a01b0319166001600160a01b038881169182179092558351908152908616918101919091529081018290529091507f771dec94398ec4301a89d6c591fcf9013337f8315c528f185f6e6749d17fa1f69060600160405180910390a150505080806200020d90620003a2565b9150506200008e565b50505050620003ca565b80516001600160a01b03811681146200023857600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b6000806000606084860312156200026957600080fd5b620002748462000220565b925060206200028581860162000220565b60408601519093506001600160401b0380821115620002a357600080fd5b818701915087601f830112620002b857600080fd5b815181811115620002cd57620002cd6200023d565b8060051b604051601f19603f83011681018181108582111715620002f557620002f56200023d565b60405291825284820192508381018501918a8311156200031457600080fd5b938501935b828510156200033d576200032d8562000220565b8452938501939285019262000319565b8096505050505050509250925092565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156200037657600080fd5b620003818262000220565b9392505050565b6000602082840312156200039b57600080fd5b5051919050565b600060018201620003c357634e487b7160e01b600052601160045260246000fd5b5060010190565b6080516107366200040260003960008181610122015281816101c701528181610250015281816102ae01526104d001526107366000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063902e1c281161005b578063902e1c28146100f55780639fa53d2314610108578063cc9641a81461011d578063d784d4261461014457600080fd5b806320c7f1441461008d5780634372f61f146100bc578063452a9320146100e55780638da5cb5b146100ed575b600080fd5b6100a061009b36600461068e565b610157565b6040516001600160a01b03909116815260200160405180910390f35b6100a06100ca36600461068e565b6001602052600090815260409020546001600160a01b031681565b6100a06101c3565b6100a061024c565b6000546100a0906001600160a01b031681565b61011b61011636600461068e565b6102ac565b005b6100a07f000000000000000000000000000000000000000000000000000000000000000081565b61011b6101523660046106bf565b6104ce565b600080546040513060388201526f5af43d82803e903d91602b57fd5bf3ff60248201526001600160a01b039091166014820152733d602d80600a3d3981f3363d3d373d3d3d363d738152605881018390526037600c820120607882015260556043909101205b92915050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663452a93206040518163ffffffff1660e01b8152600401602060405180830381865afa158015610223573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061024791906106e3565b905090565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610223573d6000803e3d6000fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561030a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061032e91906106e3565b6001600160a01b0316336001600160a01b0316146103805760405162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b60448201526064015b60405180910390fd5b60008054610397906001600160a01b0316836105f1565b60405163fe4b84df60e01b8152600481018490529091506001600160a01b0382169063fe4b84df90602401600060405180830381600087803b1580156103dc57600080fd5b505af11580156103f0573d6000803e3d6000fd5b50505060008381526001602090815260409182902080546001600160a01b0319166001600160a01b0386169081179091558251635fcbd28560e01b815292517f771dec94398ec4301a89d6c591fcf9013337f8315c528f185f6e6749d17fa1f6945085939192635fcbd28592600480820193918290030181865afa15801561047c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104a091906106e3565b604080516001600160a01b039384168152929091166020830152810184905260600160405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561052c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061055091906106e3565b6001600160a01b0316336001600160a01b03161461059d5760405162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b6044820152606401610377565b600080546001600160a01b0319166001600160a01b0383169081179091556040519081527fab64f92ab780ecbf4f3866f57cee465ff36c89450dcce20237ca7a8d81fb7d139060200160405180910390a150565b6000763d602d80600a3d3981f3363d3d373d3d3d363d730000008360601b60e81c176000526e5af43d82803e903d91602b57fd5bf38360781b1760205281603760096000f590506001600160a01b0381166101bd5760405162461bcd60e51b815260206004820152601760248201527f455243313136373a2063726561746532206661696c65640000000000000000006044820152606401610377565b6000602082840312156106a057600080fd5b5035919050565b6001600160a01b03811681146106bc57600080fd5b50565b6000602082840312156106d157600080fd5b81356106dc816106a7565b9392505050565b6000602082840312156106f557600080fd5b81516106dc816106a756fea2646970667358221220acbbdb5f4e596c0c44d97477c8bb8f13a93cd0fb25ed130dc51cba6bdc5dcc7964736f6c634300081300330000000000000000000000005d17ea085f2ff5da3e6979d5d26f1dbab664ccf8000000000000000000000000000ca04b3225137b9110e77e12f1b484cc227de9000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000ae09f649e9da1b6aea0c10527ac4e8a88a37480000000000000000000000000f6aa46869220ae703924d5331d88a21dcef3b19d0000000000000000000000003d56e0ea536a78976503618d663921c97a3cba3c
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100885760003560e01c8063902e1c281161005b578063902e1c28146100f55780639fa53d2314610108578063cc9641a81461011d578063d784d4261461014457600080fd5b806320c7f1441461008d5780634372f61f146100bc578063452a9320146100e55780638da5cb5b146100ed575b600080fd5b6100a061009b36600461068e565b610157565b6040516001600160a01b03909116815260200160405180910390f35b6100a06100ca36600461068e565b6001602052600090815260409020546001600160a01b031681565b6100a06101c3565b6100a061024c565b6000546100a0906001600160a01b031681565b61011b61011636600461068e565b6102ac565b005b6100a07f0000000000000000000000005d17ea085f2ff5da3e6979d5d26f1dbab664ccf881565b61011b6101523660046106bf565b6104ce565b600080546040513060388201526f5af43d82803e903d91602b57fd5bf3ff60248201526001600160a01b039091166014820152733d602d80600a3d3981f3363d3d373d3d3d363d738152605881018390526037600c820120607882015260556043909101205b92915050565b60007f0000000000000000000000005d17ea085f2ff5da3e6979d5d26f1dbab664ccf86001600160a01b031663452a93206040518163ffffffff1660e01b8152600401602060405180830381865afa158015610223573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061024791906106e3565b905090565b60007f0000000000000000000000005d17ea085f2ff5da3e6979d5d26f1dbab664ccf86001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610223573d6000803e3d6000fd5b7f0000000000000000000000005d17ea085f2ff5da3e6979d5d26f1dbab664ccf86001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561030a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061032e91906106e3565b6001600160a01b0316336001600160a01b0316146103805760405162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b60448201526064015b60405180910390fd5b60008054610397906001600160a01b0316836105f1565b60405163fe4b84df60e01b8152600481018490529091506001600160a01b0382169063fe4b84df90602401600060405180830381600087803b1580156103dc57600080fd5b505af11580156103f0573d6000803e3d6000fd5b50505060008381526001602090815260409182902080546001600160a01b0319166001600160a01b0386169081179091558251635fcbd28560e01b815292517f771dec94398ec4301a89d6c591fcf9013337f8315c528f185f6e6749d17fa1f6945085939192635fcbd28592600480820193918290030181865afa15801561047c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104a091906106e3565b604080516001600160a01b039384168152929091166020830152810184905260600160405180910390a15050565b7f0000000000000000000000005d17ea085f2ff5da3e6979d5d26f1dbab664ccf86001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561052c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061055091906106e3565b6001600160a01b0316336001600160a01b03161461059d5760405162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b6044820152606401610377565b600080546001600160a01b0319166001600160a01b0383169081179091556040519081527fab64f92ab780ecbf4f3866f57cee465ff36c89450dcce20237ca7a8d81fb7d139060200160405180910390a150565b6000763d602d80600a3d3981f3363d3d373d3d3d363d730000008360601b60e81c176000526e5af43d82803e903d91602b57fd5bf38360781b1760205281603760096000f590506001600160a01b0381166101bd5760405162461bcd60e51b815260206004820152601760248201527f455243313136373a2063726561746532206661696c65640000000000000000006044820152606401610377565b6000602082840312156106a057600080fd5b5035919050565b6001600160a01b03811681146106bc57600080fd5b50565b6000602082840312156106d157600080fd5b81356106dc816106a7565b9392505050565b6000602082840312156106f557600080fd5b81516106dc816106a756fea2646970667358221220acbbdb5f4e596c0c44d97477c8bb8f13a93cd0fb25ed130dc51cba6bdc5dcc7964736f6c63430008130033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000005d17ea085f2ff5da3e6979d5d26f1dbab664ccf8000000000000000000000000000ca04b3225137b9110e77e12f1b484cc227de9000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000ae09f649e9da1b6aea0c10527ac4e8a88a37480000000000000000000000000f6aa46869220ae703924d5331d88a21dcef3b19d0000000000000000000000003d56e0ea536a78976503618d663921c97a3cba3c
-----Decoded View---------------
Arg [0] : _prismaCore (address): 0x5d17eA085F2FF5da3e6979D5d26F1dBaB664ccf8
Arg [1] : _depositTokenImpl (address): 0x000ca04b3225137b9110E77E12f1b484CC227De9
Arg [2] : _existingDeployments (address[]): 0x0Ae09f649e9dA1b6aEA0c10527aC4e8a88a37480,0xf6aA46869220Ae703924d5331D88A21DceF3b19d,0x3D56E0Ea536A78976503618d663921c97A3cBA3C
-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 0000000000000000000000005d17ea085f2ff5da3e6979d5d26f1dbab664ccf8
Arg [1] : 000000000000000000000000000ca04b3225137b9110e77e12f1b484cc227de9
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [4] : 0000000000000000000000000ae09f649e9da1b6aea0c10527ac4e8a88a37480
Arg [5] : 000000000000000000000000f6aa46869220ae703924d5331d88a21dcef3b19d
Arg [6] : 0000000000000000000000003d56e0ea536a78976503618d663921c97a3cba3c
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.