Address Contract Partially Verified
Address
0x1C77d15857646687005dbbAfFf5873F4495a9731
Balance
0 ETH
Nonce
1
Code Size
990 bytes
Creator
0xE6610D35...ea19 at tx 0xc37796ec...afc560
Proxy
EIP-1967 Proxy Implementation: 0x0b1F6ACa...617C
Indexed Transactions
0
Contract Bytecode
990 bytes
0x6080604052600436106100295760003560e01c8063795e617e146100a8578063e2f273bd146100ea575b604080517f656970313936372e70726f78792e696d706c656d656e746174696f6e000000008152905190819003601c0190207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0180543660008037600080366000846127105a03f43d806000803e8180156100a357816000f35b816000fd5b3480156100b457600080fd5b506100e8600480360360208110156100cb57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661012a565b005b3480156100f657600080fd5b506100e86004803603602081101561010d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661020c565b6101326102ee565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260318152602001806103476031913960400191505060405180910390fd5b604080517f656970313936372e70726f78792e696d706c656d656e746174696f6e000000008152905190819003601c0190207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0155565b6102146102ee565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610297576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260328152602001806103786032913960400191505060405180910390fd5b604080517f656970313936372e70726f78792e61646d696e00000000000000000000000000815290519081900360130190207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0155565b604080517f656970313936372e70726f78792e61646d696e00000000000000000000000000815290519081900360130190207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01549056fe4f6e6c792041646d696e2073686f756c642062652061626c6520746f207570646174652074686520636f6e7472616374734f6e6c79207468652063757272656e742061646d696e2073686f756c642062652061626c6520746f206e65772061646d696ea265627a7a72315820ac7cf23758492d4ed7e0d53829680603e682665a7308a9ac8c4c46c940b675d364736f6c63430005110032
Verified Source Code Partial Match
Compiler: v0.5.17+commit.d19bba13
EVM: istanbul
Optimization: Yes (1000000 runs)
MPondProxy.sol 87 lines
pragma solidity >=0.4.21 <0.7.0;
contract MPondProxy {
bytes32 internal constant IMPLEMENTATION_SLOT = bytes32(
uint256(keccak256("eip1967.proxy.implementation")) - 1
);
bytes32 internal constant PROXY_ADMIN_SLOT = bytes32(
uint256(keccak256("eip1967.proxy.admin")) - 1
);
constructor(address contractLogic, address proxyAdmin) public {
// save the code address
bytes32 slot = IMPLEMENTATION_SLOT;
assembly {
sstore(slot, contractLogic)
}
// save the proxy admin
slot = PROXY_ADMIN_SLOT;
address sender = proxyAdmin;
assembly {
sstore(slot, sender)
}
}
function updateAdmin(address _newAdmin) public {
require(
msg.sender == getAdmin(),
"Only the current admin should be able to new admin"
);
bytes32 slot = PROXY_ADMIN_SLOT;
assembly {
sstore(slot, _newAdmin)
}
}
/// @author Marlin
/// @dev Only admin can update the contract
/// @param _newLogic address is the address of the contract that has to updated to
function updateLogic(address _newLogic) public {
require(
msg.sender == getAdmin(),
"Only Admin should be able to update the contracts"
);
bytes32 slot = IMPLEMENTATION_SLOT;
assembly {
sstore(slot, _newLogic)
}
}
/// @author Marlin
/// @dev use assembly as contract store slot is manually decided
function getAdmin() internal view returns (address result) {
bytes32 slot = PROXY_ADMIN_SLOT;
assembly {
result := sload(slot)
}
}
/// @author Marlin
/// @dev add functionality to forward the balance as well.
function() external payable {
bytes32 slot = IMPLEMENTATION_SLOT;
assembly {
let contractLogic := sload(slot)
calldatacopy(0x0, 0x0, calldatasize())
let success := delegatecall(
sub(gas(), 10000),
contractLogic,
0x0,
calldatasize(),
0,
0
)
let retSz := returndatasize()
returndatacopy(0, 0, retSz)
switch success
case 0 {
revert(0, retSz)
}
default {
return(0, retSz)
}
}
}
}
Write Contract 2 functions
These functions modify contract state and require a wallet transaction to execute.
updateAdmin 0xe2f273bd
address _newAdmin
updateLogic 0x795e617e
address _newLogic
Recent Transactions
No transactions found for this address