Address Contract Partially Verified
Address
0x4e9B1C25679AD3E5f522b2A9dA1595a40DFa982B
Balance
0 ETH
Nonce
1
Code Size
869 bytes
Creator
0x873f59A0...bc42 at tx 0x9d7efe09...32a2a2
Indexed Transactions
0
Contract Bytecode
869 bytes
0x60806040526004361061005b577c01000000000000000000000000000000000000000000000000000000006000350463025313a281146100a15780633659cfe6146100d25780635c60da1b14610107578063f1739cae1461011c575b600061006561014f565b9050600160a060020a038116151561007c57600080fd5b60405136600082376000803683855af43d806000843e81801561009d578184f35b8184fd5b3480156100ad57600080fd5b506100b6610172565b60408051600160a060020a039092168252519081900360200190f35b3480156100de57600080fd5b50610105600480360360208110156100f557600080fd5b5035600160a060020a03166101a8565b005b34801561011357600080fd5b506100b661014f565b34801561012857600080fd5b506101056004803603602081101561013f57600080fd5b5035600160a060020a03166101d0565b600080604051808061031660249139604051908190036024019020549392505050565b604080517f6d696e7461626c652e6572633732312e70726f78792e6f776e657200000000008152905190819003601b0190205490565b6101b0610172565b600160a060020a031633146101c457600080fd5b6101cd81610258565b50565b6101d8610172565b600160a060020a031633146101ec57600080fd5b600160a060020a038116151561020157600080fd5b61020a816102be565b7f5a3e66efaa1e445ebd894728a69d6959842ea1e97bd79b892797106e270efcd9610233610172565b60408051600160a060020a03928316815291841660208301528051918290030190a150565b600061026261014f565b9050600160a060020a03808216908316141561027d57600080fd5b610286826102f3565b604051600160a060020a038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a25050565b604080517f6d696e7461626c652e6572633732312e70726f78792e6f776e657200000000008152905190819003601b01902055565b600060405180806103166024913960405190819003602401902092909255505056fe6d696e7461626c652e6572633732312e70726f78792e696d706c656d656e746174696f6ea165627a7a72305820c6d34bfa42a0a41960fc28b63b0e657c4d3a121951008da41fd80be1c18af1300029
Verified Source Code Partial Match
Compiler: v0.5.2+commit.1df8f40c
EVM: byzantium
Optimization: Yes (200 runs)
OwnedUpgradeabilityProxy.sol 159 lines
pragma solidity ^0.5.0;
/**
* @title Proxy
* @dev Gives the possibility to delegate any call to a foreign implementation.
*/
contract Proxy {
/**
* @dev Fallback function allowing to perform a delegatecall to the given implementation.
* This function will return whatever the implementation call returns
*/
function () external payable {
address _impl = implementation();
require(_impl != address(0));
assembly {
let ptr := mload(0x40)
calldatacopy(ptr, 0, calldatasize)
let result := delegatecall(gas, _impl, ptr, calldatasize, 0, 0)
let size := returndatasize
returndatacopy(ptr, 0, size)
switch result
case 0 { revert(ptr, size) }
default { return(ptr, size) }
}
}
/**
* @dev Tells the address of the implementation where every call will be delegated.
* @return address of the implementation to which it will be delegated
*/
function implementation() public view returns (address);
}
/**
* @title UpgradeabilityProxy
* @dev This contract represents a proxy where the implementation address to which it will delegate can be upgraded
*/
contract UpgradeabilityProxy is Proxy {
/**
* @dev This event will be emitted every time the implementation gets upgraded
* @param implementation representing the address of the upgraded implementation
*/
event Upgraded(address indexed implementation);
// Storage position of the address of the current implementation
bytes32 private constant IMPLEMENTATION_POSITION = keccak256("mintable.erc721.proxy.implementation");
/**
* @dev Constructor function
*/
constructor() public {}
/**
* @dev Tells the address of the current implementation
* @return address of the current implementation
*/
function implementation() public view returns (address impl) {
bytes32 position = IMPLEMENTATION_POSITION;
assembly {
impl := sload(position)
}
}
/**
* @dev Sets the address of the current implementation
* @param _newImplementation address representing the new implementation to be set
*/
function _setImplementation(address _newImplementation) internal {
bytes32 position = IMPLEMENTATION_POSITION;
assembly {
sstore(position, _newImplementation)
}
}
/**
* @dev Upgrades the implementation address
* @param _newImplementation representing the address of the new implementation to be set
*/
function _upgradeTo(address _newImplementation) internal {
address currentImplementation = implementation();
require(currentImplementation != _newImplementation);
_setImplementation(_newImplementation);
emit Upgraded(_newImplementation);
}
}
/**
* @title OwnedUpgradeabilityProxy
* @dev This contract combines an upgradeability proxy with basic authorization control functionalities
*/
contract OwnedUpgradeabilityProxy is UpgradeabilityProxy {
/**
* @dev Event to show ownership has been transferred
* @param previousOwner representing the address of the previous owner
* @param newOwner representing the address of the new owner
*/
event ProxyOwnershipTransferred(address previousOwner, address newOwner);
// Storage position of the owner of the contract
bytes32 private constant PROXY_OWNER_POSITION = keccak256("mintable.erc721.proxy.owner");
/**
* @dev the constructor sets the original owner of the contract to the sender account.
*/
constructor(address _implementation) public {
_setUpgradeabilityOwner(msg.sender);
_upgradeTo(_implementation);
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyProxyOwner() {
require(msg.sender == proxyOwner());
_;
}
/**
* @dev Tells the address of the owner
* @return the address of the owner
*/
function proxyOwner() public view returns (address owner) {
bytes32 position = PROXY_OWNER_POSITION;
assembly {
owner := sload(position)
}
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function transferProxyOwnership(address _newOwner) public onlyProxyOwner {
require(_newOwner != address(0));
_setUpgradeabilityOwner(_newOwner);
emit ProxyOwnershipTransferred(proxyOwner(), _newOwner);
}
/**
* @dev Allows the proxy owner to upgrade the current version of the proxy.
* @param _implementation representing the address of the new implementation to be set.
*/
function upgradeTo(address _implementation) public onlyProxyOwner {
_upgradeTo(_implementation);
}
/**
* @dev Sets the address of the owner
*/
function _setUpgradeabilityOwner(address _newProxyOwner) internal {
bytes32 position = PROXY_OWNER_POSITION;
assembly {
sstore(position, _newProxyOwner)
}
}
}
Read Contract
implementation 0x5c60da1b → address
proxyOwner 0x025313a2 → address
Write Contract 2 functions
These functions modify contract state and require a wallet transaction to execute.
transferProxyOwnership 0xf1739cae
address _newOwner
upgradeTo 0x3659cfe6
address _implementation
Recent Transactions
No transactions found for this address