Address Contract Partially Verified
Address
0xd1eEB2f30016FFfd746233Ee12c486E7Ca8eFeF1
Balance
0.010000 ETH ($21.66)
Nonce
2
Code Size
1276 bytes
Creator
0xe049aa81...591e at tx 0x7208dab1...c954e8
Indexed Transactions
0 (2 on-chain, 0.6% indexed)
Contract Bytecode
1276 bytes
0x60806040526004361061004a5760003560e01c8063025313a21461008e5780633659cfe6146100bf5780634f1ef286146100f45780635c60da1b146101aa578063f1739cae146101bf575b60006100546101f2565b90506001600160a01b03811661006957600080fd5b60405136600082376000803683855af43d806000843e81801561008a578184f35b8184fd5b34801561009a57600080fd5b506100a3610215565b604080516001600160a01b039092168252519081900360200190f35b3480156100cb57600080fd5b506100f2600480360360208110156100e257600080fd5b50356001600160a01b0316610246565b005b6100f26004803603604081101561010a57600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561013557600080fd5b82018360208201111561014757600080fd5b8035906020019184600183028401116401000000008311171561016957600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610277945050505050565b3480156101b657600080fd5b506100a36101f2565b3480156101cb57600080fd5b506100f2600480360360208110156101e257600080fd5b50356001600160a01b031661035c565b60008060405180806104a760219139604051908190036021019020549392505050565b604080517731b7b6973219b632b233b2b917383937bc3c9737bbb732b960411b815290519081900360180190205490565b61024e610215565b6001600160a01b0316336001600160a01b03161461026b57600080fd5b610274816103e8565b50565b61027f610215565b6001600160a01b0316336001600160a01b03161461029c57600080fd5b6102a582610246565b6000306001600160a01b031634836040518082805190602001908083835b602083106102e25780518252601f1990920191602091820191016102c3565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610344576040519150601f19603f3d011682016040523d82523d6000602084013e610349565b606091505b505090508061035757600080fd5b505050565b610364610215565b6001600160a01b0316336001600160a01b03161461038157600080fd5b6001600160a01b03811661039457600080fd5b7f5a3e66efaa1e445ebd894728a69d6959842ea1e97bd79b892797106e270efcd96103bd610215565b604080516001600160a01b03928316815291841660208301528051918290030190a161027481610454565b60006103f26101f2565b9050816001600160a01b0316816001600160a01b0316141561041357600080fd5b61041c82610484565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a25050565b604080517731b7b6973219b632b233b2b917383937bc3c9737bbb732b960411b8152905190819003601801902055565b600060405180806104a76021913960405190819003602101902092909255505056fe636f6d2e64336c65646765722e70726f78792e696d706c656d656e746174696f6ea265627a7a72305820fb4836e043122dcba66dc2661d87a24e8c10220ade499604e502336fedda4ae464736f6c63430005090032
Verified Source Code Partial Match
Compiler: v0.5.9+commit.c68bc34e
EVM: petersburg
Optimization: Yes (200 runs)
Proxy.sol 34 lines
pragma solidity ^0.5.8;
/**
* @title Proxy
* @dev Gives the possibility to delegate any call to a foreign implementation.
*/
contract Proxy {
/**
* @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);
/**
* @dev Fallback function allowing to perform a delegatecall to the given implementation.
* This function will return whatever the implementation call returns
*/
function () payable external {
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) }
}
}
}
UpgradeabilityProxy.sol 56 lines
pragma solidity ^0.5.8;
import './Proxy.sol';
/**
* @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 implementationPosition = keccak256("com.d3ledger.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 = implementationPosition;
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 = implementationPosition;
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);
}
}
OwnedUpgradeabilityProxy.sol 86 lines
pragma solidity ^0.5.8;
import './UpgradeabilityProxy.sol';
/**
* @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 proxyOwnerPosition = keccak256("com.d3ledger.proxy.owner");
/**
* @dev the constructor sets the original owner of the contract to the sender account.
*/
constructor() public {
setUpgradeabilityOwner(msg.sender);
}
/**
* @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 = proxyOwnerPosition;
assembly {
owner := sload(position)
}
}
/**
* @dev Sets the address of the owner
*/
function setUpgradeabilityOwner(address newProxyOwner) internal {
bytes32 position = proxyOwnerPosition;
assembly {
sstore(position, newProxyOwner)
}
}
/**
* @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));
emit ProxyOwnershipTransferred(proxyOwner(), newOwner);
setUpgradeabilityOwner(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 Allows the proxy owner to upgrade the current version of the proxy and call the new implementation
* to initialize whatever is needed through a low level call.
* @param implementation representing the address of the new implementation to be set.
* @param data represents the msg.data to bet sent in the low level call. This parameter may include the function
* signature of the implementation to be called with the needed payload
*/
function upgradeToAndCall(address implementation, bytes memory data) payable public onlyProxyOwner {
upgradeTo(implementation);
(bool success,) = address(this).call.value(msg.value)(data);
require(success);
}
}
Read Contract
implementation 0x5c60da1b → address
proxyOwner 0x025313a2 → address
Write Contract 3 functions
These functions modify contract state and require a wallet transaction to execute.
transferProxyOwnership 0xf1739cae
address newOwner
upgradeTo 0x3659cfe6
address implementation
upgradeToAndCall 0x4f1ef286
address implementation
bytes data
Recent Transactions
This address has 2 on-chain transactions, but only 0.6% of the chain is indexed. Transactions will appear as indexing progresses. View on Etherscan →