Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 6 from a total of 6 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Deploy Contract | 20531345 | 144 days ago | IN | 0 ETH | 0.00105543 | ||||
Deploy Contract | 20530696 | 144 days ago | IN | 0 ETH | 0.00501538 | ||||
Deploy Contract | 20530695 | 144 days ago | IN | 0 ETH | 0.00236566 | ||||
Deploy Contract | 20530694 | 144 days ago | IN | 0 ETH | 0.00239844 | ||||
Set Authority | 20529620 | 144 days ago | IN | 0 ETH | 0.00008781 | ||||
Deploy Contract | 20529619 | 144 days ago | IN | 0 ETH | 0.00132583 |
Latest 5 internal transactions
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
20531345 | 144 days ago | Contract Creation | 0 ETH | |||
20530696 | 144 days ago | Contract Creation | 0 ETH | |||
20530695 | 144 days ago | Contract Creation | 0 ETH | |||
20530694 | 144 days ago | Contract Creation | 0 ETH | |||
20529619 | 144 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xE2835f53...CB3FcD4cc The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
Deployer
Compiler Version
v0.8.21+commit.d9974bed
Optimization Enabled:
Yes with 200 runs
Other Settings:
shanghai EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: Apache-2.0 pragma solidity 0.8.21; import {Auth, Authority} from "@solmate/auth/Auth.sol"; import {CREATE3} from "@solmate/utils/CREATE3.sol"; contract Deployer is Auth { mapping(address => bool) public isDeployer; error Deployer__NotADeployer(); /** * @notice Emitted on `deployContract` calls. * @param name string name used to derive salt for deployment * @param contractAddress the newly deployed contract address * @param creationCodeHash keccak256 hash of the creation code * - useful to determine creation code is the same across multiple chains */ event ContractDeployed(string name, address contractAddress, bytes32 creationCodeHash); constructor(address _owner, Authority _auth) Auth(_owner, _auth) {} /** * @notice Deploy some contract to a deterministic address. * @param name string used to derive salt for deployment * @dev Should be of form: * "ContractName Version 0.0" * Where the numbers after version are VERSION . SUBVERSION * @param creationCode the contract creation code to deploy * - can be obtained by calling type(contractName).creationCode * @param constructorArgs the contract constructor arguments if any * - must be of form abi.encode(arg1, arg2, ...) * @param value non zero if constructor needs to be payable */ function deployContract( string calldata name, bytes memory creationCode, bytes calldata constructorArgs, uint256 value ) external requiresAuth returns (address) { bytes32 creationCodeHash = keccak256(creationCode); if (constructorArgs.length > 0) { // Append constructor args to end of creation code. creationCode = abi.encodePacked(creationCode, constructorArgs); } bytes32 salt = convertNameToBytes32(name); address contractAddress = CREATE3.deploy(salt, creationCode, value); emit ContractDeployed(name, contractAddress, creationCodeHash); return contractAddress; } function getAddress(string calldata name) external view returns (address) { bytes32 salt = convertNameToBytes32(name); return CREATE3.getDeployed(salt); } function convertNameToBytes32(string calldata name) public pure returns (bytes32) { return keccak256(abi.encode(name)); } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; /// @notice Provides a flexible and updatable auth pattern which is completely separate from application logic. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/auth/Auth.sol) /// @author Modified from Dappsys (https://github.com/dapphub/ds-auth/blob/master/src/auth.sol) abstract contract Auth { event OwnershipTransferred(address indexed user, address indexed newOwner); event AuthorityUpdated(address indexed user, Authority indexed newAuthority); address public owner; Authority public authority; constructor(address _owner, Authority _authority) { owner = _owner; authority = _authority; emit OwnershipTransferred(msg.sender, _owner); emit AuthorityUpdated(msg.sender, _authority); } modifier requiresAuth() virtual { require(isAuthorized(msg.sender, msg.sig), "UNAUTHORIZED"); _; } function isAuthorized(address user, bytes4 functionSig) internal view virtual returns (bool) { Authority auth = authority; // Memoizing authority saves us a warm SLOAD, around 100 gas. // Checking if the caller is the owner only after calling the authority saves gas in most cases, but be // aware that this makes protected functions uncallable even to the owner if the authority is out of order. return (address(auth) != address(0) && auth.canCall(user, address(this), functionSig)) || user == owner; } function setAuthority(Authority newAuthority) public virtual { // We check if the caller is the owner first because we want to ensure they can // always swap out the authority even if it's reverting or using up a lot of gas. require(msg.sender == owner || authority.canCall(msg.sender, address(this), msg.sig)); authority = newAuthority; emit AuthorityUpdated(msg.sender, newAuthority); } function transferOwnership(address newOwner) public virtual requiresAuth { owner = newOwner; emit OwnershipTransferred(msg.sender, newOwner); } } /// @notice A generic interface for a contract which provides authorization data to an Auth instance. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/auth/Auth.sol) /// @author Modified from Dappsys (https://github.com/dapphub/ds-auth/blob/master/src/auth.sol) interface Authority { function canCall( address user, address target, bytes4 functionSig ) external view returns (bool); }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; import {Bytes32AddressLib} from "./Bytes32AddressLib.sol"; /// @notice Deploy to deterministic addresses without an initcode factor. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/CREATE3.sol) /// @author Modified from 0xSequence (https://github.com/0xSequence/create3/blob/master/contracts/Create3.sol) library CREATE3 { using Bytes32AddressLib for bytes32; //--------------------------------------------------------------------------------// // Opcode | Opcode + Arguments | Description | Stack View // //--------------------------------------------------------------------------------// // 0x36 | 0x36 | CALLDATASIZE | size // // 0x3d | 0x3d | RETURNDATASIZE | 0 size // // 0x3d | 0x3d | RETURNDATASIZE | 0 0 size // // 0x37 | 0x37 | CALLDATACOPY | // // 0x36 | 0x36 | CALLDATASIZE | size // // 0x3d | 0x3d | RETURNDATASIZE | 0 size // // 0x34 | 0x34 | CALLVALUE | value 0 size // // 0xf0 | 0xf0 | CREATE | newContract // //--------------------------------------------------------------------------------// // Opcode | Opcode + Arguments | Description | Stack View // //--------------------------------------------------------------------------------// // 0x67 | 0x67XXXXXXXXXXXXXXXX | PUSH8 bytecode | bytecode // // 0x3d | 0x3d | RETURNDATASIZE | 0 bytecode // // 0x52 | 0x52 | MSTORE | // // 0x60 | 0x6008 | PUSH1 08 | 8 // // 0x60 | 0x6018 | PUSH1 18 | 24 8 // // 0xf3 | 0xf3 | RETURN | // //--------------------------------------------------------------------------------// bytes internal constant PROXY_BYTECODE = hex"67_36_3d_3d_37_36_3d_34_f0_3d_52_60_08_60_18_f3"; bytes32 internal constant PROXY_BYTECODE_HASH = keccak256(PROXY_BYTECODE); function deploy( bytes32 salt, bytes memory creationCode, uint256 value ) internal returns (address deployed) { bytes memory proxyChildBytecode = PROXY_BYTECODE; address proxy; /// @solidity memory-safe-assembly assembly { // Deploy a new contract with our pre-made bytecode via CREATE2. // We start 32 bytes into the code to avoid copying the byte length. proxy := create2(0, add(proxyChildBytecode, 32), mload(proxyChildBytecode), salt) } require(proxy != address(0), "DEPLOYMENT_FAILED"); deployed = getDeployed(salt); (bool success, ) = proxy.call{value: value}(creationCode); require(success && deployed.code.length != 0, "INITIALIZATION_FAILED"); } function getDeployed(bytes32 salt) internal view returns (address) { return getDeployed(salt, address(this)); } function getDeployed(bytes32 salt, address creator) internal pure returns (address) { address proxy = keccak256( abi.encodePacked( // Prefix: bytes1(0xFF), // Creator: creator, // Salt: salt, // Bytecode hash: PROXY_BYTECODE_HASH ) ).fromLast20Bytes(); return keccak256( abi.encodePacked( // 0xd6 = 0xc0 (short RLP prefix) + 0x16 (length of: 0x94 ++ proxy ++ 0x01) // 0x94 = 0x80 + 0x14 (0x14 = the length of an address, 20 bytes, in hex) hex"d6_94", proxy, hex"01" // Nonce of the proxy contract (1) ) ).fromLast20Bytes(); } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; /// @notice Library for converting between addresses and bytes32 values. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/Bytes32AddressLib.sol) library Bytes32AddressLib { function fromLast20Bytes(bytes32 bytesValue) internal pure returns (address) { return address(uint160(uint256(bytesValue))); } function fillLast12Bytes(address addressValue) internal pure returns (bytes32) { return bytes32(bytes20(addressValue)); } }
{ "remappings": [ "@solmate/=lib/solmate/src/", "@forge-std/=lib/forge-std/src/", "@ds-test/=lib/forge-std/lib/ds-test/src/", "ds-test/=lib/forge-std/lib/ds-test/src/", "@openzeppelin/=lib/openzeppelin-contracts/", "@ccip/=lib/ccip/", "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "LayerZero-v2/=lib/LayerZero-v2/", "ccip/=lib/ccip/contracts/", "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "solmate/=lib/solmate/src/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "shanghai", "viaIR": false, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"contract Authority","name":"_auth","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"Deployer__NotADeployer","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"contract Authority","name":"newAuthority","type":"address"}],"name":"AuthorityUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"address","name":"contractAddress","type":"address"},{"indexed":false,"internalType":"bytes32","name":"creationCodeHash","type":"bytes32"}],"name":"ContractDeployed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"authority","outputs":[{"internalType":"contract Authority","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"}],"name":"convertNameToBytes32","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"bytes","name":"creationCode","type":"bytes"},{"internalType":"bytes","name":"constructorArgs","type":"bytes"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"deployContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"}],"name":"getAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isDeployer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract Authority","name":"newAuthority","type":"address"}],"name":"setAuthority","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Deployed Bytecode
0x608060405234801561000f575f80fd5b5060043610610085575f3560e01c8063bf7e214f11610058578063bf7e214f14610112578063ef5de7e314610125578063f2fde38b14610138578063f74907a21461014b575f80fd5b806350c358a4146100895780637a9e5e4b146100c05780638da5cb5b146100d5578063bf40fac1146100ff575b5f80fd5b6100ab61009736600461072b565b60026020525f908152604090205460ff1681565b60405190151581526020015b60405180910390f35b6100d36100ce36600461072b565b61016c565b005b5f546100e7906001600160a01b031681565b6040516001600160a01b0390911681526020016100b7565b6100e761010d366004610792565b610250565b6001546100e7906001600160a01b031681565b6100e76101333660046107e5565b61026f565b6100d361014636600461072b565b61035e565b61015e610159366004610792565b6103f8565b6040519081526020016100b7565b5f546001600160a01b03163314806101fd575060015460405163b700961360e01b81526001600160a01b039091169063b7009613906101be90339030906001600160e01b03195f3516906004016108ea565b602060405180830381865afa1580156101d9573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101fd9190610917565b610205575f80fd5b600180546001600160a01b0319166001600160a01b03831690811790915560405133907fa3396fd7f6e0a21b50e5089d2da70d5ac0a3bbbd1f617a93f134b76389980198905f90a350565b5f8061025c84846103f8565b90506102678161042a565b949350505050565b5f610285335f356001600160e01b03191661043b565b6102c55760405162461bcd60e51b815260206004820152600c60248201526b15539055551213d49256915160a21b60448201526064015b60405180910390fd5b8451602086012083156102f9578585856040516020016102e793929190610963565b60405160208183030381529060405295505b5f61030489896103f8565b90505f6103128289876104e1565b90507fd928a3951eedba2f72a5eb8c15b591ead63c282f21b2f5e93506fb88cae27fec8a8a838660405161034994939291906109a9565b60405180910390a19998505050505050505050565b610373335f356001600160e01b03191661043b565b6103ae5760405162461bcd60e51b815260206004820152600c60248201526b15539055551213d49256915160a21b60448201526064016102bc565b5f80546001600160a01b0319166001600160a01b0383169081178255604051909133917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a350565b5f828260405160200161040c9291906109d8565b60405160208183030381529060405280519060200120905092915050565b5f6104358230610630565b92915050565b6001545f906001600160a01b031680158015906104c2575060405163b700961360e01b81526001600160a01b0382169063b700961390610483908790309088906004016108ea565b602060405180830381865afa15801561049e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104c29190610917565b8061026757505f546001600160a01b0385811691161491505092915050565b5f806040518060400160405280601081526020016f67363d3d37363d34f03d5260086018f360801b81525090505f858251602084015ff590506001600160a01b0381166105645760405162461bcd60e51b81526020600482015260116024820152701111541313d65351539517d19052531151607a1b60448201526064016102bc565b61056d8661042a565b92505f816001600160a01b0316858760405161058991906109eb565b5f6040518083038185875af1925050503d805f81146105c3576040519150601f19603f3d011682016040523d82523d5f602084013e6105c8565b606091505b505090508080156105e257506001600160a01b0384163b15155b6106265760405162461bcd60e51b815260206004820152601560248201527412539255125053125690551253d397d19052531151605a1b60448201526064016102bc565b5050509392505050565b604080518082018252601081526f67363d3d37363d34f03d5260086018f360801b60209182015290516001600160f81b0319918101919091526bffffffffffffffffffffffff19606083901b166021820152603581018390527f21c35dbe1b344a2488cf3321d6ce542f8e9f305544ff09e4993a62319a497c1f60558201525f9081906106d4906075015b6040516020818303038152906040528051906020012090565b6040516135a560f21b60208201526bffffffffffffffffffffffff19606083901b166022820152600160f81b6036820152909150610267906037016106bb565b6001600160a01b0381168114610728575f80fd5b50565b5f6020828403121561073b575f80fd5b813561074681610714565b9392505050565b5f8083601f84011261075d575f80fd5b50813567ffffffffffffffff811115610774575f80fd5b60208301915083602082850101111561078b575f80fd5b9250929050565b5f80602083850312156107a3575f80fd5b823567ffffffffffffffff8111156107b9575f80fd5b6107c58582860161074d565b90969095509350505050565b634e487b7160e01b5f52604160045260245ffd5b5f805f805f80608087890312156107fa575f80fd5b863567ffffffffffffffff80821115610811575f80fd5b61081d8a838b0161074d565b90985096506020890135915080821115610835575f80fd5b818901915089601f830112610848575f80fd5b81358181111561085a5761085a6107d1565b604051601f8201601f19908116603f01168101908382118183101715610882576108826107d1565b816040528281528c602084870101111561089a575f80fd5b826020860160208301375f6020848301015280985050505060408901359150808211156108c5575f80fd5b506108d289828a0161074d565b979a9699509497949695606090950135949350505050565b6001600160a01b0393841681529190921660208201526001600160e01b0319909116604082015260600190565b5f60208284031215610927575f80fd5b81518015158114610746575f80fd5b5f81515f5b81811015610955576020818501810151868301520161093b565b505f93019283525090919050565b5f61096e8286610936565b838582375f930192835250909392505050565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b606081525f6109bc606083018688610981565b6001600160a01b03949094166020830152506040015292915050565b602081525f610267602083018486610981565b5f610746828461093656fea2646970667358221220a6768979871bc4841cd1f72e1b60884402cd50259850d7ef4025e1001d2e4fcd64736f6c63430008150033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 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.