Sepolia Testnet

Contract

0x8F09aDe8Ec994C3F977E5eA03026E1E2eFA314a7

Overview

ETH Balance

0 ETH

Multichain Info

N/A
Transaction Hash
Method
Block
From
To
Value
Rebuild Cache55142692024-03-19 0:02:3692 days ago1710806556IN
0x8F09aDe8...2eFA314a7
0 ETH0.000184811.56329424
0x6080604054872512024-03-14 23:33:0096 days ago1710459180IN
 Create: OwnerRelayOnEthereum
0 ETH0.000159980.12839992

Advanced mode:
Parent Transaction Hash Block From To Value
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
OwnerRelayOnEthereum

Compiler Version
v0.5.16+commit.9c3226ce

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2024-03-15
*/

/*
   ____            __   __        __   _
  / __/__ __ ___  / /_ / /  ___  / /_ (_)__ __
 _\ \ / // // _ \/ __// _ \/ -_)/ __// / \ \ /
/___/ \_, //_//_/\__//_//_/\__/ \__//_/ /_\_\
     /___/

* Synthetix: OwnerRelayOnEthereum.sol
*
* Latest source (may be newer): https://github.com/Synthetixio/synthetix/blob/master/contracts/OwnerRelayOnEthereum.sol
* Docs: https://docs.synthetix.io/contracts/OwnerRelayOnEthereum
*
* Contract Dependencies: 
*	- IAddressResolver
*	- MixinResolver
*	- MixinSystemSettings
*	- Owned
* Libraries: (none)
*
* MIT License
* ===========
*
* Copyright (c) 2024 Synthetix
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/



pragma solidity ^0.5.16;

// https://docs.synthetix.io/contracts/source/contracts/owned
contract Owned {
    address public owner;
    address public nominatedOwner;

    constructor(address _owner) public {
        require(_owner != address(0), "Owner address cannot be 0");
        owner = _owner;
        emit OwnerChanged(address(0), _owner);
    }

    function nominateNewOwner(address _owner) external onlyOwner {
        nominatedOwner = _owner;
        emit OwnerNominated(_owner);
    }

    function acceptOwnership() external {
        require(msg.sender == nominatedOwner, "You must be nominated before you can accept ownership");
        emit OwnerChanged(owner, nominatedOwner);
        owner = nominatedOwner;
        nominatedOwner = address(0);
    }

    modifier onlyOwner {
        _onlyOwner();
        _;
    }

    function _onlyOwner() private view {
        require(msg.sender == owner, "Only the contract owner may perform this action");
    }

    event OwnerNominated(address newOwner);
    event OwnerChanged(address oldOwner, address newOwner);
}


// https://docs.synthetix.io/contracts/source/interfaces/iaddressresolver
interface IAddressResolver {
    function getAddress(bytes32 name) external view returns (address);

    function getSynth(bytes32 key) external view returns (address);

    function requireAndGetAddress(bytes32 name, string calldata reason) external view returns (address);
}


// https://docs.synthetix.io/contracts/source/interfaces/isynth
interface ISynth {
    // Views
    function currencyKey() external view returns (bytes32);

    function transferableSynths(address account) external view returns (uint);

    // Mutative functions
    function transferAndSettle(address to, uint value) external returns (bool);

    function transferFromAndSettle(
        address from,
        address to,
        uint value
    ) external returns (bool);

    // Restricted: used internally to Synthetix
    function burn(address account, uint amount) external;

    function issue(address account, uint amount) external;
}


// https://docs.synthetix.io/contracts/source/interfaces/iissuer
interface IIssuer {
    // Views

    function allNetworksDebtInfo()
        external
        view
        returns (
            uint256 debt,
            uint256 sharesSupply,
            bool isStale
        );

    function anySynthOrSNXRateIsInvalid() external view returns (bool anyRateInvalid);

    function availableCurrencyKeys() external view returns (bytes32[] memory);

    function availableSynthCount() external view returns (uint);

    function availableSynths(uint index) external view returns (ISynth);

    function canBurnSynths(address account) external view returns (bool);

    function collateral(address account) external view returns (uint);

    function collateralisationRatio(address issuer) external view returns (uint);

    function collateralisationRatioAndAnyRatesInvalid(address _issuer)
        external
        view
        returns (uint cratio, bool anyRateIsInvalid);

    function debtBalanceOf(address issuer, bytes32 currencyKey) external view returns (uint debtBalance);

    function issuanceRatio() external view returns (uint);

    function lastIssueEvent(address account) external view returns (uint);

    function maxIssuableSynths(address issuer) external view returns (uint maxIssuable);

    function minimumStakeTime() external view returns (uint);

    function remainingIssuableSynths(address issuer)
        external
        view
        returns (
            uint maxIssuable,
            uint alreadyIssued,
            uint totalSystemDebt
        );

    function synths(bytes32 currencyKey) external view returns (ISynth);

    function getSynths(bytes32[] calldata currencyKeys) external view returns (ISynth[] memory);

    function synthsByAddress(address synthAddress) external view returns (bytes32);

    function totalIssuedSynths(bytes32 currencyKey, bool excludeOtherCollateral) external view returns (uint);

    function transferableSynthetixAndAnyRateIsInvalid(address account, uint balance)
        external
        view
        returns (uint transferable, bool anyRateIsInvalid);

    function liquidationAmounts(address account, bool isSelfLiquidation)
        external
        view
        returns (
            uint totalRedeemed,
            uint debtToRemove,
            uint escrowToLiquidate,
            uint initialDebtBalance
        );

    // Restricted: used internally to Synthetix
    function addSynths(ISynth[] calldata synthsToAdd) external;

    function issueSynths(address from, uint amount) external;

    function issueSynthsOnBehalf(
        address issueFor,
        address from,
        uint amount
    ) external;

    function issueMaxSynths(address from) external;

    function issueMaxSynthsOnBehalf(address issueFor, address from) external;

    function burnSynths(address from, uint amount) external;

    function burnSynthsOnBehalf(
        address burnForAddress,
        address from,
        uint amount
    ) external;

    function burnSynthsToTarget(address from) external;

    function burnSynthsToTargetOnBehalf(address burnForAddress, address from) external;

    function burnForRedemption(
        address deprecatedSynthProxy,
        address account,
        uint balance
    ) external;

    function setCurrentPeriodId(uint128 periodId) external;

    function liquidateAccount(address account, bool isSelfLiquidation)
        external
        returns (
            uint totalRedeemed,
            uint debtRemoved,
            uint escrowToLiquidate
        );

    function issueSynthsWithoutDebt(
        bytes32 currencyKey,
        address to,
        uint amount
    ) external returns (bool rateInvalid);

    function burnSynthsWithoutDebt(
        bytes32 currencyKey,
        address to,
        uint amount
    ) external returns (bool rateInvalid);

    function modifyDebtSharesForMigration(address account, uint amount) external;
}


// Inheritance


// Internal references


// https://docs.synthetix.io/contracts/source/contracts/addressresolver
contract AddressResolver is Owned, IAddressResolver {
    mapping(bytes32 => address) public repository;

    constructor(address _owner) public Owned(_owner) {}

    /* ========== RESTRICTED FUNCTIONS ========== */

    function importAddresses(bytes32[] calldata names, address[] calldata destinations) external onlyOwner {
        require(names.length == destinations.length, "Input lengths must match");

        for (uint i = 0; i < names.length; i++) {
            bytes32 name = names[i];
            address destination = destinations[i];
            repository[name] = destination;
            emit AddressImported(name, destination);
        }
    }

    /* ========= PUBLIC FUNCTIONS ========== */

    function rebuildCaches(MixinResolver[] calldata destinations) external {
        for (uint i = 0; i < destinations.length; i++) {
            destinations[i].rebuildCache();
        }
    }

    /* ========== VIEWS ========== */

    function areAddressesImported(bytes32[] calldata names, address[] calldata destinations) external view returns (bool) {
        for (uint i = 0; i < names.length; i++) {
            if (repository[names[i]] != destinations[i]) {
                return false;
            }
        }
        return true;
    }

    function getAddress(bytes32 name) external view returns (address) {
        return repository[name];
    }

    function requireAndGetAddress(bytes32 name, string calldata reason) external view returns (address) {
        address _foundAddress = repository[name];
        require(_foundAddress != address(0), reason);
        return _foundAddress;
    }

    function getSynth(bytes32 key) external view returns (address) {
        IIssuer issuer = IIssuer(repository["Issuer"]);
        require(address(issuer) != address(0), "Cannot find Issuer address");
        return address(issuer.synths(key));
    }

    /* ========== EVENTS ========== */

    event AddressImported(bytes32 name, address destination);
}


// Internal references


// https://docs.synthetix.io/contracts/source/contracts/mixinresolver
contract MixinResolver {
    AddressResolver public resolver;

    mapping(bytes32 => address) private addressCache;

    constructor(address _resolver) internal {
        resolver = AddressResolver(_resolver);
    }

    /* ========== INTERNAL FUNCTIONS ========== */

    function combineArrays(bytes32[] memory first, bytes32[] memory second)
        internal
        pure
        returns (bytes32[] memory combination)
    {
        combination = new bytes32[](first.length + second.length);

        for (uint i = 0; i < first.length; i++) {
            combination[i] = first[i];
        }

        for (uint j = 0; j < second.length; j++) {
            combination[first.length + j] = second[j];
        }
    }

    /* ========== PUBLIC FUNCTIONS ========== */

    // Note: this function is public not external in order for it to be overridden and invoked via super in subclasses
    function resolverAddressesRequired() public view returns (bytes32[] memory addresses) {}

    function rebuildCache() public {
        bytes32[] memory requiredAddresses = resolverAddressesRequired();
        // The resolver must call this function whenver it updates its state
        for (uint i = 0; i < requiredAddresses.length; i++) {
            bytes32 name = requiredAddresses[i];
            // Note: can only be invoked once the resolver has all the targets needed added
            address destination =
                resolver.requireAndGetAddress(name, string(abi.encodePacked("Resolver missing target: ", name)));
            addressCache[name] = destination;
            emit CacheUpdated(name, destination);
        }
    }

    /* ========== VIEWS ========== */

    function isResolverCached() external view returns (bool) {
        bytes32[] memory requiredAddresses = resolverAddressesRequired();
        for (uint i = 0; i < requiredAddresses.length; i++) {
            bytes32 name = requiredAddresses[i];
            // false if our cache is invalid or if the resolver doesn't have the required address
            if (resolver.getAddress(name) != addressCache[name] || addressCache[name] == address(0)) {
                return false;
            }
        }

        return true;
    }

    /* ========== INTERNAL FUNCTIONS ========== */

    function requireAndGetAddress(bytes32 name) internal view returns (address) {
        address _foundAddress = addressCache[name];
        require(_foundAddress != address(0), string(abi.encodePacked("Missing address: ", name)));
        return _foundAddress;
    }

    /* ========== EVENTS ========== */

    event CacheUpdated(bytes32 name, address destination);
}


// https://docs.synthetix.io/contracts/source/interfaces/iflexiblestorage
interface IFlexibleStorage {
    // Views
    function getUIntValue(bytes32 contractName, bytes32 record) external view returns (uint);

    function getUIntValues(bytes32 contractName, bytes32[] calldata records) external view returns (uint[] memory);

    function getIntValue(bytes32 contractName, bytes32 record) external view returns (int);

    function getIntValues(bytes32 contractName, bytes32[] calldata records) external view returns (int[] memory);

    function getAddressValue(bytes32 contractName, bytes32 record) external view returns (address);

    function getAddressValues(bytes32 contractName, bytes32[] calldata records) external view returns (address[] memory);

    function getBoolValue(bytes32 contractName, bytes32 record) external view returns (bool);

    function getBoolValues(bytes32 contractName, bytes32[] calldata records) external view returns (bool[] memory);

    function getBytes32Value(bytes32 contractName, bytes32 record) external view returns (bytes32);

    function getBytes32Values(bytes32 contractName, bytes32[] calldata records) external view returns (bytes32[] memory);

    // Mutative functions
    function deleteUIntValue(bytes32 contractName, bytes32 record) external;

    function deleteIntValue(bytes32 contractName, bytes32 record) external;

    function deleteAddressValue(bytes32 contractName, bytes32 record) external;

    function deleteBoolValue(bytes32 contractName, bytes32 record) external;

    function deleteBytes32Value(bytes32 contractName, bytes32 record) external;

    function setUIntValue(
        bytes32 contractName,
        bytes32 record,
        uint value
    ) external;

    function setUIntValues(
        bytes32 contractName,
        bytes32[] calldata records,
        uint[] calldata values
    ) external;

    function setIntValue(
        bytes32 contractName,
        bytes32 record,
        int value
    ) external;

    function setIntValues(
        bytes32 contractName,
        bytes32[] calldata records,
        int[] calldata values
    ) external;

    function setAddressValue(
        bytes32 contractName,
        bytes32 record,
        address value
    ) external;

    function setAddressValues(
        bytes32 contractName,
        bytes32[] calldata records,
        address[] calldata values
    ) external;

    function setBoolValue(
        bytes32 contractName,
        bytes32 record,
        bool value
    ) external;

    function setBoolValues(
        bytes32 contractName,
        bytes32[] calldata records,
        bool[] calldata values
    ) external;

    function setBytes32Value(
        bytes32 contractName,
        bytes32 record,
        bytes32 value
    ) external;

    function setBytes32Values(
        bytes32 contractName,
        bytes32[] calldata records,
        bytes32[] calldata values
    ) external;
}


// Internal references


// https://docs.synthetix.io/contracts/source/contracts/mixinsystemsettings
contract MixinSystemSettings is MixinResolver {
    // must match the one defined SystemSettingsLib, defined in both places due to sol v0.5 limitations
    bytes32 internal constant SETTING_CONTRACT_NAME = "SystemSettings";

    bytes32 internal constant SETTING_WAITING_PERIOD_SECS = "waitingPeriodSecs";
    bytes32 internal constant SETTING_PRICE_DEVIATION_THRESHOLD_FACTOR = "priceDeviationThresholdFactor";
    bytes32 internal constant SETTING_ISSUANCE_RATIO = "issuanceRatio";
    bytes32 internal constant SETTING_FEE_PERIOD_DURATION = "feePeriodDuration";
    bytes32 internal constant SETTING_TARGET_THRESHOLD = "targetThreshold";
    bytes32 internal constant SETTING_LIQUIDATION_DELAY = "liquidationDelay";
    bytes32 internal constant SETTING_LIQUIDATION_RATIO = "liquidationRatio";
    bytes32 internal constant SETTING_LIQUIDATION_ESCROW_DURATION = "liquidationEscrowDuration";
    bytes32 internal constant SETTING_LIQUIDATION_PENALTY = "liquidationPenalty";
    bytes32 internal constant SETTING_SNX_LIQUIDATION_PENALTY = "snxLiquidationPenalty";
    bytes32 internal constant SETTING_SELF_LIQUIDATION_PENALTY = "selfLiquidationPenalty";
    bytes32 internal constant SETTING_FLAG_REWARD = "flagReward";
    bytes32 internal constant SETTING_LIQUIDATE_REWARD = "liquidateReward";
    bytes32 internal constant SETTING_RATE_STALE_PERIOD = "rateStalePeriod";
    /* ========== Exchange Fees Related ========== */
    bytes32 internal constant SETTING_EXCHANGE_FEE_RATE = "exchangeFeeRate";
    bytes32 internal constant SETTING_EXCHANGE_DYNAMIC_FEE_THRESHOLD = "exchangeDynamicFeeThreshold";
    bytes32 internal constant SETTING_EXCHANGE_DYNAMIC_FEE_WEIGHT_DECAY = "exchangeDynamicFeeWeightDecay";
    bytes32 internal constant SETTING_EXCHANGE_DYNAMIC_FEE_ROUNDS = "exchangeDynamicFeeRounds";
    bytes32 internal constant SETTING_EXCHANGE_MAX_DYNAMIC_FEE = "exchangeMaxDynamicFee";
    /* ========== End Exchange Fees Related ========== */
    bytes32 internal constant SETTING_MINIMUM_STAKE_TIME = "minimumStakeTime";
    bytes32 internal constant SETTING_AGGREGATOR_WARNING_FLAGS = "aggregatorWarningFlags";
    bytes32 internal constant SETTING_TRADING_REWARDS_ENABLED = "tradingRewardsEnabled";
    bytes32 internal constant SETTING_DEBT_SNAPSHOT_STALE_TIME = "debtSnapshotStaleTime";
    bytes32 internal constant SETTING_CROSS_DOMAIN_DEPOSIT_GAS_LIMIT = "crossDomainDepositGasLimit";
    bytes32 internal constant SETTING_CROSS_DOMAIN_ESCROW_GAS_LIMIT = "crossDomainEscrowGasLimit";
    bytes32 internal constant SETTING_CROSS_DOMAIN_REWARD_GAS_LIMIT = "crossDomainRewardGasLimit";
    bytes32 internal constant SETTING_CROSS_DOMAIN_WITHDRAWAL_GAS_LIMIT = "crossDomainWithdrawalGasLimit";
    bytes32 internal constant SETTING_CROSS_DOMAIN_FEE_PERIOD_CLOSE_GAS_LIMIT = "crossDomainCloseGasLimit";
    bytes32 internal constant SETTING_CROSS_DOMAIN_RELAY_GAS_LIMIT = "crossDomainRelayGasLimit";
    bytes32 internal constant SETTING_ETHER_WRAPPER_MAX_ETH = "etherWrapperMaxETH";
    bytes32 internal constant SETTING_ETHER_WRAPPER_MINT_FEE_RATE = "etherWrapperMintFeeRate";
    bytes32 internal constant SETTING_ETHER_WRAPPER_BURN_FEE_RATE = "etherWrapperBurnFeeRate";
    bytes32 internal constant SETTING_WRAPPER_MAX_TOKEN_AMOUNT = "wrapperMaxTokens";
    bytes32 internal constant SETTING_WRAPPER_MINT_FEE_RATE = "wrapperMintFeeRate";
    bytes32 internal constant SETTING_WRAPPER_BURN_FEE_RATE = "wrapperBurnFeeRate";
    bytes32 internal constant SETTING_INTERACTION_DELAY = "interactionDelay";
    bytes32 internal constant SETTING_COLLAPSE_FEE_RATE = "collapseFeeRate";
    bytes32 internal constant SETTING_ATOMIC_MAX_VOLUME_PER_BLOCK = "atomicMaxVolumePerBlock";
    bytes32 internal constant SETTING_ATOMIC_TWAP_WINDOW = "atomicTwapWindow";
    bytes32 internal constant SETTING_ATOMIC_EQUIVALENT_FOR_DEX_PRICING = "atomicEquivalentForDexPricing";
    bytes32 internal constant SETTING_ATOMIC_EXCHANGE_FEE_RATE = "atomicExchangeFeeRate";
    bytes32 internal constant SETTING_ATOMIC_VOLATILITY_CONSIDERATION_WINDOW = "atomicVolConsiderationWindow";
    bytes32 internal constant SETTING_ATOMIC_VOLATILITY_UPDATE_THRESHOLD = "atomicVolUpdateThreshold";
    bytes32 internal constant SETTING_PURE_CHAINLINK_PRICE_FOR_ATOMIC_SWAPS_ENABLED = "pureChainlinkForAtomicsEnabled";
    bytes32 internal constant SETTING_CROSS_SYNTH_TRANSFER_ENABLED = "crossChainSynthTransferEnabled";

    bytes32 internal constant CONTRACT_FLEXIBLESTORAGE = "FlexibleStorage";

    enum CrossDomainMessageGasLimits {Deposit, Escrow, Reward, Withdrawal, CloseFeePeriod, Relay}

    struct DynamicFeeConfig {
        uint threshold;
        uint weightDecay;
        uint rounds;
        uint maxFee;
    }

    constructor(address _resolver) internal MixinResolver(_resolver) {}

    function resolverAddressesRequired() public view returns (bytes32[] memory addresses) {
        addresses = new bytes32[](1);
        addresses[0] = CONTRACT_FLEXIBLESTORAGE;
    }

    function flexibleStorage() internal view returns (IFlexibleStorage) {
        return IFlexibleStorage(requireAndGetAddress(CONTRACT_FLEXIBLESTORAGE));
    }

    function _getGasLimitSetting(CrossDomainMessageGasLimits gasLimitType) internal pure returns (bytes32) {
        if (gasLimitType == CrossDomainMessageGasLimits.Deposit) {
            return SETTING_CROSS_DOMAIN_DEPOSIT_GAS_LIMIT;
        } else if (gasLimitType == CrossDomainMessageGasLimits.Escrow) {
            return SETTING_CROSS_DOMAIN_ESCROW_GAS_LIMIT;
        } else if (gasLimitType == CrossDomainMessageGasLimits.Reward) {
            return SETTING_CROSS_DOMAIN_REWARD_GAS_LIMIT;
        } else if (gasLimitType == CrossDomainMessageGasLimits.Withdrawal) {
            return SETTING_CROSS_DOMAIN_WITHDRAWAL_GAS_LIMIT;
        } else if (gasLimitType == CrossDomainMessageGasLimits.Relay) {
            return SETTING_CROSS_DOMAIN_RELAY_GAS_LIMIT;
        } else if (gasLimitType == CrossDomainMessageGasLimits.CloseFeePeriod) {
            return SETTING_CROSS_DOMAIN_FEE_PERIOD_CLOSE_GAS_LIMIT;
        } else {
            revert("Unknown gas limit type");
        }
    }

    function getCrossDomainMessageGasLimit(CrossDomainMessageGasLimits gasLimitType) internal view returns (uint) {
        return flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, _getGasLimitSetting(gasLimitType));
    }

    function getTradingRewardsEnabled() internal view returns (bool) {
        return flexibleStorage().getBoolValue(SETTING_CONTRACT_NAME, SETTING_TRADING_REWARDS_ENABLED);
    }

    function getWaitingPeriodSecs() internal view returns (uint) {
        return flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_WAITING_PERIOD_SECS);
    }

    function getPriceDeviationThresholdFactor() internal view returns (uint) {
        return flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_PRICE_DEVIATION_THRESHOLD_FACTOR);
    }

    function getIssuanceRatio() internal view returns (uint) {
        // lookup on flexible storage directly for gas savings (rather than via SystemSettings)
        return flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_ISSUANCE_RATIO);
    }

    function getFeePeriodDuration() internal view returns (uint) {
        // lookup on flexible storage directly for gas savings (rather than via SystemSettings)
        return flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_FEE_PERIOD_DURATION);
    }

    function getTargetThreshold() internal view returns (uint) {
        // lookup on flexible storage directly for gas savings (rather than via SystemSettings)
        return flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_TARGET_THRESHOLD);
    }

    function getLiquidationDelay() internal view returns (uint) {
        return flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_LIQUIDATION_DELAY);
    }

    function getLiquidationRatio() internal view returns (uint) {
        return flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_LIQUIDATION_RATIO);
    }

    function getLiquidationEscrowDuration() internal view returns (uint) {
        return flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_LIQUIDATION_ESCROW_DURATION);
    }

    function getLiquidationPenalty() internal view returns (uint) {
        return flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_LIQUIDATION_PENALTY);
    }

    function getSnxLiquidationPenalty() internal view returns (uint) {
        return flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_SNX_LIQUIDATION_PENALTY);
    }

    function getSelfLiquidationPenalty() internal view returns (uint) {
        return flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_SELF_LIQUIDATION_PENALTY);
    }

    function getFlagReward() internal view returns (uint) {
        return flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_FLAG_REWARD);
    }

    function getLiquidateReward() internal view returns (uint) {
        return flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_LIQUIDATE_REWARD);
    }

    function getRateStalePeriod() internal view returns (uint) {
        return flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_RATE_STALE_PERIOD);
    }

    /* ========== Exchange Related Fees ========== */
    function getExchangeFeeRate(bytes32 currencyKey) internal view returns (uint) {
        return
            flexibleStorage().getUIntValue(
                SETTING_CONTRACT_NAME,
                keccak256(abi.encodePacked(SETTING_EXCHANGE_FEE_RATE, currencyKey))
            );
    }

    /// @notice Get exchange dynamic fee related keys
    /// @return threshold, weight decay, rounds, and max fee
    function getExchangeDynamicFeeConfig() internal view returns (DynamicFeeConfig memory) {
        bytes32[] memory keys = new bytes32[](4);
        keys[0] = SETTING_EXCHANGE_DYNAMIC_FEE_THRESHOLD;
        keys[1] = SETTING_EXCHANGE_DYNAMIC_FEE_WEIGHT_DECAY;
        keys[2] = SETTING_EXCHANGE_DYNAMIC_FEE_ROUNDS;
        keys[3] = SETTING_EXCHANGE_MAX_DYNAMIC_FEE;
        uint[] memory values = flexibleStorage().getUIntValues(SETTING_CONTRACT_NAME, keys);
        return DynamicFeeConfig({threshold: values[0], weightDecay: values[1], rounds: values[2], maxFee: values[3]});
    }

    /* ========== End Exchange Related Fees ========== */

    function getMinimumStakeTime() internal view returns (uint) {
        return flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_MINIMUM_STAKE_TIME);
    }

    function getAggregatorWarningFlags() internal view returns (address) {
        return flexibleStorage().getAddressValue(SETTING_CONTRACT_NAME, SETTING_AGGREGATOR_WARNING_FLAGS);
    }

    function getDebtSnapshotStaleTime() internal view returns (uint) {
        return flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_DEBT_SNAPSHOT_STALE_TIME);
    }

    function getEtherWrapperMaxETH() internal view returns (uint) {
        return flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_ETHER_WRAPPER_MAX_ETH);
    }

    function getEtherWrapperMintFeeRate() internal view returns (uint) {
        return flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_ETHER_WRAPPER_MINT_FEE_RATE);
    }

    function getEtherWrapperBurnFeeRate() internal view returns (uint) {
        return flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_ETHER_WRAPPER_BURN_FEE_RATE);
    }

    function getWrapperMaxTokenAmount(address wrapper) internal view returns (uint) {
        return
            flexibleStorage().getUIntValue(
                SETTING_CONTRACT_NAME,
                keccak256(abi.encodePacked(SETTING_WRAPPER_MAX_TOKEN_AMOUNT, wrapper))
            );
    }

    function getWrapperMintFeeRate(address wrapper) internal view returns (int) {
        return
            flexibleStorage().getIntValue(
                SETTING_CONTRACT_NAME,
                keccak256(abi.encodePacked(SETTING_WRAPPER_MINT_FEE_RATE, wrapper))
            );
    }

    function getWrapperBurnFeeRate(address wrapper) internal view returns (int) {
        return
            flexibleStorage().getIntValue(
                SETTING_CONTRACT_NAME,
                keccak256(abi.encodePacked(SETTING_WRAPPER_BURN_FEE_RATE, wrapper))
            );
    }

    function getInteractionDelay(address collateral) internal view returns (uint) {
        return
            flexibleStorage().getUIntValue(
                SETTING_CONTRACT_NAME,
                keccak256(abi.encodePacked(SETTING_INTERACTION_DELAY, collateral))
            );
    }

    function getCollapseFeeRate(address collateral) internal view returns (uint) {
        return
            flexibleStorage().getUIntValue(
                SETTING_CONTRACT_NAME,
                keccak256(abi.encodePacked(SETTING_COLLAPSE_FEE_RATE, collateral))
            );
    }

    function getAtomicMaxVolumePerBlock() internal view returns (uint) {
        return flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_ATOMIC_MAX_VOLUME_PER_BLOCK);
    }

    function getAtomicTwapWindow() internal view returns (uint) {
        return flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_ATOMIC_TWAP_WINDOW);
    }

    function getAtomicEquivalentForDexPricing(bytes32 currencyKey) internal view returns (address) {
        return
            flexibleStorage().getAddressValue(
                SETTING_CONTRACT_NAME,
                keccak256(abi.encodePacked(SETTING_ATOMIC_EQUIVALENT_FOR_DEX_PRICING, currencyKey))
            );
    }

    function getAtomicExchangeFeeRate(bytes32 currencyKey) internal view returns (uint) {
        return
            flexibleStorage().getUIntValue(
                SETTING_CONTRACT_NAME,
                keccak256(abi.encodePacked(SETTING_ATOMIC_EXCHANGE_FEE_RATE, currencyKey))
            );
    }

    function getAtomicVolatilityConsiderationWindow(bytes32 currencyKey) internal view returns (uint) {
        return
            flexibleStorage().getUIntValue(
                SETTING_CONTRACT_NAME,
                keccak256(abi.encodePacked(SETTING_ATOMIC_VOLATILITY_CONSIDERATION_WINDOW, currencyKey))
            );
    }

    function getAtomicVolatilityUpdateThreshold(bytes32 currencyKey) internal view returns (uint) {
        return
            flexibleStorage().getUIntValue(
                SETTING_CONTRACT_NAME,
                keccak256(abi.encodePacked(SETTING_ATOMIC_VOLATILITY_UPDATE_THRESHOLD, currencyKey))
            );
    }

    function getPureChainlinkPriceForAtomicSwapsEnabled(bytes32 currencyKey) internal view returns (bool) {
        return
            flexibleStorage().getBoolValue(
                SETTING_CONTRACT_NAME,
                keccak256(abi.encodePacked(SETTING_PURE_CHAINLINK_PRICE_FOR_ATOMIC_SWAPS_ENABLED, currencyKey))
            );
    }

    function getCrossChainSynthTransferEnabled(bytes32 currencyKey) internal view returns (uint) {
        return
            flexibleStorage().getUIntValue(
                SETTING_CONTRACT_NAME,
                keccak256(abi.encodePacked(SETTING_CROSS_SYNTH_TRANSFER_ENABLED, currencyKey))
            );
    }

    function getExchangeMaxDynamicFee() internal view returns (uint) {
        return flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_EXCHANGE_MAX_DYNAMIC_FEE);
    }

    function getExchangeDynamicFeeRounds() internal view returns (uint) {
        return flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_EXCHANGE_DYNAMIC_FEE_ROUNDS);
    }

    function getExchangeDynamicFeeThreshold() internal view returns (uint) {
        return flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_EXCHANGE_DYNAMIC_FEE_THRESHOLD);
    }

    function getExchangeDynamicFeeWeightDecay() internal view returns (uint) {
        return flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_EXCHANGE_DYNAMIC_FEE_WEIGHT_DECAY);
    }
}


pragma experimental ABIEncoderV2;

interface IOwnerRelayOnOptimism {
    function finalizeRelay(address target, bytes calldata payload) external;

    function finalizeRelayBatch(address[] calldata target, bytes[] calldata payloads) external;
}


// SPDX-License-Identifier: MIT


/**
 * @title iAbs_BaseCrossDomainMessenger
 */
interface iAbs_BaseCrossDomainMessenger {

    /**********
     * Events *
     **********/

    event SentMessage(bytes message);
    event RelayedMessage(bytes32 msgHash);
    event FailedRelayedMessage(bytes32 msgHash);


    /*************
     * Variables *
     *************/

    function xDomainMessageSender() external view returns (address);


    /********************
     * Public Functions *
     ********************/

    /**
     * Sends a cross domain message to the target messenger.
     * @param _target Target contract address.
     * @param _message Message to send to the target.
     * @param _gasLimit Gas limit for the provided message.
     */
    function sendMessage(
        address _target,
        bytes calldata _message,
        uint32 _gasLimit
    ) external;
}


// Inheritance


// Internal references


contract OwnerRelayOnEthereum is MixinSystemSettings, Owned {
    /* ========== ADDRESS RESOLVER CONFIGURATION ========== */

    bytes32 private constant CONTRACT_EXT_MESSENGER = "ext:Messenger";
    bytes32 private constant CONTRACT_OVM_OWNER_RELAY_ON_OPTIMISM = "ovm:OwnerRelayOnOptimism";

    // ========== CONSTRUCTOR ==========

    constructor(address _owner, address _resolver) public Owned(_owner) MixinSystemSettings(_resolver) {}

    /* ========== INTERNALS ============ */

    function _messenger() private view returns (iAbs_BaseCrossDomainMessenger) {
        return iAbs_BaseCrossDomainMessenger(requireAndGetAddress(CONTRACT_EXT_MESSENGER));
    }

    function _ownerRelayOnOptimism() private view returns (address) {
        return requireAndGetAddress(CONTRACT_OVM_OWNER_RELAY_ON_OPTIMISM);
    }

    function _getCrossDomainGasLimit(uint32 crossDomainGasLimit) private view returns (uint32) {
        // Use specified crossDomainGasLimit if specified value is not zero.
        // otherwise use the default in SystemSettings.
        return
            crossDomainGasLimit != 0
                ? crossDomainGasLimit
                : uint32(getCrossDomainMessageGasLimit(CrossDomainMessageGasLimits.Relay));
    }

    /* ========== VIEWS ========== */

    function resolverAddressesRequired() public view returns (bytes32[] memory addresses) {
        bytes32[] memory existingAddresses = MixinSystemSettings.resolverAddressesRequired();
        bytes32[] memory newAddresses = new bytes32[](2);
        newAddresses[0] = CONTRACT_EXT_MESSENGER;
        newAddresses[1] = CONTRACT_OVM_OWNER_RELAY_ON_OPTIMISM;
        addresses = combineArrays(existingAddresses, newAddresses);
    }

    /* ========== RESTRICTED ========== */

    function initiateRelay(
        address target,
        bytes calldata payload,
        uint32 crossDomainGasLimit // If zero, uses default value in SystemSettings
    ) external onlyOwner {
        IOwnerRelayOnOptimism ownerRelayOnOptimism;
        bytes memory messageData = abi.encodeWithSelector(ownerRelayOnOptimism.finalizeRelay.selector, target, payload);

        _messenger().sendMessage(_ownerRelayOnOptimism(), messageData, _getCrossDomainGasLimit(crossDomainGasLimit));

        emit RelayInitiated(target, payload);
    }

    function initiateRelayBatch(
        address[] calldata targets,
        bytes[] calldata payloads,
        uint32 crossDomainGasLimit // If zero, uses default value in SystemSettings
    ) external onlyOwner {
        // First check that the length of the arguments match
        require(targets.length == payloads.length, "Argument length mismatch");

        IOwnerRelayOnOptimism ownerRelayOnOptimism;
        bytes memory messageData =
            abi.encodeWithSelector(ownerRelayOnOptimism.finalizeRelayBatch.selector, targets, payloads);

        _messenger().sendMessage(_ownerRelayOnOptimism(), messageData, _getCrossDomainGasLimit(crossDomainGasLimit));

        emit RelayBatchInitiated(targets, payloads);
    }

    /* ========== EVENTS ========== */

    event RelayInitiated(address target, bytes payload);
    event RelayBatchInitiated(address[] targets, bytes[] payloads);
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_resolver","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"name","type":"bytes32"},{"indexed":false,"internalType":"address","name":"destination","type":"address"}],"name":"CacheUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"targets","type":"address[]"},{"indexed":false,"internalType":"bytes[]","name":"payloads","type":"bytes[]"}],"name":"RelayBatchInitiated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"bytes","name":"payload","type":"bytes"}],"name":"RelayInitiated","type":"event"},{"constant":false,"inputs":[],"name":"acceptOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"payload","type":"bytes"},{"internalType":"uint32","name":"crossDomainGasLimit","type":"uint32"}],"name":"initiateRelay","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address[]","name":"targets","type":"address[]"},{"internalType":"bytes[]","name":"payloads","type":"bytes[]"},{"internalType":"uint32","name":"crossDomainGasLimit","type":"uint32"}],"name":"initiateRelayBatch","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isResolverCached","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"nominateNewOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"nominatedOwner","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":false,"inputs":[],"name":"rebuildCache","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"resolver","outputs":[{"internalType":"contract AddressResolver","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"resolverAddressesRequired","outputs":[{"internalType":"bytes32[]","name":"addresses","type":"bytes32[]"}],"payable":false,"stateMutability":"view","type":"function"}]

60806040523480156200001157600080fd5b50604051620016b3380380620016b38339810160408190526200003491620000f4565b600080546001600160a01b0319166001600160a01b038381169190911790915582908116620000805760405162461bcd60e51b81526004016200007790620001b0565b60405180910390fd5b600280546001600160a01b0319166001600160a01b0383161790556040517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c90620000d09060009084906200018a565b60405180910390a15050506200020b565b8051620000ee81620001f1565b92915050565b600080604083850312156200010857600080fd5b6000620001168585620000e1565b92505060206200012985828601620000e1565b9150509250929050565b6200013e81620001dd565b82525050565b6200013e81620001cb565b60006200015e601983620001c2565b7f4f776e657220616464726573732063616e6e6f74206265203000000000000000815260200192915050565b604081016200019a828562000133565b620001a9602083018462000144565b9392505050565b60208082528101620000ee816200014f565b90815260200190565b60006001600160a01b038216620000ee565b6000620000ee826000620000ee82620001cb565b620001fc81620001cb565b81146200020857600080fd5b50565b611498806200021b6000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c80637418536011610066578063741853601461011357806379ba50971461011b578063899ffef4146101235780638da5cb5b14610138578063e210f042146101405761009e565b806304f3bcec146100a35780631627540c146100c15780632af64bd3146100d65780634aeda11f146100eb57806353a47bb7146100fe575b600080fd5b6100ab610153565b6040516100b891906112e4565b60405180910390f35b6100d46100cf366004610cde565b610162565b005b6100de6101c0565b6040516100b8919061127f565b6100d46100f9366004610d8c565b6102d6565b61010661041e565b6040516100b891906111b4565b6100d461042d565b6100d4610582565b61012b61061e565b6040516100b8919061126e565b6101066106bd565b6100d461014e366004610d22565b6106cc565b6000546001600160a01b031681565b61016a6107e7565b600380546001600160a01b0319166001600160a01b0383161790556040517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce22906101b59083906111b4565b60405180910390a150565b600060606101cc61061e565b905060005b81518110156102cc5760008282815181106101e857fe5b60209081029190910181015160008181526001909252604080832054925490516321f8a72160e01b81529193506001600160a01b039283169216906321f8a7219061023790859060040161128d565b60206040518083038186803b15801561024f57600080fd5b505afa158015610263573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506102879190810190610d04565b6001600160a01b03161415806102b257506000818152600160205260409020546001600160a01b0316155b156102c357600093505050506102d3565b506001016101d1565b5060019150505b90565b6102de6107e7565b8382146103065760405162461bcd60e51b81526004016102fd90611323565b60405180910390fd5b604051600090606090637a153de960e11b9061032c90899089908990899060240161123d565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091529050610368610813565b6001600160a01b0316633dbb202b61037e610833565b8361038887610859565b6040518463ffffffff1660e01b81526004016103a69392919061120e565b600060405180830381600087803b1580156103c057600080fd5b505af11580156103d4573d6000803e3d6000fd5b505050507faa86356fa99dddd7d5773ad300a6f8e0213a5a2f3f5dbdd4b696c6746d78ec048787878760405161040d949392919061123d565b60405180910390a150505050505050565b6003546001600160a01b031681565b606061043761061e565b905060005b815181101561057e57600082828151811061045357fe5b6020026020010151905060008060009054906101000a90046001600160a01b03166001600160a01b031663dacb2d01838460405160200161049491906111a9565b6040516020818303038152906040526040518363ffffffff1660e01b81526004016104c09291906112c4565b60206040518083038186803b1580156104d857600080fd5b505afa1580156104ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506105109190810190610d04565b6000838152600160205260409081902080546001600160a01b0319166001600160a01b038416179055519091507f88a93678a3692f6789d9546fc621bf7234b101ddb7d4fe479455112831b8aa689061056c908490849061129b565b60405180910390a1505060010161043c565b5050565b6003546001600160a01b031633146105ac5760405162461bcd60e51b81526004016102fd90611303565b6002546003546040517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c926105ef926001600160a01b03918216929116906111c2565b60405180910390a160038054600280546001600160a01b03199081166001600160a01b03841617909155169055565b60608061062961087f565b6040805160028082526060808301845293945090916020830190803883390190505090506c32bc3a1d26b2b9b9b2b733b2b960991b8160008151811061066b57fe5b602002602001018181525050776f766d3a4f776e657252656c61794f6e4f7074696d69736d60401b816001815181106106a057fe5b6020026020010181815250506106b682826108d0565b9250505090565b6002546001600160a01b031681565b6106d46107e7565b60405160009060609063c3c79e5d60e01b906106f8908890889088906024016111e4565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091529050610734610813565b6001600160a01b0316633dbb202b61074a610833565b8361075487610859565b6040518463ffffffff1660e01b81526004016107729392919061120e565b600060405180830381600087803b15801561078c57600080fd5b505af11580156107a0573d6000803e3d6000fd5b505050507f0ad3bed4c45a8b7f0de84c5caaea6851b93c0453c25ad26d37077fcf4feb5c448686866040516107d7939291906111e4565b60405180910390a1505050505050565b6002546001600160a01b031633146108115760405162461bcd60e51b81526004016102fd90611313565b565b600061082e6c32bc3a1d26b2b9b9b2b733b2b960991b61098c565b905090565b600061082e776f766d3a4f776e657252656c61794f6e4f7074696d69736d60401b61098c565b600063ffffffff82166108755761087060056109e9565b610877565b815b90505b919050565b604080516001808252818301909252606091602080830190803883390190505090506e466c657869626c6553746f7261676560881b816000815181106108c157fe5b60200260200101818152505090565b60608151835101604051908082528060200260200182016040528015610900578160200160208202803883390190505b50905060005b83518110156109425783818151811061091b57fe5b602002602001015182828151811061092f57fe5b6020908102919091010152600101610906565b5060005b82518110156109855782818151811061095b57fe5b602002602001015182828651018151811061097257fe5b6020908102919091010152600101610946565b5092915050565b60008181526001602090815260408083205490516001600160a01b0390911691821515916109bc91869101611189565b604051602081830303815290604052906109855760405162461bcd60e51b81526004016102fd91906112f2565b60006109f3610a89565b6001600160a01b03166323257c2b6d53797374656d53657474696e677360901b610a1c85610aa6565b6040518363ffffffff1660e01b8152600401610a399291906112a9565b60206040518083038186803b158015610a5157600080fd5b505afa158015610a65573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506108779190810190610e12565b600061082e6e466c657869626c6553746f7261676560881b61098c565b600080826005811115610ab557fe5b1415610ae257507f63726f7373446f6d61696e4465706f7369744761734c696d697400000000000061087a565b6001826005811115610af057fe5b1415610b1d57507f63726f7373446f6d61696e457363726f774761734c696d69740000000000000061087a565b6002826005811115610b2b57fe5b1415610b5857507f63726f7373446f6d61696e5265776172644761734c696d69740000000000000061087a565b6003826005811115610b6657fe5b1415610b9357507f63726f7373446f6d61696e5769746864726177616c4761734c696d697400000061087a565b6005826005811115610ba157fe5b1415610bce57507f63726f7373446f6d61696e52656c61794761734c696d6974000000000000000061087a565b6004826005811115610bdc57fe5b1415610c0957507f63726f7373446f6d61696e436c6f73654761734c696d6974000000000000000061087a565b60405162461bcd60e51b81526004016102fd90611333565b8035610c2c8161142c565b92915050565b8051610c2c8161142c565b60008083601f840112610c4f57600080fd5b50813567ffffffffffffffff811115610c6757600080fd5b602083019150836020820283011115610c7f57600080fd5b9250929050565b60008083601f840112610c9857600080fd5b50813567ffffffffffffffff811115610cb057600080fd5b602083019150836001820283011115610c7f57600080fd5b8051610c2c81611443565b8035610c2c8161144c565b600060208284031215610cf057600080fd5b6000610cfc8484610c21565b949350505050565b600060208284031215610d1657600080fd5b6000610cfc8484610c32565b60008060008060608587031215610d3857600080fd5b6000610d448787610c21565b945050602085013567ffffffffffffffff811115610d6157600080fd5b610d6d87828801610c86565b93509350506040610d8087828801610cd3565b91505092959194509250565b600080600080600060608688031215610da457600080fd5b853567ffffffffffffffff811115610dbb57600080fd5b610dc788828901610c3d565b9550955050602086013567ffffffffffffffff811115610de657600080fd5b610df288828901610c3d565b93509350506040610e0588828901610cd3565b9150509295509295909350565b600060208284031215610e2457600080fd5b6000610cfc8484610cc8565b6000610e3c8383610e5d565b505060200190565b6000610e3c8383610f8a565b6000610cfc848484610fa4565b610e66816113b6565b82525050565b6000610e78838561134d565b9350610e83826102d3565b8060005b85811015610eb957610e998284611356565b610ea38882610e30565b9750610eae83611343565b925050600101610e87565b509495945050505050565b6000610ecf82611349565b610ed9818561134d565b9350610ee483611343565b8060005b83811015610eb9578151610efc8882610e44565b9750610f0783611343565b925050600101610ee8565b6000610f1e838561134d565b935083602084028501610f30846102d3565b8060005b87811015610f74578484038952610f4b8284611365565b610f56868284610e50565b9550610f6184611343565b60209b909b019a93505050600101610f34565b5091979650505050505050565b610e66816113c1565b610e66816102d3565b610e66610f9f826102d3565b6102d3565b6000610fb0838561134d565b9350610fbd8385846113e6565b610fc683611422565b9093019392505050565b6000610fdb82611349565b610fe5818561134d565b9350610ff58185602086016113f2565b610fc681611422565b610e66816113db565b600061101460358361134d565b7f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7581527402063616e20616363657074206f776e65727368697605c1b602082015260400192915050565b600061106b60118361087a565b70026b4b9b9b4b7339030b2323932b9b99d1607d1b815260110192915050565b6000611098602f8361134d565b7f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726681526e37b936903a3434b99030b1ba34b7b760891b602082015260400192915050565b60006110e960198361087a565b7f5265736f6c766572206d697373696e67207461726765743a2000000000000000815260190192915050565b600061112260188361134d565b7f417267756d656e74206c656e677468206d69736d617463680000000000000000815260200192915050565b600061115b60168361134d565b75556e6b6e6f776e20676173206c696d6974207479706560501b815260200192915050565b610e66816113d2565b60006111948261105e565b91506111a08284610f93565b50602001919050565b6000611194826110dc565b60208101610c2c8284610e5d565b604081016111d08285610e5d565b6111dd6020830184610e5d565b9392505050565b604081016111f28286610e5d565b8181036020830152611205818486610fa4565b95945050505050565b6060810161121c8286610e5d565b818103602083015261122e8185610fd0565b9050610cfc6040830184611180565b6040808252810161124f818688610e6c565b90508181036020830152611264818486610f12565b9695505050505050565b602080825281016111dd8184610ec4565b60208101610c2c8284610f81565b60208101610c2c8284610f8a565b604081016111d08285610f8a565b604081016112b78285610f8a565b6111dd6020830184610f8a565b604081016112d28285610f8a565b8181036020830152610cfc8184610fd0565b60208101610c2c8284610ffe565b602080825281016111dd8184610fd0565b6020808252810161087781611007565b602080825281016108778161108b565b6020808252810161087781611115565b602080825281016108778161114e565b60200190565b5190565b90815260200190565b60006111dd6020840184610c21565b6000808335601e193685900301811261137d57600080fd5b83810160208101935035915067ffffffffffffffff82111561139e57600080fd5b368290038413156113ae57600080fd5b509250929050565b6000610877826113c6565b151590565b6001600160a01b031690565b63ffffffff1690565b6000610877826113b6565b82818337506000910152565b60005b8381101561140d5781810151838201526020016113f5565b8381111561141c576000848401525b50505050565b601f01601f191690565b611435816113b6565b811461144057600080fd5b50565b611435816102d3565b611435816113d256fea365627a7a723158203072b809bb562623eb0c9e3537caa18bf07d410de197cc3fd131e9bd94de7d0c6c6578706572696d656e74616cf564736f6c6343000510004000000000000000000000000048914229dedd5a9922f44441ffccfc2cb7856ee9000000000000000000000000b61a6af69e992e1bed69b0ae0cba5143ca25d4d1

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061009e5760003560e01c80637418536011610066578063741853601461011357806379ba50971461011b578063899ffef4146101235780638da5cb5b14610138578063e210f042146101405761009e565b806304f3bcec146100a35780631627540c146100c15780632af64bd3146100d65780634aeda11f146100eb57806353a47bb7146100fe575b600080fd5b6100ab610153565b6040516100b891906112e4565b60405180910390f35b6100d46100cf366004610cde565b610162565b005b6100de6101c0565b6040516100b8919061127f565b6100d46100f9366004610d8c565b6102d6565b61010661041e565b6040516100b891906111b4565b6100d461042d565b6100d4610582565b61012b61061e565b6040516100b8919061126e565b6101066106bd565b6100d461014e366004610d22565b6106cc565b6000546001600160a01b031681565b61016a6107e7565b600380546001600160a01b0319166001600160a01b0383161790556040517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce22906101b59083906111b4565b60405180910390a150565b600060606101cc61061e565b905060005b81518110156102cc5760008282815181106101e857fe5b60209081029190910181015160008181526001909252604080832054925490516321f8a72160e01b81529193506001600160a01b039283169216906321f8a7219061023790859060040161128d565b60206040518083038186803b15801561024f57600080fd5b505afa158015610263573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506102879190810190610d04565b6001600160a01b03161415806102b257506000818152600160205260409020546001600160a01b0316155b156102c357600093505050506102d3565b506001016101d1565b5060019150505b90565b6102de6107e7565b8382146103065760405162461bcd60e51b81526004016102fd90611323565b60405180910390fd5b604051600090606090637a153de960e11b9061032c90899089908990899060240161123d565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091529050610368610813565b6001600160a01b0316633dbb202b61037e610833565b8361038887610859565b6040518463ffffffff1660e01b81526004016103a69392919061120e565b600060405180830381600087803b1580156103c057600080fd5b505af11580156103d4573d6000803e3d6000fd5b505050507faa86356fa99dddd7d5773ad300a6f8e0213a5a2f3f5dbdd4b696c6746d78ec048787878760405161040d949392919061123d565b60405180910390a150505050505050565b6003546001600160a01b031681565b606061043761061e565b905060005b815181101561057e57600082828151811061045357fe5b6020026020010151905060008060009054906101000a90046001600160a01b03166001600160a01b031663dacb2d01838460405160200161049491906111a9565b6040516020818303038152906040526040518363ffffffff1660e01b81526004016104c09291906112c4565b60206040518083038186803b1580156104d857600080fd5b505afa1580156104ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506105109190810190610d04565b6000838152600160205260409081902080546001600160a01b0319166001600160a01b038416179055519091507f88a93678a3692f6789d9546fc621bf7234b101ddb7d4fe479455112831b8aa689061056c908490849061129b565b60405180910390a1505060010161043c565b5050565b6003546001600160a01b031633146105ac5760405162461bcd60e51b81526004016102fd90611303565b6002546003546040517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c926105ef926001600160a01b03918216929116906111c2565b60405180910390a160038054600280546001600160a01b03199081166001600160a01b03841617909155169055565b60608061062961087f565b6040805160028082526060808301845293945090916020830190803883390190505090506c32bc3a1d26b2b9b9b2b733b2b960991b8160008151811061066b57fe5b602002602001018181525050776f766d3a4f776e657252656c61794f6e4f7074696d69736d60401b816001815181106106a057fe5b6020026020010181815250506106b682826108d0565b9250505090565b6002546001600160a01b031681565b6106d46107e7565b60405160009060609063c3c79e5d60e01b906106f8908890889088906024016111e4565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091529050610734610813565b6001600160a01b0316633dbb202b61074a610833565b8361075487610859565b6040518463ffffffff1660e01b81526004016107729392919061120e565b600060405180830381600087803b15801561078c57600080fd5b505af11580156107a0573d6000803e3d6000fd5b505050507f0ad3bed4c45a8b7f0de84c5caaea6851b93c0453c25ad26d37077fcf4feb5c448686866040516107d7939291906111e4565b60405180910390a1505050505050565b6002546001600160a01b031633146108115760405162461bcd60e51b81526004016102fd90611313565b565b600061082e6c32bc3a1d26b2b9b9b2b733b2b960991b61098c565b905090565b600061082e776f766d3a4f776e657252656c61794f6e4f7074696d69736d60401b61098c565b600063ffffffff82166108755761087060056109e9565b610877565b815b90505b919050565b604080516001808252818301909252606091602080830190803883390190505090506e466c657869626c6553746f7261676560881b816000815181106108c157fe5b60200260200101818152505090565b60608151835101604051908082528060200260200182016040528015610900578160200160208202803883390190505b50905060005b83518110156109425783818151811061091b57fe5b602002602001015182828151811061092f57fe5b6020908102919091010152600101610906565b5060005b82518110156109855782818151811061095b57fe5b602002602001015182828651018151811061097257fe5b6020908102919091010152600101610946565b5092915050565b60008181526001602090815260408083205490516001600160a01b0390911691821515916109bc91869101611189565b604051602081830303815290604052906109855760405162461bcd60e51b81526004016102fd91906112f2565b60006109f3610a89565b6001600160a01b03166323257c2b6d53797374656d53657474696e677360901b610a1c85610aa6565b6040518363ffffffff1660e01b8152600401610a399291906112a9565b60206040518083038186803b158015610a5157600080fd5b505afa158015610a65573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506108779190810190610e12565b600061082e6e466c657869626c6553746f7261676560881b61098c565b600080826005811115610ab557fe5b1415610ae257507f63726f7373446f6d61696e4465706f7369744761734c696d697400000000000061087a565b6001826005811115610af057fe5b1415610b1d57507f63726f7373446f6d61696e457363726f774761734c696d69740000000000000061087a565b6002826005811115610b2b57fe5b1415610b5857507f63726f7373446f6d61696e5265776172644761734c696d69740000000000000061087a565b6003826005811115610b6657fe5b1415610b9357507f63726f7373446f6d61696e5769746864726177616c4761734c696d697400000061087a565b6005826005811115610ba157fe5b1415610bce57507f63726f7373446f6d61696e52656c61794761734c696d6974000000000000000061087a565b6004826005811115610bdc57fe5b1415610c0957507f63726f7373446f6d61696e436c6f73654761734c696d6974000000000000000061087a565b60405162461bcd60e51b81526004016102fd90611333565b8035610c2c8161142c565b92915050565b8051610c2c8161142c565b60008083601f840112610c4f57600080fd5b50813567ffffffffffffffff811115610c6757600080fd5b602083019150836020820283011115610c7f57600080fd5b9250929050565b60008083601f840112610c9857600080fd5b50813567ffffffffffffffff811115610cb057600080fd5b602083019150836001820283011115610c7f57600080fd5b8051610c2c81611443565b8035610c2c8161144c565b600060208284031215610cf057600080fd5b6000610cfc8484610c21565b949350505050565b600060208284031215610d1657600080fd5b6000610cfc8484610c32565b60008060008060608587031215610d3857600080fd5b6000610d448787610c21565b945050602085013567ffffffffffffffff811115610d6157600080fd5b610d6d87828801610c86565b93509350506040610d8087828801610cd3565b91505092959194509250565b600080600080600060608688031215610da457600080fd5b853567ffffffffffffffff811115610dbb57600080fd5b610dc788828901610c3d565b9550955050602086013567ffffffffffffffff811115610de657600080fd5b610df288828901610c3d565b93509350506040610e0588828901610cd3565b9150509295509295909350565b600060208284031215610e2457600080fd5b6000610cfc8484610cc8565b6000610e3c8383610e5d565b505060200190565b6000610e3c8383610f8a565b6000610cfc848484610fa4565b610e66816113b6565b82525050565b6000610e78838561134d565b9350610e83826102d3565b8060005b85811015610eb957610e998284611356565b610ea38882610e30565b9750610eae83611343565b925050600101610e87565b509495945050505050565b6000610ecf82611349565b610ed9818561134d565b9350610ee483611343565b8060005b83811015610eb9578151610efc8882610e44565b9750610f0783611343565b925050600101610ee8565b6000610f1e838561134d565b935083602084028501610f30846102d3565b8060005b87811015610f74578484038952610f4b8284611365565b610f56868284610e50565b9550610f6184611343565b60209b909b019a93505050600101610f34565b5091979650505050505050565b610e66816113c1565b610e66816102d3565b610e66610f9f826102d3565b6102d3565b6000610fb0838561134d565b9350610fbd8385846113e6565b610fc683611422565b9093019392505050565b6000610fdb82611349565b610fe5818561134d565b9350610ff58185602086016113f2565b610fc681611422565b610e66816113db565b600061101460358361134d565b7f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7581527402063616e20616363657074206f776e65727368697605c1b602082015260400192915050565b600061106b60118361087a565b70026b4b9b9b4b7339030b2323932b9b99d1607d1b815260110192915050565b6000611098602f8361134d565b7f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726681526e37b936903a3434b99030b1ba34b7b760891b602082015260400192915050565b60006110e960198361087a565b7f5265736f6c766572206d697373696e67207461726765743a2000000000000000815260190192915050565b600061112260188361134d565b7f417267756d656e74206c656e677468206d69736d617463680000000000000000815260200192915050565b600061115b60168361134d565b75556e6b6e6f776e20676173206c696d6974207479706560501b815260200192915050565b610e66816113d2565b60006111948261105e565b91506111a08284610f93565b50602001919050565b6000611194826110dc565b60208101610c2c8284610e5d565b604081016111d08285610e5d565b6111dd6020830184610e5d565b9392505050565b604081016111f28286610e5d565b8181036020830152611205818486610fa4565b95945050505050565b6060810161121c8286610e5d565b818103602083015261122e8185610fd0565b9050610cfc6040830184611180565b6040808252810161124f818688610e6c565b90508181036020830152611264818486610f12565b9695505050505050565b602080825281016111dd8184610ec4565b60208101610c2c8284610f81565b60208101610c2c8284610f8a565b604081016111d08285610f8a565b604081016112b78285610f8a565b6111dd6020830184610f8a565b604081016112d28285610f8a565b8181036020830152610cfc8184610fd0565b60208101610c2c8284610ffe565b602080825281016111dd8184610fd0565b6020808252810161087781611007565b602080825281016108778161108b565b6020808252810161087781611115565b602080825281016108778161114e565b60200190565b5190565b90815260200190565b60006111dd6020840184610c21565b6000808335601e193685900301811261137d57600080fd5b83810160208101935035915067ffffffffffffffff82111561139e57600080fd5b368290038413156113ae57600080fd5b509250929050565b6000610877826113c6565b151590565b6001600160a01b031690565b63ffffffff1690565b6000610877826113b6565b82818337506000910152565b60005b8381101561140d5781810151838201526020016113f5565b8381111561141c576000848401525b50505050565b601f01601f191690565b611435816113b6565b811461144057600080fd5b50565b611435816102d3565b611435816113d256fea365627a7a723158203072b809bb562623eb0c9e3537caa18bf07d410de197cc3fd131e9bd94de7d0c6c6578706572696d656e74616cf564736f6c63430005100040

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

00000000000000000000000048914229dedd5a9922f44441ffccfc2cb7856ee9000000000000000000000000b61a6af69e992e1bed69b0ae0cba5143ca25d4d1

-----Decoded View---------------
Arg [0] : _owner (address): 0x48914229deDd5A9922f44441ffCCfC2Cb7856Ee9
Arg [1] : _resolver (address): 0xb61a6aF69e992e1bed69b0aE0CBa5143CA25D4D1

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000048914229dedd5a9922f44441ffccfc2cb7856ee9
Arg [1] : 000000000000000000000000b61a6af69e992e1bed69b0ae0cba5143ca25d4d1


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
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.