ETH Price: $3,074.31 (-1.30%)

Contract

0x59127B40b8050FA7eF5CA5Cd4f13333AF1464e31
 

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Sponsored

Transaction Hash
Method
Block
From
To
Value
0x60806040117816032022-06-14 19:18:36704 days ago1655234316IN
 Create: Router
0 ETH0.000000350.001

View more zero value Internal Transactions in Advanced View mode

Advanced mode:

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Router

Compiler Version
v0.8.11+commit.d7f03943

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 1 : Router.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;

// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// GENERATED CODE - do not edit manually!!
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------

contract Router {
    error UnknownSelector(bytes4 sel);

    address private constant _ELECTION_INSPECTOR_MODULE = 0xbe897831ee9e19d83604612f205351629F2df30C;
    address private constant _ELECTION_MODULE = 0xED7947E253f84F7932278284a6B62387ee2EEEDD;
    address private constant _OWNER_MODULE = 0x823005379687567B5590fcc701CE4a9DeC7b4e09;
    address private constant _UPGRADE_MODULE = 0x27169242Fce0D089bc2114c49338C2Fa90424Ddc;

    fallback() external payable {
        _forward();
    }

    receive() external payable {
        _forward();
    }

    function _forward() internal {
        // Lookup table: Function selector => implementation contract
        bytes4 sig4 = msg.sig;
        address implementation;

        assembly {
            let sig32 := shr(224, sig4)

            function findImplementation(sig) -> result {
                if lt(sig,0x8625c053) {
                    if lt(sig,0x447068ef) {
                        if lt(sig,0x2810e1d6) {
                            if lt(sig,0x0ebf4796) {
                                switch sig
                                case 0x0166451a { result := _ELECTION_MODULE } // ElectionModule.initializeElectionModule()
                                case 0x0438d06e { result := _ELECTION_MODULE } // ElectionModule.setMinimumActiveMembers()
                                case 0x086146d2 { result := _ELECTION_MODULE } // ElectionModule.getCurrentPeriod()
                                case 0x09eef43e { result := _ELECTION_MODULE } // ElectionModule.hasVoted()
                                case 0x0a8b471a { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getBallotCandidatesInEpoch()
                                leave
                            }
                            switch sig
                            case 0x0ebf4796 { result := _ELECTION_MODULE } // ElectionModule.setDebtShareContract()
                            case 0x0f98dfba { result := _ELECTION_MODULE } // ElectionModule.getDefaultBallotEvaluationBatchSize()
                            case 0x1209644e { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.hasVotedInEpoch()
                            case 0x1627540c { result := _OWNER_MODULE } // OwnerModule.nominateNewOwner()
                            case 0x205569c2 { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.wasNominated()
                            leave
                        }
                        switch sig
                        case 0x2810e1d6 { result := _ELECTION_MODULE } // ElectionModule.resolve()
                        case 0x2c3c5ba3 { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getBallotVotesInEpoch()
                        case 0x33f3f3de { result := _ELECTION_MODULE } // ElectionModule.setCrossChainDebtShareMerkleRoot()
                        case 0x35eb2824 { result := _OWNER_MODULE } // OwnerModule.isOwnerModuleInitialized()
                        case 0x362c906d { result := _ELECTION_MODULE } // ElectionModule.getEpochEndDate()
                        case 0x3659cfe6 { result := _UPGRADE_MODULE } // UpgradeModule.upgradeTo()
                        case 0x37143233 { result := _ELECTION_MODULE } // ElectionModule.evaluate()
                        case 0x3a3e6c81 { result := _ELECTION_MODULE } // ElectionModule.isNominated()
                        case 0x3ac1c5fe { result := _ELECTION_MODULE } // ElectionModule.setMaxDateAdjustmentTolerance()
                        leave
                    }
                    if lt(sig,0x718fe928) {
                        if lt(sig,0x606a6b76) {
                            switch sig
                            case 0x447068ef { result := _ELECTION_MODULE } // ElectionModule.getNextEpochSeatCount()
                            case 0x49aed35c { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getBallotVotedAtEpoch()
                            case 0x4b5dacac { result := _ELECTION_MODULE } // ElectionModule.setNextEpochSeatCount()
                            case 0x53a47bb7 { result := _OWNER_MODULE } // OwnerModule.nominatedOwner()
                            case 0x54520478 { result := _ELECTION_MODULE } // ElectionModule.upgradeCouncilToken()
                            leave
                        }
                        switch sig
                        case 0x606a6b76 { result := _ELECTION_MODULE } // ElectionModule.getCouncilMembers()
                        case 0x624bd96d { result := _OWNER_MODULE } // OwnerModule.initializeOwnerModule()
                        case 0x64deab73 { result := _ELECTION_MODULE } // ElectionModule.setDefaultBallotEvaluationBatchSize()
                        case 0x655aaaca { result := _ELECTION_MODULE } // ElectionModule.getBallotCandidates()
                        case 0x714d8d0e { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getEpochStartDateForIndex()
                        leave
                    }
                    switch sig
                    case 0x718fe928 { result := _OWNER_MODULE } // OwnerModule.renounceNomination()
                    case 0x793b9a9d { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getCandidateVotesInEpoch()
                    case 0x796c5c80 { result := _ELECTION_MODULE } // ElectionModule.getDeclaredCrossChainDebtShare()
                    case 0x79ba5097 { result := _OWNER_MODULE } // OwnerModule.acceptOwnership()
                    case 0x7a3bc0ee { result := _ELECTION_MODULE } // ElectionModule.getBallotVotes()
                    case 0x7d264ccb { result := _ELECTION_MODULE } // ElectionModule.declareCrossChainDebtShare()
                    case 0x82e28473 { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getVotingPeriodStartDateForIndex()
                    case 0x84ae670c { result := _ELECTION_MODULE } // ElectionModule.cast()
                    case 0x85160425 { result := _ELECTION_MODULE } // ElectionModule.getMinimumActiveMembers()
                    leave
                }
                if lt(sig,0xca80a2ed) {
                    if lt(sig,0xaeff252a) {
                        if lt(sig,0x9a25eaf3) {
                            switch sig
                            case 0x8625c053 { result := _ELECTION_MODULE } // ElectionModule.getMinEpochDurations()
                            case 0x8da5cb5b { result := _OWNER_MODULE } // OwnerModule.owner()
                            case 0x8f701997 { result := _ELECTION_MODULE } // ElectionModule.tweakEpochSchedule()
                            case 0x95ff6584 { result := _ELECTION_MODULE } // ElectionModule.getBallotVoted()
                            case 0x9636f67c { result := _ELECTION_MODULE } // ElectionModule.getNominees()
                            leave
                        }
                        switch sig
                        case 0x9a25eaf3 { result := _ELECTION_MODULE } // ElectionModule.dismissMembers()
                        case 0x9a9a8e1a { result := _ELECTION_MODULE } // ElectionModule.declareAndCast()
                        case 0xa0f42837 { result := _ELECTION_MODULE } // ElectionModule.setDebtShareSnapshotId()
                        case 0xa25a9f3a { result := _ELECTION_MODULE } // ElectionModule.setMinEpochDurations()
                        case 0xaaf10f42 { result := _UPGRADE_MODULE } // UpgradeModule.getImplementation()
                        leave
                    }
                    switch sig
                    case 0xaeff252a { result := _ELECTION_MODULE } // ElectionModule.getDebtShareContract()
                    case 0xb55c43d2 { result := _ELECTION_MODULE } // ElectionModule.getCrossChainDebtShareMerkleRoot()
                    case 0xb749be55 { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getNominationPeriodStartDateForIndex()
                    case 0xba9a5b25 { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getEpochEndDateForIndex()
                    case 0xbb9c0920 { result := _ELECTION_MODULE } // ElectionModule.getVotePower()
                    case 0xc07de0d3 { result := _ELECTION_MODULE } // ElectionModule.getCouncilToken()
                    case 0xc14d0528 { result := _ELECTION_MODULE } // ElectionModule.modifyEpochSchedule()
                    case 0xc5798523 { result := _ELECTION_MODULE } // ElectionModule.isElectionModuleInitialized()
                    case 0xc7f62cda { result := _UPGRADE_MODULE } // UpgradeModule.simulateUpgradeTo()
                    leave
                }
                if lt(sig,0xe327b585) {
                    switch sig
                    case 0xca80a2ed { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getNomineesAtEpoch()
                    case 0xcce32c52 { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getElectionWinnersInEpoch()
                    case 0xce04e44c { result := _ELECTION_MODULE } // ElectionModule.getEpochStartDate()
                    case 0xd11801cf { result := _ELECTION_MODULE } // ElectionModule.withdrawNomination()
                    case 0xd82f25f0 { result := _ELECTION_MODULE } // ElectionModule.getCandidateVotes()
                    case 0xd83eb231 { result := _ELECTION_MODULE } // ElectionModule.withdrawVote()
                    case 0xd9617851 { result := _ELECTION_MODULE } // ElectionModule.getCrossChainDebtShareMerkleRootBlockNumber()
                    case 0xdfe7cd3a { result := _ELECTION_MODULE } // ElectionModule.getDebtShareSnapshotId()
                    case 0xe1509015 { result := _ELECTION_MODULE } // ElectionModule.getVotingPeriodStartDate()
                    leave
                }
                switch sig
                case 0xe327b585 { result := _ELECTION_MODULE } // ElectionModule.isElectionEvaluated()
                case 0xe420d7f9 { result := _ELECTION_MODULE } // ElectionModule.getNominationPeriodStartDate()
                case 0xedc968ba { result := _ELECTION_MODULE } // ElectionModule.calculateBallotId()
                case 0xee695137 { result := _ELECTION_MODULE } // ElectionModule.initializeElectionModule()
                case 0xf2516dbf { result := _ELECTION_MODULE } // ElectionModule.getElectionWinners()
                case 0xf2e56dea { result := _ELECTION_MODULE } // ElectionModule.getDebtShare()
                case 0xfcd7e1d7 { result := _ELECTION_MODULE } // ElectionModule.nominate()
                case 0xffe7f643 { result := _ELECTION_MODULE } // ElectionModule.getEpochIndex()
                case 0xfff17b8e { result := _ELECTION_MODULE } // ElectionModule.getMaxDateAdjustmenTolerance()
                leave
            }

            implementation := findImplementation(sig32)
        }

        if (implementation == address(0)) {
            revert UnknownSelector(sig4);
        }

        // Delegatecall to the implementation contract
        assembly {
            calldatacopy(0, 0, calldatasize())

            let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)
            returndatacopy(0, 0, returndatasize())

            switch result
            case 0 {
                revert(0, returndatasize())
            }
            default {
                return(0, returndatasize())
            }
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"bytes4","name":"sel","type":"bytes4"}],"name":"UnknownSelector","type":"error"},{"stateMutability":"payable","type":"fallback"},{"stateMutability":"payable","type":"receive"}]

608060405234801561001057600080fd5b50610588806100206000396000f3fe60806040523661001357610011610017565b005b6100115b6001600160e01b0319600080359182169160e01c6104eb565b6000638625c0538210156102ea5763447068ef8210156101ef57632810e1d682101561014e57630ebf47968210156100d95781630166451a811461009f57630438d06e811461009f5763086146d2811461009f576309eef43e811461009f57630a8b471a81146100bb576100d3565b73ed7947e253f84f7932278284a6b62387ee2eeedd91506100d3565b73be897831ee9e19d83604612f205351629f2df30c91505b50919050565b81630ebf4796811461009f57630f98dfba811461009f57631209644e811461011657631627540c81146101325763205569c281146100bb576100d3565b73be897831ee9e19d83604612f205351629f2df30c91506100d3565b73823005379687567b5590fcc701ce4a9dec7b4e0991506100d3565b81632810e1d6811461009f57632c3c5ba38114610116576333f3f3de811461009f576335eb282481146101325763362c906d811461009f57633659cfe681146101b7576337143233811461009f57633a3e6c81811461009f57633ac1c5fe81146101d3576100d3565b7327169242fce0d089bc2114c49338c2fa90424ddc91506100d3565b5073ed7947e253f84f7932278284a6b62387ee2eeedd92915050565b63718fe9288210156102815763606a6b76821015610244578163447068ef811461009f576349aed35c811461011657634b5dacac811461009f576353a47bb7811461013257635452047881146101d3576100d3565b8163606a6b76811461009f5763624bd96d8114610132576364deab73811461009f5763655aaaca811461009f5763714d8d0e81146100bb576100d3565b8163718fe92881146101325763793b9a9d81146101165763796c5c80811461009f576379ba5097811461013257637a3bc0ee811461009f57637d264ccb811461009f576382e284738114610116576384ae670c811461009f57638516042581146101d3576100d3565b63ca80a2ed82101561040d5763aeff252a8210156103a457639a25eaf382101561034b5781638625c053811461009f57638da5cb5b811461013257638f701997811461009f576395ff6584811461009f57639636f67c81146101d3576100d3565b81639a25eaf3811461009f57639a9a8e1a811461009f5763a0f42837811461009f5763a25a9f3a811461009f5763aaf10f428114610388576100d3565b507327169242fce0d089bc2114c49338c2fa90424ddc92915050565b8163aeff252a811461009f5763b55c43d2811461009f5763b749be5581146101165763ba9a5b2581146101165763bb9c0920811461009f5763c07de0d3811461009f5763c14d0528811461009f5763c5798523811461009f5763c7f62cda8114610388576100d3565b63e327b585821015610482578163ca80a2ed81146101165763cce32c5281146101165763ce04e44c811461009f5763d11801cf811461009f5763d82f25f0811461009f5763d83eb231811461009f5763d9617851811461009f5763dfe7cd3a811461009f5763e150901581146101d3576100d3565b8163e327b585811461009f5763e420d7f9811461009f5763edc968ba811461009f5763ee695137811461009f5763f2516dbf811461009f5763f2e56dea811461009f5763fcd7e1d7811461009f5763ffe7f643811461009f5763fff17b8e81146101d3576100d3565b6104f481610030565b9150506001600160a01b03811661052e5760405163c2a825f560e01b81526001600160e01b03198316600482015260240160405180910390fd5b3660008037600080366000845af43d6000803e80801561054d573d6000f35b3d6000fdfea2646970667358221220c35472daf8a716f6184411aea2a576d77cdc42967f19da17f390aca4124de87064736f6c634300080b0033

Deployed Bytecode

0x60806040523661001357610011610017565b005b6100115b6001600160e01b0319600080359182169160e01c6104eb565b6000638625c0538210156102ea5763447068ef8210156101ef57632810e1d682101561014e57630ebf47968210156100d95781630166451a811461009f57630438d06e811461009f5763086146d2811461009f576309eef43e811461009f57630a8b471a81146100bb576100d3565b73ed7947e253f84f7932278284a6b62387ee2eeedd91506100d3565b73be897831ee9e19d83604612f205351629f2df30c91505b50919050565b81630ebf4796811461009f57630f98dfba811461009f57631209644e811461011657631627540c81146101325763205569c281146100bb576100d3565b73be897831ee9e19d83604612f205351629f2df30c91506100d3565b73823005379687567b5590fcc701ce4a9dec7b4e0991506100d3565b81632810e1d6811461009f57632c3c5ba38114610116576333f3f3de811461009f576335eb282481146101325763362c906d811461009f57633659cfe681146101b7576337143233811461009f57633a3e6c81811461009f57633ac1c5fe81146101d3576100d3565b7327169242fce0d089bc2114c49338c2fa90424ddc91506100d3565b5073ed7947e253f84f7932278284a6b62387ee2eeedd92915050565b63718fe9288210156102815763606a6b76821015610244578163447068ef811461009f576349aed35c811461011657634b5dacac811461009f576353a47bb7811461013257635452047881146101d3576100d3565b8163606a6b76811461009f5763624bd96d8114610132576364deab73811461009f5763655aaaca811461009f5763714d8d0e81146100bb576100d3565b8163718fe92881146101325763793b9a9d81146101165763796c5c80811461009f576379ba5097811461013257637a3bc0ee811461009f57637d264ccb811461009f576382e284738114610116576384ae670c811461009f57638516042581146101d3576100d3565b63ca80a2ed82101561040d5763aeff252a8210156103a457639a25eaf382101561034b5781638625c053811461009f57638da5cb5b811461013257638f701997811461009f576395ff6584811461009f57639636f67c81146101d3576100d3565b81639a25eaf3811461009f57639a9a8e1a811461009f5763a0f42837811461009f5763a25a9f3a811461009f5763aaf10f428114610388576100d3565b507327169242fce0d089bc2114c49338c2fa90424ddc92915050565b8163aeff252a811461009f5763b55c43d2811461009f5763b749be5581146101165763ba9a5b2581146101165763bb9c0920811461009f5763c07de0d3811461009f5763c14d0528811461009f5763c5798523811461009f5763c7f62cda8114610388576100d3565b63e327b585821015610482578163ca80a2ed81146101165763cce32c5281146101165763ce04e44c811461009f5763d11801cf811461009f5763d82f25f0811461009f5763d83eb231811461009f5763d9617851811461009f5763dfe7cd3a811461009f5763e150901581146101d3576100d3565b8163e327b585811461009f5763e420d7f9811461009f5763edc968ba811461009f5763ee695137811461009f5763f2516dbf811461009f5763f2e56dea811461009f5763fcd7e1d7811461009f5763ffe7f643811461009f5763fff17b8e81146101d3576100d3565b6104f481610030565b9150506001600160a01b03811661052e5760405163c2a825f560e01b81526001600160e01b03198316600482015260240160405180910390fd5b3660008037600080366000845af43d6000803e80801561054d573d6000f35b3d6000fdfea2646970667358221220c35472daf8a716f6184411aea2a576d77cdc42967f19da17f390aca4124de87064736f6c634300080b0033

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