Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Method | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|---|
0x60806040 | 6799814 | 174 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.
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x926bBBdA...Bd1dec548 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
IdentityProxy
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.17; import "../interface/IImplementationAuthority.sol"; contract IdentityProxy { /** * @dev constructor of the proxy Identity contract * @param _implementationAuthority the implementation Authority contract address * @param initialManagementKey the management key at deployment * the proxy is going to use the logic deployed on the implementation contract * deployed at an address listed in the ImplementationAuthority contract */ constructor(address _implementationAuthority, address initialManagementKey) { require(_implementationAuthority != address(0), "invalid argument - zero address"); require(initialManagementKey != address(0), "invalid argument - zero address"); // solhint-disable-next-line no-inline-assembly assembly { sstore(0x821f3e4d3d679f19eacc940c87acf846ea6eae24a63058ea750304437a62aafc, _implementationAuthority) } address logic = IImplementationAuthority(_implementationAuthority).getImplementation(); // solhint-disable-next-line avoid-low-level-calls (bool success,) = logic.delegatecall(abi.encodeWithSignature("initialize(address)", initialManagementKey)); require(success, "Initialization failed."); } /** * @dev fallback proxy function used for any transaction call that is made using * the Identity contract ABI and called on the proxy contract * The proxy will update its local storage depending on the behaviour requested * by the implementation contract given by the Implementation Authority */ // solhint-disable-next-line no-complex-fallback fallback() external payable { address logic = IImplementationAuthority(implementationAuthority()).getImplementation(); // solhint-disable-next-line no-inline-assembly assembly { calldatacopy(0x0, 0x0, calldatasize()) let success := delegatecall(sub(gas(), 10000), logic, 0x0, calldatasize(), 0, 0) let retSz := returndatasize() returndatacopy(0, 0, retSz) switch success case 0 { revert(0, retSz) } default { return(0, retSz) } } } function implementationAuthority() public view returns(address) { address implemAuth; // solhint-disable-next-line no-inline-assembly assembly { implemAuth := sload(0x821f3e4d3d679f19eacc940c87acf846ea6eae24a63058ea750304437a62aafc) } return implemAuth; } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.17; interface IImplementationAuthority { // event emitted when the implementation contract is updated event UpdatedImplementation(address newAddress); /** * @dev updates the address used as implementation by the proxies linked * to this ImplementationAuthority contract * @param _newImplementation the address of the new implementation contract * only Owner can call */ function updateImplementation(address _newImplementation) external; /** * @dev returns the address of the implementation */ function getImplementation() external view returns(address); }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_implementationAuthority","type":"address"},{"internalType":"address","name":"initialManagementKey","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"implementationAuthority","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Deployed Bytecode
0x6080604052600436106100225760003560e01c80632307f882146100c857610023565b5b600061002d6100f3565b73ffffffffffffffffffffffffffffffffffffffff1663aaf10f426040518163ffffffff1660e01b8152600401602060405180830381865afa158015610077573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061009b9190610184565b90503660008037600080366000846127105a03f43d806000803e81600081146100c357816000f35b816000fd5b3480156100d457600080fd5b506100dd6100f3565b6040516100ea91906101c0565b60405180910390f35b6000807f821f3e4d3d679f19eacc940c87acf846ea6eae24a63058ea750304437a62aafc5490508091505090565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061015182610126565b9050919050565b61016181610146565b811461016c57600080fd5b50565b60008151905061017e81610158565b92915050565b60006020828403121561019a57610199610121565b5b60006101a88482850161016f565b91505092915050565b6101ba81610146565b82525050565b60006020820190506101d560008301846101b1565b9291505056fea264697066735822122087108c0e411bfe27737deb09117917821789f7599cced8134d2683b7969e34ae64736f6c63430008110033
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ 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.