Verified contractPartial
BeaconProxy
Address0x0c495c084d8e65459aa1cdeaaca76c280472e5cb
- Balance
0 ETH
- Transactions
513
- Compiler
solc 0.8.3
- Same code
127 more contracts
Details
- Compiler
- solc 0.8.3+commit.8d00100c
- Language
- solidity
- Optimization
- Yes, 200 runs
- EVM version
- istanbul
- License
- Not stated
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 12,494,972
- Creation transaction
- 0x9e261aee60…e328ce4d4b
BeaconProxy.sol
// File contracts/beacon/IBeacon.sol
pragma solidity ^0.8.0;
interface IBeacon {
function latestCopy() external view returns(address);
}
// File contracts/beacon/BeaconProxy.sol
pragma solidity ^0.8.0;
contract BeaconProxy {
bytes32 private constant BEACON_SLOT = keccak256(abi.encodePacked("fairmint.beaconproxy.beacon"));
constructor() public {
_setBeacon(msg.sender);
}
function _setBeacon(address _beacon) private {
bytes32 slot = BEACON_SLOT;
assembly {
sstore(slot, _beacon)
}
}
function _getBeacon() internal view returns(address beacon) {
bytes32 slot = BEACON_SLOT;
assembly {
beacon := sload(slot)
}
}
function _getMasterCopy() internal view returns(address) {
IBeacon beacon = IBeacon(_getBeacon());
return beacon.latestCopy();
}
fallback() external payable {
address copy = _getMasterCopy();
assembly {
calldatacopy(0, 0, calldatasize())
let result := delegatecall(gas(), copy, 0, calldatasize(), 0, 0)
let size := returndatasize()
returndatacopy(0, 0, size)
switch result
case 0 { revert(0, size) }
default { return(0, size) }
}
}
}Compiler settingsShow
{
"metadata": {
"bytecodeHash": "ipfs"
},
"libraries": {},
"optimizer": {
"runs": 200,
"enabled": true
},
"evmVersion": "istanbul",
"remappings": []
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.