Contract 0x84f87E3636Aa9cC1080c07E6C61aDfDCc23c0db6

Contract Overview

Balance:
0 Ether
Txn Hash Method
Block
From
To
Value
0x16ec96692d73d55c096b648579038282355b6fe058b4053a79cca1276e1c307aRebuild Caches248106382021-05-13 8:59:205 days 11 hrs ago0x73570075092502472e4b61a7058df1a4a1db12f2 IN  0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether0.1094718200
0xa77e77e0cbd9c617db4c8ad1d6f5473c077ca5f5c0ff9196947d0ca2bbf57affImport Addresses248106282021-05-13 8:58:205 days 11 hrs ago0x73570075092502472e4b61a7058df1a4a1db12f2 IN  0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether0.0063546200
0x8bdb8a6761c388e0c0399d87c06a99570efa296033c8f43569a9414bf9735e1dRebuild Caches248101212021-05-13 8:07:565 days 12 hrs ago0x73570075092502472e4b61a7058df1a4a1db12f2 IN  0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether0.1094718200
0x17c125266d568b9b41fe405a582e8879be9e4fd8dd479064be08d23709ae44cfImport Addresses248101152021-05-13 8:07:205 days 12 hrs ago0x73570075092502472e4b61a7058df1a4a1db12f2 IN  0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether0.0063546200
0xc2ff6cdb370afc296267809b613da4960cde31980db26d7776c1c731fb252da7Rebuild Caches248100252021-05-13 7:58:205 days 12 hrs ago0x73570075092502472e4b61a7058df1a4a1db12f2 IN  0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether0.1094718200
0x467e5d86c9a755d43f4822a020ea3c58e441bb368a68420baa4537b1b33ccf60Import Addresses248100182021-05-13 7:57:445 days 12 hrs ago0x73570075092502472e4b61a7058df1a4a1db12f2 IN  0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether0.0063546200
0x17e3969182b141fa4b6733a529bf8b744254d4fdeccb0734b248fc830c818145Rebuild Caches248081542021-05-13 4:54:085 days 15 hrs ago0x73570075092502472e4b61a7058df1a4a1db12f2 IN  0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether0.2158368200
0x34482c777fca79c47cfb40f63a52e0963c60bdbe67b40ee2f45506faa36e856dRebuild Caches248081532021-05-13 4:54:005 days 15 hrs ago0x73570075092502472e4b61a7058df1a4a1db12f2 IN  0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether0.1696968200
0x0fbfac426cc9c6e248e602b8731fd8dd842296dafa4338497a44d23a86bdbd1cRebuild Caches248081522021-05-13 4:53:565 days 15 hrs ago0x73570075092502472e4b61a7058df1a4a1db12f2 IN  0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether0.4395986200
0xdb4c01a07a8d98bd95caa15bf87f8eddc65b49e4f29cef1d86893e2515fc733bImport Addresses248081422021-05-13 4:52:565 days 15 hrs ago0x73570075092502472e4b61a7058df1a4a1db12f2 IN  0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether0.0165202200
0x1aab9c6e10f60e5091ed166fd27aa7398ff7bdae589e29e936cdf3ed7385e0d0Rebuild Caches248080262021-05-13 4:41:325 days 15 hrs ago0x73570075092502472e4b61a7058df1a4a1db12f2 IN  0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether0.2158344200
0xed1f96bf00f7c2baaaf4421fe21c6f9f8bd04d6aa0fb50a4979b3e92a3f665f6Rebuild Caches248080252021-05-13 4:41:245 days 15 hrs ago0x73570075092502472e4b61a7058df1a4a1db12f2 IN  0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether0.1696968200
0x6213dd4e512a6f1f5aa003d89ab4410e0edc0c0460021f901e80854ce085b120Rebuild Caches248080242021-05-13 4:41:205 days 15 hrs ago0x73570075092502472e4b61a7058df1a4a1db12f2 IN  0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether0.4395986200
0xacd233467d84a165506b9dfcc07c9612c9401face04858ece9003ece7899ef67Import Addresses248080152021-05-13 4:40:245 days 15 hrs ago0x73570075092502472e4b61a7058df1a4a1db12f2 IN  0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether0.0233578200
0xa99e8ed313bce59b66b141ba8789b77240b32d9641a714041747d745b67052d0Import Addresses246948112021-05-06 16:24:2412 days 4 hrs ago0x73570075092502472e4b61a7058df1a4a1db12f2 IN  0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether0.0000395211
0xb340e53c6c33c3e537a4593402f1ef8379eccc2469a07e3ae8b82e8a137ec14bRebuild Caches246585372021-05-04 22:40:4013 days 21 hrs ago0x73570075092502472e4b61a7058df1a4a1db12f2 IN  0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether0.0033378110
0xee8c684ff417cc2f4f7c8295dc053cb2a38ec28e118c5be942939fd19df48b20Import Addresses246585152021-05-04 22:39:1213 days 21 hrs ago0x73570075092502472e4b61a7058df1a4a1db12f2 IN  0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether0.0005461710
0x1076e5cc38083b391af77998fc50e974c5b166fb6a6a906cf45e2bc3c3a53890Rebuild Caches243829902021-04-21 23:34:0826 days 20 hrs ago0x73570075092502472e4b61a7058df1a4a1db12f2 IN  0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether0.0014005882
0xa9d8fab907e714949a6d275a79a5148c4e3fb4d6006dcd9c48f0a65d1df2f6f3Rebuild Caches243829872021-04-21 23:33:5626 days 20 hrs ago0x73570075092502472e4b61a7058df1a4a1db12f2 IN  0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether0.0021023442
0xff505f90042f064ddcb37bf4fdc4273da8161ea1564f896ec8a3b9608ba83e30Rebuild Caches243829862021-04-21 23:33:5226 days 20 hrs ago0x73570075092502472e4b61a7058df1a4a1db12f2 IN  0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether0.003091162
0xf69e1f550b6e14e57cf13f4da087a5ecefcf941bdb1ec6db0a955d866d296b06Import Addresses243829752021-04-21 23:33:0826 days 20 hrs ago0x73570075092502472e4b61a7058df1a4a1db12f2 IN  0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether0.0001088742
0x68948303d0f936f919151a484d69d342450524afa31c469a998edf4445863cb2Accept Ownership243386072021-04-19 21:36:1228 days 22 hrs ago0x73570075092502472e4b61a7058df1a4a1db12f2 IN  0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether0.0000217181
0x3e17e68c0fd3d99a9561aeb0b2f09fd570203041d8f882758a323e531384da03Nominate New Own...243376742021-04-19 20:33:0428 days 23 hrs ago0xb64ff7a4a33acdf48d97dab0d764afd0f6176882 IN  0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether0.0000444141
0x07a037841bba49b3f0162f60b221dde0d16067934bd0af0986af43ca46d77b8eImport Addresses242051792021-04-09 17:42:3639 days 2 hrs ago0xb64ff7a4a33acdf48d97dab0d764afd0f6176882 IN  0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether0.0003532110
0xe281d8668cd42415663894d29ede21559fefe3d44712b8b7ccae379fae619cecRebuild Caches240317642021-03-23 19:49:0856 days 35 mins ago0xb64ff7a4a33acdf48d97dab0d764afd0f6176882 IN  0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether0.0001392921
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x6e9b5f638708ae4ccc35b5b02aa3f5781884f9bede571f8cb924742b7c787e64249191182021-05-18 19:46:1238 mins ago 0x242a3df52c375bee81b1c668741d7c63af68fdd2 0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether
0x6e9b5f638708ae4ccc35b5b02aa3f5781884f9bede571f8cb924742b7c787e64249191182021-05-18 19:46:1238 mins ago 0x242a3df52c375bee81b1c668741d7c63af68fdd2 0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether
0x6e9b5f638708ae4ccc35b5b02aa3f5781884f9bede571f8cb924742b7c787e64249191182021-05-18 19:46:1238 mins ago 0x242a3df52c375bee81b1c668741d7c63af68fdd2 0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether
0x6e9b5f638708ae4ccc35b5b02aa3f5781884f9bede571f8cb924742b7c787e64249191182021-05-18 19:46:1238 mins ago 0x242a3df52c375bee81b1c668741d7c63af68fdd2 0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether
0xfb98d00be9878a74361d2f19f69fbcee456258c49eda7656c56267de366082fa249172522021-05-18 17:33:562 hrs 50 mins ago 0x711d884c7daeb4d1f957ee76c856868eedbb603f 0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether
0x4c067c8ad83147189c44fb60e40c493437f90615aa619c021e5826c619cf1db8249167832021-05-18 17:02:243 hrs 22 mins ago 0x242a3df52c375bee81b1c668741d7c63af68fdd2 0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether
0x4c067c8ad83147189c44fb60e40c493437f90615aa619c021e5826c619cf1db8249167832021-05-18 17:02:243 hrs 22 mins ago 0x242a3df52c375bee81b1c668741d7c63af68fdd2 0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether
0x4c067c8ad83147189c44fb60e40c493437f90615aa619c021e5826c619cf1db8249167832021-05-18 17:02:243 hrs 22 mins ago 0x242a3df52c375bee81b1c668741d7c63af68fdd2 0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether
0x4c067c8ad83147189c44fb60e40c493437f90615aa619c021e5826c619cf1db8249167832021-05-18 17:02:243 hrs 22 mins ago 0x242a3df52c375bee81b1c668741d7c63af68fdd2 0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether
0x4c067c8ad83147189c44fb60e40c493437f90615aa619c021e5826c619cf1db8249167832021-05-18 17:02:243 hrs 22 mins ago 0x242a3df52c375bee81b1c668741d7c63af68fdd2 0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether
0x4c067c8ad83147189c44fb60e40c493437f90615aa619c021e5826c619cf1db8249167832021-05-18 17:02:243 hrs 22 mins ago 0x242a3df52c375bee81b1c668741d7c63af68fdd2 0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether
0x4c067c8ad83147189c44fb60e40c493437f90615aa619c021e5826c619cf1db8249167832021-05-18 17:02:243 hrs 22 mins ago 0x242a3df52c375bee81b1c668741d7c63af68fdd2 0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether
0x4c067c8ad83147189c44fb60e40c493437f90615aa619c021e5826c619cf1db8249167832021-05-18 17:02:243 hrs 22 mins ago 0x242a3df52c375bee81b1c668741d7c63af68fdd2 0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether
0x4c067c8ad83147189c44fb60e40c493437f90615aa619c021e5826c619cf1db8249167832021-05-18 17:02:243 hrs 22 mins ago 0x242a3df52c375bee81b1c668741d7c63af68fdd2 0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether
0x4c067c8ad83147189c44fb60e40c493437f90615aa619c021e5826c619cf1db8249167832021-05-18 17:02:243 hrs 22 mins ago 0x242a3df52c375bee81b1c668741d7c63af68fdd2 0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether
0x4c067c8ad83147189c44fb60e40c493437f90615aa619c021e5826c619cf1db8249167832021-05-18 17:02:243 hrs 22 mins ago 0x242a3df52c375bee81b1c668741d7c63af68fdd2 0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether
0x4c067c8ad83147189c44fb60e40c493437f90615aa619c021e5826c619cf1db8249167832021-05-18 17:02:243 hrs 22 mins ago 0x242a3df52c375bee81b1c668741d7c63af68fdd2 0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether
0x4c067c8ad83147189c44fb60e40c493437f90615aa619c021e5826c619cf1db8249167832021-05-18 17:02:243 hrs 22 mins ago 0x242a3df52c375bee81b1c668741d7c63af68fdd2 0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether
0x4c067c8ad83147189c44fb60e40c493437f90615aa619c021e5826c619cf1db8249167832021-05-18 17:02:243 hrs 22 mins ago 0x242a3df52c375bee81b1c668741d7c63af68fdd2 0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether
0x4c067c8ad83147189c44fb60e40c493437f90615aa619c021e5826c619cf1db8249167832021-05-18 17:02:243 hrs 22 mins ago 0x242a3df52c375bee81b1c668741d7c63af68fdd2 0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether
0x4c067c8ad83147189c44fb60e40c493437f90615aa619c021e5826c619cf1db8249167832021-05-18 17:02:243 hrs 22 mins ago 0x242a3df52c375bee81b1c668741d7c63af68fdd2 0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether
0x48aa62d264caece742d6c16a136a1ba623ff77f8b86c78f214baf1ffdb303025249069132021-05-18 5:56:1214 hrs 28 mins ago 0x242a3df52c375bee81b1c668741d7c63af68fdd2 0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether
0xc07e972c2f61182fc555d946ebb238ecbf3977c25cf604cd660ffd1a64ea8816249068432021-05-18 5:51:3214 hrs 32 mins ago 0x242a3df52c375bee81b1c668741d7c63af68fdd2 0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether
0xc07e972c2f61182fc555d946ebb238ecbf3977c25cf604cd660ffd1a64ea8816249068432021-05-18 5:51:3214 hrs 32 mins ago 0x242a3df52c375bee81b1c668741d7c63af68fdd2 0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether
0xc07e972c2f61182fc555d946ebb238ecbf3977c25cf604cd660ffd1a64ea8816249068432021-05-18 5:51:3214 hrs 32 mins ago 0x242a3df52c375bee81b1c668741d7c63af68fdd2 0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db60 Ether
[ Download CSV Export 
Loading

Contract Source Code Verified (Similar Match)
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0x462c0f53817E7D4c339512d06218F873780c2e66

Contract Name:
AddressResolver

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 2020-12-15
*/

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

* Synthetix: AddressResolver.sol
*
* Latest source (may be newer): https://github.com/Synthetixio/synthetix/blob/master/contracts/AddressResolver.sol
* Docs: https://docs.synthetix.io/contracts/AddressResolver
*
* Contract Dependencies: 
*	- IAddressResolver
*	- Owned
* Libraries: (none)
*
* MIT License
* ===========
*
* Copyright (c) 2020 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 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 excludeEtherCollateral) external view returns (uint);

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

    // Restricted: used internally to Synthetix
    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 liquidateDelinquentAccount(
        address account,
        uint susdAmount,
        address liquidator
    ) external returns (uint totalRedeemed, uint amountToLiquidate);
}


// solhint-disable payable-fallback

// https://docs.synthetix.io/contracts/source/contracts/readproxy
contract ReadProxy is Owned {
    address public target;

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

    function setTarget(address _target) external onlyOwner {
        target = _target;
        emit TargetUpdated(target);
    }

    function() external {
        // The basics of a proxy read call
        // Note that msg.sender in the underlying will always be the address of this contract.
        assembly {
            calldatacopy(0, 0, calldatasize)

            // Use of staticcall - this will revert if the underlying function mutates state
            let result := staticcall(gas, sload(target_slot), 0, calldatasize, 0, 0)
            returndatacopy(0, 0, returndatasize)

            if iszero(result) {
                revert(0, returndatasize)
            }
            return(0, returndatasize)
        }
    }

    event TargetUpdated(address newTarget);
}


// Inheritance


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


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

Contract ABI

[{"inputs":[{"internalType":"address","name":"_owner","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":"AddressImported","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"},{"constant":false,"inputs":[],"name":"acceptOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32[]","name":"names","type":"bytes32[]"},{"internalType":"address[]","name":"destinations","type":"address[]"}],"name":"areAddressesImported","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"name","type":"bytes32"}],"name":"getAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"}],"name":"getSynth","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32[]","name":"names","type":"bytes32[]"},{"internalType":"address[]","name":"destinations","type":"address[]"}],"name":"importAddresses","outputs":[],"payable":false,"stateMutability":"nonpayable","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":[{"internalType":"contract MixinResolver[]","name":"destinations","type":"address[]"}],"name":"rebuildCaches","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"repository","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"name","type":"bytes32"},{"internalType":"string","name":"reason","type":"string"}],"name":"requireAndGetAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b50604051610ab9380380610ab98339818101604052602081101561003357600080fd5b5051806001600160a01b038116610091576040805162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f74206265203000000000000000604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b038316908117825560408051928352602083019190915280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a150506109bf806100fa6000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c8063766f781511610071578063766f78151461015157806379ba5097146101bf5780638da5cb5b146101c75780639f42102f146101cf578063ab0b8f77146102a1578063dacb2d011461035f576100a9565b80631627540c146100ae578063187f7935146100d657806321f8a7211461010f578063514560611461012c57806353a47bb714610149575b600080fd5b6100d4600480360360208110156100c457600080fd5b50356001600160a01b03166103d4565b005b6100f3600480360360208110156100ec57600080fd5b5035610430565b604080516001600160a01b039092168252519081900360200190f35b6100f36004803603602081101561012557600080fd5b503561044b565b6100f36004803603602081101561014257600080fd5b5035610466565b6100f361056e565b6100d46004803603602081101561016757600080fd5b810190602081018135600160201b81111561018157600080fd5b82018360208201111561019357600080fd5b803590602001918460208302840111600160201b831117156101b457600080fd5b50909250905061057d565b6100d4610607565b6100f36106c3565b61028d600480360360408110156101e557600080fd5b810190602081018135600160201b8111156101ff57600080fd5b82018360208201111561021157600080fd5b803590602001918460208302840111600160201b8311171561023257600080fd5b919390929091602081019035600160201b81111561024f57600080fd5b82018360208201111561026157600080fd5b803590602001918460208302840111600160201b8311171561028257600080fd5b5090925090506106d2565b604080519115158252519081900360200190f35b6100d4600480360360408110156102b757600080fd5b810190602081018135600160201b8111156102d157600080fd5b8201836020820111156102e357600080fd5b803590602001918460208302840111600160201b8311171561030457600080fd5b919390929091602081019035600160201b81111561032157600080fd5b82018360208201111561033357600080fd5b803590602001918460208302840111600160201b8311171561035457600080fd5b50909250905061075b565b6100f36004803603604081101561037557600080fd5b81359190810190604081016020820135600160201b81111561039657600080fd5b8201836020820111156103a857600080fd5b803590602001918460018302840111600160201b831117156103c957600080fd5b509092509050610867565b6103dc6108db565b600180546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b6002602052600090815260409020546001600160a01b031681565b6000908152600260205260409020546001600160a01b031690565b6524b9b9bab2b960d11b600090815260026020527f0651498423135bdecab48e2d306f14d560a72d49179b71410fd95b5d25ce349a546001600160a01b0316806104f7576040805162461bcd60e51b815260206004820152601a60248201527f43616e6e6f742066696e64204973737565722061646472657373000000000000604482015290519081900360640190fd5b806001600160a01b03166332608039846040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561053b57600080fd5b505afa15801561054f573d6000803e3d6000fd5b505050506040513d602081101561056557600080fd5b50519392505050565b6001546001600160a01b031681565b60005b818110156106025782828281811061059457fe5b905060200201356001600160a01b03166001600160a01b031663741853606040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156105de57600080fd5b505af11580156105f2573d6000803e3d6000fd5b5050600190920191506105809050565b505050565b6001546001600160a01b031633146106505760405162461bcd60e51b81526004018080602001828103825260358152602001806109276035913960400191505060405180910390fd5b600054600154604080516001600160a01b03938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a160018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000546001600160a01b031681565b6000805b8481101561074d578383828181106106ea57fe5b905060200201356001600160a01b03166001600160a01b03166002600088888581811061071357fe5b60209081029290920135835250810191909152604001600020546001600160a01b031614610745576000915050610753565b6001016106d6565b50600190505b949350505050565b6107636108db565b8281146107b7576040805162461bcd60e51b815260206004820152601860248201527f496e707574206c656e67746873206d757374206d617463680000000000000000604482015290519081900360640190fd5b60005b838110156108605760008585838181106107d057fe5b90506020020135905060008484848181106107e757fe5b600085815260026020908152604091829020805493820295909501356001600160a01b03166001600160a01b03199093168317909455805186815293840182905280519194507fefe884cc7f82a6cf3cf68f64221519dcf96b5cae9048e1bb008ee32cd05aaa9193829003019150a150506001016107ba565b5050505050565b6000838152600260205260408120546001600160a01b03168383826108d05760405162461bcd60e51b815260206004820190815260248201839052908190604401848480828437600083820152604051601f909101601f19169092018290039550909350505050fd5b509095945050505050565b6000546001600160a01b031633146109245760405162461bcd60e51b815260040180806020018281038252602f81526020018061095c602f913960400191505060405180910390fd5b56fe596f75206d757374206265206e6f6d696e61746564206265666f726520796f752063616e20616363657074206f776e6572736869704f6e6c792074686520636f6e7472616374206f776e6572206d617920706572666f726d207468697320616374696f6ea265627a7a723158200e994a3fbd50641129fcc3fbe8acde6d9bd970de1ca37a528a032c6a9b771d0e64736f6c63430005100032000000000000000000000000b64ff7a4a33acdf48d97dab0d764afd0f6176882

Library Used

SafeDecimalMath : 0xb063db0ef34b5844dcb0c6bc97a3c96de1b2f243

Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading