ETH Price: $3,394.99 (+1.99%)

Contract

0x8e9F7954Be652d0f10FB055324176442C0985bfd
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Sell Voucher_new215035122024-12-28 21:00:592 hrs ago1735419659IN
0x8e9F7954...2C0985bfd
0 ETH0.001815186.70649874
Unstake Claim To...214790742024-12-25 11:04:593 days ago1735124699IN
0x8e9F7954...2C0985bfd
0 ETH0.000689215.16685505
Sell Voucher_new214788292024-12-25 10:15:473 days ago1735121747IN
0x8e9F7954...2C0985bfd
0 ETH0.00165085.73575774
Unstake Claim To...214744842024-12-24 19:42:234 days ago1735069343IN
0x8e9F7954...2C0985bfd
0 ETH0.001233129.24434477
Sell Voucher_new214678422024-12-23 21:23:475 days ago1734989027IN
0x8e9F7954...2C0985bfd
0 ETH0.0053943618.74443578
Buy Voucher214568352024-12-22 8:26:236 days ago1734855983IN
0x8e9F7954...2C0985bfd
0 ETH0.001677927.77783571
Unstake Claim To...214562272024-12-22 6:24:476 days ago1734848687IN
0x8e9F7954...2C0985bfd
0 ETH0.001074398.0544441
Sell Voucher_new214559742024-12-22 5:33:596 days ago1734845639IN
0x8e9F7954...2C0985bfd
0 ETH0.002420218.40980247
Unstake Claim To...214513302024-12-21 13:58:117 days ago1734789491IN
0x8e9F7954...2C0985bfd
0 ETH0.0013380810.03124555
Buy Voucher214504042024-12-21 10:51:597 days ago1734778319IN
0x8e9F7954...2C0985bfd
0 ETH0.001905468.83208754
Restake214446342024-12-20 15:30:118 days ago1734708611IN
0x8e9F7954...2C0985bfd
0 ETH0.007344540.39235879
Sell Voucher_new214286642024-12-18 9:56:4710 days ago1734515807IN
0x8e9F7954...2C0985bfd
0 ETH0.0030613612.72442564
Withdraw Rewards214286552024-12-18 9:54:5910 days ago1734515699IN
0x8e9F7954...2C0985bfd
0 ETH0.0017691912.7255246
Buy Voucher214205632024-12-17 6:48:2311 days ago1734418103IN
0x8e9F7954...2C0985bfd
0 ETH0.0023867910.1393627
Unstake Claim To...214170322024-12-16 18:59:5912 days ago1734375599IN
0x8e9F7954...2C0985bfd
0 ETH0.0050576537.91575309
Sell Voucher_new214163242024-12-16 16:38:1112 days ago1734367091IN
0x8e9F7954...2C0985bfd
0 ETH0.0099671832.69161325
Buy Voucher214139922024-12-16 8:50:1112 days ago1734339011IN
0x8e9F7954...2C0985bfd
0 ETH0.0023611210.03033106
Restake214076892024-12-15 11:42:1113 days ago1734262931IN
0x8e9F7954...2C0985bfd
0 ETH0.001355127.45272457
Unstake Claim To...214034342024-12-14 21:27:2314 days ago1734211643IN
0x8e9F7954...2C0985bfd
0 ETH0.001178928.83802527
Sell Voucher_new214032442024-12-14 20:49:2314 days ago1734209363IN
0x8e9F7954...2C0985bfd
0 ETH0.002105318.7488972
Withdraw Rewards214032242024-12-14 20:45:2314 days ago1734209123IN
0x8e9F7954...2C0985bfd
0 ETH0.001251278.01448566
Withdraw Rewards214030992024-12-14 20:20:2314 days ago1734207623IN
0x8e9F7954...2C0985bfd
0 ETH0.001573729.90220935
Unstake Claim To...213926862024-12-13 9:26:4715 days ago1734082007IN
0x8e9F7954...2C0985bfd
0 ETH0.0017772113.32322053
Unstake Claim To...213820052024-12-11 21:40:2317 days ago1733953223IN
0x8e9F7954...2C0985bfd
0 ETH0.003371625.27594035
Sell Voucher_new213773782024-12-11 6:07:5917 days ago1733897279IN
0x8e9F7954...2C0985bfd
0 ETH0.0035742413.20443446
View all transactions

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block
From
To
178903622023-08-11 8:10:11505 days ago1691741411  Contract Creation0 ETH
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xb352caD8...0E2D4fDE1
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
ValidatorShareProxy

Compiler Version
v0.5.17+commit.d19bba13

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 1 : ValidatorShareProxy.sol
pragma solidity 0.5.17;

/*
 * SPDX-License-Identitifer:    MIT
 */


// 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);
}



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;
    }
}




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

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



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)
        }
    }
}



interface IGovernance {
    function update(address target, bytes calldata data) external;
}



contract Governable {
    IGovernance public governance;

    constructor(address _governance) public {
        governance = IGovernance(_governance);
    }

    modifier onlyGovernance() {
        _assertGovernance();
        _;
    }

    function _assertGovernance() private view {
        require(
            msg.sender == address(governance),
            "Only governance contract is authorized"
        );
    }
}



contract IWithdrawManager {
    function createExitQueue(address token) external;

    function verifyInclusion(
        bytes calldata data,
        uint8 offset,
        bool verifyTxInclusion
    ) external view returns (uint256 age);

    function addExitToQueue(
        address exitor,
        address childToken,
        address rootToken,
        uint256 exitAmountOrTokenId,
        bytes32 txHash,
        bool isRegularExit,
        uint256 priority
    ) external;

    function addInput(
        uint256 exitId,
        uint256 age,
        address utxoOwner,
        address token
    ) external;

    function challengeExit(
        uint256 exitId,
        uint256 inputId,
        bytes calldata challengeData,
        address adjudicatorPredicate
    ) external;
}




contract Registry is Governable {
    // @todo hardcode constants
    bytes32 private constant WETH_TOKEN = keccak256("wethToken");
    bytes32 private constant DEPOSIT_MANAGER = keccak256("depositManager");
    bytes32 private constant STAKE_MANAGER = keccak256("stakeManager");
    bytes32 private constant VALIDATOR_SHARE = keccak256("validatorShare");
    bytes32 private constant WITHDRAW_MANAGER = keccak256("withdrawManager");
    bytes32 private constant CHILD_CHAIN = keccak256("childChain");
    bytes32 private constant STATE_SENDER = keccak256("stateSender");
    bytes32 private constant SLASHING_MANAGER = keccak256("slashingManager");

    address public erc20Predicate;
    address public erc721Predicate;

    mapping(bytes32 => address) public contractMap;
    mapping(address => address) public rootToChildToken;
    mapping(address => address) public childToRootToken;
    mapping(address => bool) public proofValidatorContracts;
    mapping(address => bool) public isERC721;

    enum Type {Invalid, ERC20, ERC721, Custom}
    struct Predicate {
        Type _type;
    }
    mapping(address => Predicate) public predicates;

    event TokenMapped(address indexed rootToken, address indexed childToken);
    event ProofValidatorAdded(address indexed validator, address indexed from);
    event ProofValidatorRemoved(address indexed validator, address indexed from);
    event PredicateAdded(address indexed predicate, address indexed from);
    event PredicateRemoved(address indexed predicate, address indexed from);
    event ContractMapUpdated(bytes32 indexed key, address indexed previousContract, address indexed newContract);

    constructor(address _governance) public Governable(_governance) {}

    function updateContractMap(bytes32 _key, address _address) external onlyGovernance {
        emit ContractMapUpdated(_key, contractMap[_key], _address);
        contractMap[_key] = _address;
    }

    /**
     * @dev Map root token to child token
     * @param _rootToken Token address on the root chain
     * @param _childToken Token address on the child chain
     * @param _isERC721 Is the token being mapped ERC721
     */
    function mapToken(
        address _rootToken,
        address _childToken,
        bool _isERC721
    ) external onlyGovernance {
        require(_rootToken != address(0x0) && _childToken != address(0x0), "INVALID_TOKEN_ADDRESS");
        rootToChildToken[_rootToken] = _childToken;
        childToRootToken[_childToken] = _rootToken;
        isERC721[_rootToken] = _isERC721;
        IWithdrawManager(contractMap[WITHDRAW_MANAGER]).createExitQueue(_rootToken);
        emit TokenMapped(_rootToken, _childToken);
    }

    function addErc20Predicate(address predicate) public onlyGovernance {
        require(predicate != address(0x0), "Can not add null address as predicate");
        erc20Predicate = predicate;
        addPredicate(predicate, Type.ERC20);
    }

    function addErc721Predicate(address predicate) public onlyGovernance {
        erc721Predicate = predicate;
        addPredicate(predicate, Type.ERC721);
    }

    function addPredicate(address predicate, Type _type) public onlyGovernance {
        require(predicates[predicate]._type == Type.Invalid, "Predicate already added");
        predicates[predicate]._type = _type;
        emit PredicateAdded(predicate, msg.sender);
    }

    function removePredicate(address predicate) public onlyGovernance {
        require(predicates[predicate]._type != Type.Invalid, "Predicate does not exist");
        delete predicates[predicate];
        emit PredicateRemoved(predicate, msg.sender);
    }

    function getValidatorShareAddress() public view returns (address) {
        return contractMap[VALIDATOR_SHARE];
    }

    function getWethTokenAddress() public view returns (address) {
        return contractMap[WETH_TOKEN];
    }

    function getDepositManagerAddress() public view returns (address) {
        return contractMap[DEPOSIT_MANAGER];
    }

    function getStakeManagerAddress() public view returns (address) {
        return contractMap[STAKE_MANAGER];
    }

    function getSlashingManagerAddress() public view returns (address) {
        return contractMap[SLASHING_MANAGER];
    }

    function getWithdrawManagerAddress() public view returns (address) {
        return contractMap[WITHDRAW_MANAGER];
    }

    function getChildChainAndStateSender() public view returns (address, address) {
        return (contractMap[CHILD_CHAIN], contractMap[STATE_SENDER]);
    }

    function isTokenMapped(address _token) public view returns (bool) {
        return rootToChildToken[_token] != address(0x0);
    }

    function isTokenMappedAndIsErc721(address _token) public view returns (bool) {
        require(isTokenMapped(_token), "TOKEN_NOT_MAPPED");
        return isERC721[_token];
    }

    function isTokenMappedAndGetPredicate(address _token) public view returns (address) {
        if (isTokenMappedAndIsErc721(_token)) {
            return erc721Predicate;
        }
        return erc20Predicate;
    }

    function isChildTokenErc721(address childToken) public view returns (bool) {
        address rootToken = childToRootToken[childToken];
        require(rootToken != address(0x0), "Child token is not mapped");
        return isERC721[rootToken];
    }
}




contract ValidatorShareProxy is UpgradableProxy {
    constructor(address _registry) public UpgradableProxy(_registry) {}

    function loadImplementation() internal view returns (address) {
        return Registry(super.loadImplementation()).getValidatorShareAddress();
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_registry","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"}]

Deployed Bytecode

0x6080604052600436106100555760003560e01c8063025b22bc1461009f5780634555d5c9146100d25780635c60da1b146100f95780638da5cb5b1461012a578063d88ca2c81461013f578063f2fde38b146101f5575b61009d610060610228565b6000368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061029b92505050565b005b3480156100ab57600080fd5b5061009d600480360360208110156100c257600080fd5b50356001600160a01b03166102c3565b3480156100de57600080fd5b506100e76103fd565b60408051918252519081900360200190f35b34801561010557600080fd5b5061010e610402565b604080516001600160a01b039092168252519081900360200190f35b34801561013657600080fd5b5061010e610411565b61009d6004803603604081101561015557600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561018057600080fd5b82018360208201111561019257600080fd5b803590602001918460018302840111640100000000831117156101b457600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061041b945050505050565b34801561020157600080fd5b5061009d6004803603602081101561021857600080fd5b50356001600160a01b03166105b1565b60006102326106a3565b6001600160a01b0316631c9486ef6040518163ffffffff1660e01b815260040160206040518083038186803b15801561026a57600080fd5b505afa15801561027e573d6000803e3d6000fd5b505050506040513d602081101561029457600080fd5b5051905090565b600080825160208401856127105a03f43d604051816000823e8280156102bf578282f35b8282fd5b336102cc6106c9565b6001600160a01b031614610313576040805162461bcd60e51b81526020600482015260096024820152682727aa2fa7aba722a960b91b604482015290519081900360640190fd5b6001600160a01b038116610366576040805162461bcd60e51b8152602060048201526015602482015274494e56414c49445f50524f58595f4144445245535360581b604482015290519081900360640190fd5b61036f816106fb565b6103aa5760405162461bcd60e51b81526004018080602001828103825260258152602001806107726025913960400191505060405180910390fd5b6103b2610228565b6001600160a01b0316816001600160a01b03167fd32d24edea94f55e932d9a008afc425a8561462d1b1f57bc6e508e9a6b9509e160405160405180910390a36103fa8161071e565b50565b600290565b600061040c610228565b905090565b600061040c6106c9565b336104246106c9565b6001600160a01b03161461046b576040805162461bcd60e51b81526020600482015260096024820152682727aa2fa7aba722a960b91b604482015290519081900360640190fd5b610474826102c3565b60006060306001600160a01b031634846040518082805190602001908083835b602083106104b35780518252601f199092019160209182019101610494565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610515576040519150601f19603f3d011682016040523d82523d6000602084013e61051a565b606091505b50915091508181906105aa5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561056f578181015183820152602001610557565b50505050905090810190601f16801561059c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5050505050565b336105ba6106c9565b6001600160a01b031614610601576040805162461bcd60e51b81526020600482015260096024820152682727aa2fa7aba722a960b91b604482015290519081900360640190fd5b6001600160a01b03811661064b576040805162461bcd60e51b815260206004820152600c60248201526b5a45524f5f4144445245535360a01b604482015290519081900360640190fd5b7f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a816106756106c9565b604080516001600160a01b03938416815291909216602082015281519081900390910190a16103fa81610740565b600080600060405180806107976022913960405190819003602201902054935050505090565b604080517836b0ba34b1973732ba3bb7b93597383937bc3c9737bbb732b960391b815290519081900360190190205490565b60006001600160a01b03821661071357506000610719565b50803b15155b919050565b6000604051808061079760229139604051908190036022019020929092555050565b604080517836b0ba34b1973732ba3bb7b93597383937bc3c9737bbb732b960391b815290519081900360190190205556fe44455354494e4154494f4e5f414444524553535f49535f4e4f545f415f434f4e54524143546d617469632e6e6574776f726b2e70726f78792e696d706c656d656e746174696f6ea265627a7a723158200710c245017d95e1d83f14cfce2e0f2df7abdfc434ba8782e8e4fe1da6bea82464736f6c63430005110032

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  ]
[ 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.