More Info
Private Name Tags
ContractCreator
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
8575142 | 1948 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Name:
UpgradeBeaconProxyV1
Compiler Version
v0.5.11+commit.c082d0b4
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2019-09-18 */ pragma solidity 0.5.11; // optimization runs: 200, evm version: petersburg /** * @title UpgradeBeaconProxyV1 * @author 0age * @notice This contract delegates all logic, including initialization, to an * implementation contract specified by a hard-coded "upgrade beacon" contract. * Note that this implementation can be reduced in size by stripping out the * metadata hash, or even more significantly by using a minimal upgrade beacon * proxy implemented using raw EVM opcodes. */ contract UpgradeBeaconProxyV1 { // Set upgrade beacon address as a constant (i.e. not in contract storage). address private constant _UPGRADE_BEACON = address( 0x000000000026750c571ce882B17016557279ADaa ); /** * @notice In the constructor, perform initialization via delegatecall to the * implementation set on the upgrade beacon, supplying initialization calldata * as a constructor argument. The deployment will revert and pass along the * revert reason in the event that this initialization delegatecall reverts. * @param initializationCalldata Calldata to supply when performing the * initialization delegatecall. */ constructor(bytes memory initializationCalldata) public payable { // Delegatecall into the implementation, supplying initialization calldata. (bool ok, ) = _implementation().delegatecall(initializationCalldata); // Revert and include revert data if delegatecall to implementation reverts. if (!ok) { assembly { returndatacopy(0, 0, returndatasize) revert(0, returndatasize) } } } /** * @notice In the fallback, delegate execution to the implementation set on * the upgrade beacon. */ function () external payable { // Delegate execution to implementation contract provided by upgrade beacon. _delegate(_implementation()); } /** * @notice Private view function to get the current implementation from the * upgrade beacon. This is accomplished via a staticcall to the beacon with no * data, and the beacon will return an abi-encoded implementation address. * @return implementation Address of the implementation. */ function _implementation() private view returns (address implementation) { // Get the current implementation address from the upgrade beacon. (bool ok, bytes memory returnData) = _UPGRADE_BEACON.staticcall(""); // Revert and pass along revert message if call to upgrade beacon reverts. require(ok, string(returnData)); // Set the implementation to the address returned from the upgrade beacon. implementation = abi.decode(returnData, (address)); } /** * @notice Private function that delegates execution to an implementation * contract. This is a low level function that doesn't return to its internal * call site. It will return whatever is returned by the implementation to the * external caller, reverting and returning the revert data if implementation * reverts. * @param implementation Address to delegate. */ function _delegate(address implementation) private { assembly { // Copy msg.data. We take full control of memory in this inline assembly // block because it will not return to Solidity code. We overwrite the // Solidity scratch pad at memory position 0. calldatacopy(0, 0, calldatasize) // Delegatecall to the implementation, supplying calldata and gas. // Out and outsize are set to zero - instead, use the return buffer. let result := delegatecall(gas, implementation, 0, calldatasize, 0, 0) // Copy the returned data from the return buffer. returndatacopy(0, 0, returndatasize) switch result // Delegatecall returns 0 on error. case 0 { revert(0, returndatasize) } default { return(0, returndatasize) } } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"bytes","name":"initializationCalldata","type":"bytes"}],"payable":true,"stateMutability":"payable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"}]
Contract Creation Code
60806040526040516104423803806104428339818101604052602081101561002657600080fd5b810190808051604051939291908464010000000082111561004657600080fd5b90830190602082018581111561005b57600080fd5b825164010000000081118282018810171561007557600080fd5b82525081516020918201929091019080838360005b838110156100a257818101518382015260200161008a565b50505050905090810190601f1680156100cf5780820380516001836020036101000a031916815260200191505b5060405250505060006100e661019e60201b60201c565b6001600160a01b0316826040518082805190602001908083835b6020831061011f5780518252601f199092019160209182019101610100565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d806000811461017f576040519150601f19603f3d011682016040523d82523d6000602084013e610184565b606091505b5050905080610197573d6000803e3d6000fd5b50506102be565b60405160009081906060906e26750c571ce882b17016557279adaa9083818181855afa9150503d80600081146101f0576040519150601f19603f3d011682016040523d82523d6000602084013e6101f5565b606091505b509150915081819061029f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561026457818101518382015260200161024c565b50505050905090810190601f1680156102915780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b508080602001905160208110156102b557600080fd5b50519392505050565b610175806102cd6000396000f3fe608060405261001461000f610016565b61011c565b005b60405160009081906060906e26750c571ce882b17016557279adaa9083818181855afa9150503d8060008114610068576040519150601f19603f3d011682016040523d82523d6000602084013e61006d565b606091505b50915091508181906100fd5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156100c25781810151838201526020016100aa565b50505050905090810190601f1680156100ef5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5080806020019051602081101561011357600080fd5b50519392505050565b3660008037600080366000845af43d6000803e80801561013b573d6000f35b3d6000fdfea265627a7a7231582020202020202055706772616465426561636f6e50726f7879563120202020202064736f6c634300050b003200000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000024c4d66de80000000000000000000000007e4a8391c728fed9069b2962699ab416628b19fa00000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405261001461000f610016565b61011c565b005b60405160009081906060906e26750c571ce882b17016557279adaa9083818181855afa9150503d8060008114610068576040519150601f19603f3d011682016040523d82523d6000602084013e61006d565b606091505b50915091508181906100fd5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156100c25781810151838201526020016100aa565b50505050905090810190601f1680156100ef5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5080806020019051602081101561011357600080fd5b50519392505050565b3660008037600080366000845af43d6000803e80801561013b573d6000f35b3d6000fdfea265627a7a7231582020202020202055706772616465426561636f6e50726f7879563120202020202064736f6c634300050b0032
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000024c4d66de80000000000000000000000007e4a8391c728fed9069b2962699ab416628b19fa00000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : initializationCalldata (bytes): 0xc4d66de80000000000000000000000007e4a8391c728fed9069b2962699ab416628b19fa
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000020
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000024
Arg [2] : c4d66de80000000000000000000000007e4a8391c728fed9069b2962699ab416
Arg [3] : 628b19fa00000000000000000000000000000000000000000000000000000000
Deployed Bytecode Sourcemap
502:3427:0:-;;;1861:28;1871:17;:15;:17::i;:::-;1861:9;:28::i;:::-;502:3427;2214:488;2403:30;;2263:22;;;;2376:23;;673:42;;2263:22;2403:30;2263:22;2403:30;673:42;2403:30;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;2366:67:0;;;;2534:2;2545:10;2526:31;;;;;-1:-1:-1;;;2526:31:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;2526:31:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2674:10;2663:33;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2663:33:0;;2214:488;-1:-1:-1;;;2214:488:0:o;3107:819::-;3413:12;3410:1;3407;3394:32;3654:1;3651;3637:12;3634:1;3618:14;3613:3;3600:56;3744:14;3741:1;3738;3723:36;3776:6;3833:36;;;;3897:14;3894:1;3887:25;3833:36;3852:14;3849:1;3842:25
Swarm Source
bzzr://20202020202055706772616465426561636f6e50726f78795631202020202020
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.