ETH Price: $3,476.46 (+5.43%)

Contract

0xE887512ab8BC60BcC9224e1c3b5Be68E26048B8B
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Signer Update210055612024-10-20 8:21:2389 days ago1729412483IN
0xE887512a...E26048B8B
0 ETH0.002543878.62684481
Signer Update210055222024-10-20 8:13:3589 days ago1729412015IN
0xE887512a...E26048B8B
0 ETH0.002988889.8686547
Validator Join203890752024-07-26 6:57:11175 days ago1721977031IN
0xE887512a...E26048B8B
0 ETH0.001052212.05492675
Validator Exit203102802024-07-15 6:59:59186 days ago1721026799IN
0xE887512a...E26048B8B
0 ETH0.000833822.75336369
Transfer Ownersh...189260782024-01-03 9:55:35380 days ago1704275735IN
0xE887512a...E26048B8B
0 ETH0.0005736120.04956795
Validator Join176197452023-07-04 9:43:47563 days ago1688463827IN
0xE887512a...E26048B8B
0 ETH0.0076999314.24926157
Validator Exit175131912023-06-19 10:26:35578 days ago1687170395IN
0xE887512a...E26048B8B
0 ETH0.00434414.90505332
Validator Join154387682022-08-30 6:17:45871 days ago1661840265IN
0xE887512a...E26048B8B
0 ETH0.004248228.29585675
Validator Join146609822022-04-26 15:43:54997 days ago1650987834IN
0xE887512a...E26048B8B
0 ETH0.0342641565.01688731
Validator Join146596342022-04-26 10:29:38997 days ago1650968978IN
0xE887512a...E26048B8B
0 ETH0.0130991526.5093649
Transfer Ownersh...146214712022-04-20 10:55:151003 days ago1650452115IN
0xE887512a...E26048B8B
0 ETH0.0010116935.36148338
Validator Join146146352022-04-19 9:06:431004 days ago1650359203IN
0xE887512a...E26048B8B
0 ETH0.0396244480.14295816
Validator Join145883582022-04-15 6:29:191008 days ago1650004159IN
0xE887512a...E26048B8B
0 ETH0.0105959722.71517982
Transfer Ownersh...145822352022-04-14 7:35:541009 days ago1649921754IN
0xE887512a...E26048B8B
0 ETH0.0010394236.33086252
Update And Call137265772021-12-02 9:26:191142 days ago1638437179IN
0xE887512a...E26048B8B
0 ETH0.08325479145.81852818

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StakeManagerProxy

Compiler Version
v0.5.17+commit.d19bba13

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license
File 1 of 5 : StakeManagerProxy.sol
pragma solidity ^0.5.2;

import {UpgradableProxy} from "../../common/misc/UpgradableProxy.sol";

contract StakeManagerProxy is UpgradableProxy {
    constructor(address _proxyTo) public UpgradableProxy(_proxyTo) {}
}

File 2 of 5 : DelegateProxyForwarder.sol
pragma solidity ^0.5.2;

contract DelegateProxyForwarder {
    function delegatedFwd(address _dst, bytes memory _calldata) internal {
        // solium-disable-next-line security/no-inline-assembly
        assembly {
            let result := delegatecall(
                sub(gas, 10000),
                _dst,
                add(_calldata, 0x20),
                mload(_calldata),
                0,
                0
            )
            let size := returndatasize

            let ptr := mload(0x40)
            returndatacopy(ptr, 0, size)

            // revert instead of invalid() bc if the underlying call failed with invalid() it already wasted gas.
            // if the call returned error data, forward it
            switch result
                case 0 {
                    revert(ptr, size)
                }
                default {
                    return(ptr, size)
                }
        }
    }
    
    function isContract(address _target) internal view returns (bool) {
        if (_target == address(0)) {
            return false;
        }

        uint256 size;
        assembly {
            size := extcodesize(_target)
        }
        return size > 0;
    }
}

File 3 of 5 : ERCProxy.sol
/*
 * SPDX-License-Identitifer:    MIT
 */

pragma solidity ^0.5.2;

// See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-897.md

interface ERCProxy {
    function proxyType() external pure returns (uint256 proxyTypeId);
    function implementation() external view returns (address codeAddr);
}

File 4 of 5 : DelegateProxy.sol
pragma solidity ^0.5.2;

import {ERCProxy} from "./ERCProxy.sol";
import {DelegateProxyForwarder} from "./DelegateProxyForwarder.sol";

contract DelegateProxy is ERCProxy, DelegateProxyForwarder {
    function proxyType() external pure returns (uint256 proxyTypeId) {
        // Upgradeable proxy
        proxyTypeId = 2;
    }

    function implementation() external view returns (address);
}

File 5 of 5 : UpgradableProxy.sol
pragma solidity ^0.5.2;

import {DelegateProxy} from "./DelegateProxy.sol";

contract UpgradableProxy is DelegateProxy {
    event ProxyUpdated(address indexed _new, address indexed _old);
    event OwnerUpdate(address _new, address _old);

    bytes32 constant IMPLEMENTATION_SLOT = keccak256("matic.network.proxy.implementation");
    bytes32 constant OWNER_SLOT = keccak256("matic.network.proxy.owner");

    constructor(address _proxyTo) public {
        setOwner(msg.sender);
        setImplementation(_proxyTo);
    }

    function() external payable {
        // require(currentContract != 0, "If app code has not been set yet, do not call");
        // Todo: filter out some calls or handle in the end fallback
        delegatedFwd(loadImplementation(), msg.data);
    }

    modifier onlyProxyOwner() {
        require(loadOwner() == msg.sender, "NOT_OWNER");
        _;
    }

    function owner() external view returns(address) {
        return loadOwner();
    }

    function loadOwner() internal view returns(address) {
        address _owner;
        bytes32 position = OWNER_SLOT;
        assembly {
            _owner := sload(position)
        }
        return _owner;
    }

    function implementation() external view returns (address) {
        return loadImplementation();
    }

    function loadImplementation() internal view returns(address) {
        address _impl;
        bytes32 position = IMPLEMENTATION_SLOT;
        assembly {
            _impl := sload(position)
        }
        return _impl;
    }

    function transferOwnership(address newOwner) public onlyProxyOwner {
        require(newOwner != address(0), "ZERO_ADDRESS");
        emit OwnerUpdate(newOwner, loadOwner());
        setOwner(newOwner);
    }

    function setOwner(address newOwner) private {
        bytes32 position = OWNER_SLOT;
        assembly {
            sstore(position, newOwner)
        }
    }

    function updateImplementation(address _newProxyTo) public onlyProxyOwner {
        require(_newProxyTo != address(0x0), "INVALID_PROXY_ADDRESS");
        require(isContract(_newProxyTo), "DESTINATION_ADDRESS_IS_NOT_A_CONTRACT");

        emit ProxyUpdated(_newProxyTo, loadImplementation());
        
        setImplementation(_newProxyTo);
    }

    function updateAndCall(address _newProxyTo, bytes memory data) payable public onlyProxyOwner {
        updateImplementation(_newProxyTo);

        (bool success, bytes memory returnData) = address(this).call.value(msg.value)(data);
        require(success, string(returnData));
    }

    function setImplementation(address _newProxyTo) private {
        bytes32 position = IMPLEMENTATION_SLOT;
        assembly {
            sstore(position, _newProxyTo)
        }
    }
}

Settings
{
  "optimizer": {
    "runs": 200,
    "enabled": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_proxyTo","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_new","type":"address"},{"indexed":false,"internalType":"address","name":"_old","type":"address"}],"name":"OwnerUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_new","type":"address"},{"indexed":true,"internalType":"address","name":"_old","type":"address"}],"name":"ProxyUpdated","type":"event"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"constant":true,"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"proxyType","outputs":[{"internalType":"uint256","name":"proxyTypeId","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_newProxyTo","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"updateAndCall","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_newProxyTo","type":"address"}],"name":"updateImplementation","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b506040516108633803806108638339818101604052602081101561003357600080fd5b505180610048336001600160e01b0361006116565b61005a816001600160e01b0361009616565b50506100b8565b604080517f6d617469632e6e6574776f726b2e70726f78792e6f776e6572000000000000008152905190819003601901902055565b6000604051808061084160229139604051908190036022019020929092555050565b61077a806100c76000396000f3fe6080604052600436106100555760003560e01c8063025b22bc1461009f5780634555d5c9146100d25780635c60da1b146100f95780638da5cb5b1461012a578063d88ca2c81461013f578063f2fde38b146101f5575b61009d610060610228565b6000368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061024e92505050565b005b3480156100ab57600080fd5b5061009d600480360360208110156100c257600080fd5b50356001600160a01b0316610276565b3480156100de57600080fd5b506100e76103b0565b60408051918252519081900360200190f35b34801561010557600080fd5b5061010e6103b5565b604080516001600160a01b039092168252519081900360200190f35b34801561013657600080fd5b5061010e6103c4565b61009d6004803603604081101561015557600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561018057600080fd5b82018360208201111561019257600080fd5b803590602001918460018302840111640100000000831117156101b457600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506103ce945050505050565b34801561020157600080fd5b5061009d6004803603602081101561021857600080fd5b50356001600160a01b0316610564565b600080600060405180806107246022913960405190819003602201902054935050505090565b600080825160208401856127105a03f43d604051816000823e828015610272578282f35b8282fd5b3361027f610656565b6001600160a01b0316146102c6576040805162461bcd60e51b81526020600482015260096024820152682727aa2fa7aba722a960b91b604482015290519081900360640190fd5b6001600160a01b038116610319576040805162461bcd60e51b8152602060048201526015602482015274494e56414c49445f50524f58595f4144445245535360581b604482015290519081900360640190fd5b61032281610688565b61035d5760405162461bcd60e51b81526004018080602001828103825260258152602001806106ff6025913960400191505060405180910390fd5b610365610228565b6001600160a01b0316816001600160a01b03167fd32d24edea94f55e932d9a008afc425a8561462d1b1f57bc6e508e9a6b9509e160405160405180910390a36103ad816106ab565b50565b600290565b60006103bf610228565b905090565b60006103bf610656565b336103d7610656565b6001600160a01b03161461041e576040805162461bcd60e51b81526020600482015260096024820152682727aa2fa7aba722a960b91b604482015290519081900360640190fd5b61042782610276565b60006060306001600160a01b031634846040518082805190602001908083835b602083106104665780518252601f199092019160209182019101610447565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146104c8576040519150601f19603f3d011682016040523d82523d6000602084013e6104cd565b606091505b509150915081819061055d5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561052257818101518382015260200161050a565b50505050905090810190601f16801561054f5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5050505050565b3361056d610656565b6001600160a01b0316146105b4576040805162461bcd60e51b81526020600482015260096024820152682727aa2fa7aba722a960b91b604482015290519081900360640190fd5b6001600160a01b0381166105fe576040805162461bcd60e51b815260206004820152600c60248201526b5a45524f5f4144445245535360a01b604482015290519081900360640190fd5b7f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a81610628610656565b604080516001600160a01b03938416815291909216602082015281519081900390910190a16103ad816106cd565b604080517836b0ba34b1973732ba3bb7b93597383937bc3c9737bbb732b960391b815290519081900360190190205490565b60006001600160a01b0382166106a0575060006106a6565b50803b15155b919050565b6000604051808061072460229139604051908190036022019020929092555050565b604080517836b0ba34b1973732ba3bb7b93597383937bc3c9737bbb732b960391b815290519081900360190190205556fe44455354494e4154494f4e5f414444524553535f49535f4e4f545f415f434f4e54524143546d617469632e6e6574776f726b2e70726f78792e696d706c656d656e746174696f6ea265627a7a723158208bd1b2a4e35041854aee07c69f0b0c92b10e0d3601eedcd359e57924ead6f72a64736f6c634300051100326d617469632e6e6574776f726b2e70726f78792e696d706c656d656e746174696f6e0000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106100555760003560e01c8063025b22bc1461009f5780634555d5c9146100d25780635c60da1b146100f95780638da5cb5b1461012a578063d88ca2c81461013f578063f2fde38b146101f5575b61009d610060610228565b6000368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061024e92505050565b005b3480156100ab57600080fd5b5061009d600480360360208110156100c257600080fd5b50356001600160a01b0316610276565b3480156100de57600080fd5b506100e76103b0565b60408051918252519081900360200190f35b34801561010557600080fd5b5061010e6103b5565b604080516001600160a01b039092168252519081900360200190f35b34801561013657600080fd5b5061010e6103c4565b61009d6004803603604081101561015557600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561018057600080fd5b82018360208201111561019257600080fd5b803590602001918460018302840111640100000000831117156101b457600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506103ce945050505050565b34801561020157600080fd5b5061009d6004803603602081101561021857600080fd5b50356001600160a01b0316610564565b600080600060405180806107246022913960405190819003602201902054935050505090565b600080825160208401856127105a03f43d604051816000823e828015610272578282f35b8282fd5b3361027f610656565b6001600160a01b0316146102c6576040805162461bcd60e51b81526020600482015260096024820152682727aa2fa7aba722a960b91b604482015290519081900360640190fd5b6001600160a01b038116610319576040805162461bcd60e51b8152602060048201526015602482015274494e56414c49445f50524f58595f4144445245535360581b604482015290519081900360640190fd5b61032281610688565b61035d5760405162461bcd60e51b81526004018080602001828103825260258152602001806106ff6025913960400191505060405180910390fd5b610365610228565b6001600160a01b0316816001600160a01b03167fd32d24edea94f55e932d9a008afc425a8561462d1b1f57bc6e508e9a6b9509e160405160405180910390a36103ad816106ab565b50565b600290565b60006103bf610228565b905090565b60006103bf610656565b336103d7610656565b6001600160a01b03161461041e576040805162461bcd60e51b81526020600482015260096024820152682727aa2fa7aba722a960b91b604482015290519081900360640190fd5b61042782610276565b60006060306001600160a01b031634846040518082805190602001908083835b602083106104665780518252601f199092019160209182019101610447565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146104c8576040519150601f19603f3d011682016040523d82523d6000602084013e6104cd565b606091505b509150915081819061055d5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561052257818101518382015260200161050a565b50505050905090810190601f16801561054f5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5050505050565b3361056d610656565b6001600160a01b0316146105b4576040805162461bcd60e51b81526020600482015260096024820152682727aa2fa7aba722a960b91b604482015290519081900360640190fd5b6001600160a01b0381166105fe576040805162461bcd60e51b815260206004820152600c60248201526b5a45524f5f4144445245535360a01b604482015290519081900360640190fd5b7f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a81610628610656565b604080516001600160a01b03938416815291909216602082015281519081900390910190a16103ad816106cd565b604080517836b0ba34b1973732ba3bb7b93597383937bc3c9737bbb732b960391b815290519081900360190190205490565b60006001600160a01b0382166106a0575060006106a6565b50803b15155b919050565b6000604051808061072460229139604051908190036022019020929092555050565b604080517836b0ba34b1973732ba3bb7b93597383937bc3c9737bbb732b960391b815290519081900360190190205556fe44455354494e4154494f4e5f414444524553535f49535f4e4f545f415f434f4e54524143546d617469632e6e6574776f726b2e70726f78792e696d706c656d656e746174696f6ea265627a7a723158208bd1b2a4e35041854aee07c69f0b0c92b10e0d3601eedcd359e57924ead6f72a64736f6c63430005110032

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _proxyTo (address): 0x0000000000000000000000000000000000000000

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ 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.