Contract 0x1820a4B7618BdE71Dce8cdc73aAB6C95905faD24 16

Contract Overview

Balance:
0 Ether

Token:
Txn Hash
Method
Block
From
To
Value
0x0885097e8144c57be76cb65564b54e70ad293a3fb20919205c95645b58e1d97fSet Interface Im...113371252022-09-07 5:41:5081 days 12 hrs ago0xcd5c95f5a6927103eba718b95a3e6f5e2ffab55f IN  0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether0.000286048
0x3da251536fe7171c20fabb8adc479eb401ce43a5ddceaaa3eb8b8434715ac7d7Set Interface Im...113371072022-09-07 5:37:1981 days 12 hrs ago0xcd5c95f5a6927103eba718b95a3e6f5e2ffab55f IN  0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether0.000286048
0xd42bdb6f985d47c5e3aed170945375ad518897582d6f7822afc1fe75ab05a386Set Interface Im...113370842022-09-07 5:31:3081 days 12 hrs ago0xcd5c95f5a6927103eba718b95a3e6f5e2ffab55f IN  0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether0.000445248
0xf2cbb3bbd2678dbca3bb33760679720fbffb077ec6be637b2929cad291e1163cSet Manager111656202022-08-08 8:41:11111 days 9 hrs ago0xe79cf5c269480cdd0f58509be2af1094d70e0bd8 IN  0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether0.00004945 2.00033793
0xa0bddaa8b53a4ea105d042aca75be220a7fc3f2d77fad4dd2db596ac52d99e36Set Interface Im...108565842022-06-15 13:28:46165 days 4 hrs ago0x1ba85feedcedea4bbf87c2191805167a5f18ad1d IN  0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether0.00034778 7.00000001
0x9102bd341de33480cf152cac8e03f5137ba716afdf139f3bd1af4a522f6b3860Set Interface Im...108499922022-06-14 9:56:48166 days 7 hrs ago0x70196d2c1cb073716dda3987b0ac4d036ea024b0 IN  0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether0.00004337 1.50000001
0xdad95f019271d5c3eecdf53a7bb2bd3517465a0aa5e46d0bd92b057342c11d5fSet Interface Im...108165682022-06-08 14:16:50172 days 3 hrs ago0xecda1249af9498c7486f0b9d6774d75c02d7927a IN  0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether0.0000386 1.52427454
0x7b1149b7533a35707048c671a9194f433a0631d18cc7d954a089bcc4d3afa3c8Set Interface Im...105358812022-04-20 7:00:04221 days 10 hrs ago0x3ca2ba4f766638422dbb61eed01c1687ca0e37bf IN  0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether0.00013532 2.50000001
0x1e93054a394751a486536a58da4e5f65159e6f1716a36a2bf1f417a4923934dfSet Interface Im...104552412022-04-06 4:39:24235 days 13 hrs ago0x95302ddde8a8fc1f0f128022706edb513c680746 IN  0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether0.000228228
0x7da65e8826534d95d1994b2865aa198c584c803b1eade97e430a248ed575a169Set Interface Im...104205642022-03-31 3:45:21241 days 14 hrs ago0xe365a554275b6afdb643470bd0322e3f8a03290b IN  0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether0.000038721
0x5c784d26b841cd9692b86c1524980e3dde6bd7353e8467acd64a51fff2562efdSet Interface Im...104205572022-03-31 3:43:35241 days 14 hrs ago0xe365a554275b6afdb643470bd0322e3f8a03290b IN  0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether0.000038721
0x4d34e308dc8d9d7ef9f929e63c64bf08c2bf8123858f6c330cec51c7b365d760Set Interface Im...104205492022-03-31 3:41:34241 days 14 hrs ago0xe365a554275b6afdb643470bd0322e3f8a03290b IN  0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether0.000055821.00000001
0x0486d5433dbf5abbaa6f850e76f0ee605982084256a910130fac6f680a950401Set Interface Im...104205442022-03-31 3:40:19241 days 14 hrs ago0xe365a554275b6afdb643470bd0322e3f8a03290b IN  0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether0.000038571
0x5640e4ca5c3a73da6c8eacd63cd5581aa985d9f7e5874af83b8ea3d678d2e2e9Set Interface Im...104205432022-03-31 3:40:04241 days 14 hrs ago0xe365a554275b6afdb643470bd0322e3f8a03290b IN  0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether0.000055671
0x492b55e8d29a5445537c05b408fa864a95eb974a2969111694f64540824684e7Set Interface Im...104204962022-03-31 3:28:14241 days 14 hrs ago0xe365a554275b6afdb643470bd0322e3f8a03290b IN  0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether0.000055691.00000001
0x24cc7a33372e2939067f066fbe5d1e1979882fe9c782fd59578c2dd5fcd578ccSet Interface Im...104204942022-03-31 3:27:44241 days 14 hrs ago0xe365a554275b6afdb643470bd0322e3f8a03290b IN  0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether0.000038621.00000001
0xd3c2b59b84e043515a7ccfe1f67d28152e7cc832b5698bb9c98968f72579e46dSet Interface Im...104204812022-03-31 3:24:29241 days 14 hrs ago0xe365a554275b6afdb643470bd0322e3f8a03290b IN  0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether0.000038621.00000001
0x6ca1109def75923c384fae3881afeacb8fafd67ecfc6c1b746600c8df7bbd4f4Set Interface Im...104204762022-03-31 3:23:14241 days 14 hrs ago0xe365a554275b6afdb643470bd0322e3f8a03290b IN  0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether0.000038621.00000001
0x0467e03cb6d90b7d41b6277de70d2a85440901b675d6ac9cb2b5143329b0a107Set Interface Im...104204452022-03-31 3:15:27241 days 14 hrs ago0xe365a554275b6afdb643470bd0322e3f8a03290b IN  0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether0.000055721
0x7e21c5943fb3f6b502fabd6b11006d225b0f1d822fab67652c5b2587bd370751Set Interface Im...101090452022-02-04 6:58:28296 days 10 hrs ago0x0285e2453b9aac708b9e58271d2ef6f5aea82279 IN  0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether0.00005614 1
0x14208a9c4ac37a9cf199237b10d8e7256094c31a3905085a25ec890b1ba34e11Set Interface Im...101090362022-02-04 6:56:13296 days 10 hrs ago0x0285e2453b9aac708b9e58271d2ef6f5aea82279 IN  0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether0.00003206 1.00000001
0x2a7e6c2fdd8a1a5e5ba9ab19c869eff819ad0266d47348d84569e0b863ecc197Set Interface Im...101090222022-02-04 6:52:43296 days 10 hrs ago0xc116851f0f506a4a1f304f8587ed4357f17643c5 IN  0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether0.00005614 1
0xc115af5ef1d125fdefac2507451169cbe3e05cffaebd24318bad38ec1f44d74cSet Interface Im...101088082022-02-04 5:59:12296 days 11 hrs ago0x614539062f7205049917e03ec4c86ff808f083cb IN  0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether0.00007809 2
0x2be462868fd34fbe23bdd17e328b6ba702bc5fc62c57b743740c8233cf590021Set Interface Im...100808992022-01-30 9:38:36301 days 8 hrs ago0x614539062f7205049917e03ec4c86ff808f083cb IN  0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether0.00009762 2.50000001
0xead189776ea10dde893ebdf7fab8a585e257f97e362dfe080bdfa1328f704cb7Set Interface Im...100807722022-01-30 9:06:50301 days 8 hrs ago0x614539062f7205049917e03ec4c86ff808f083cb IN  0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether0.00007575 1.94000001
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xa371212a0a129e9990597bcbdf2294e994c69fe7685ec130d6af2ee9843ce980114938402022-10-04 15:38:4154 days 2 hrs ago 0x014be6939d3113bd2415f91f7331d3c9d5ec5e9c 0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether
0x1693117ed826054c810a1a5fc8dcd30c35af63575fcd0bd29cdc6a856bb848c6114938302022-10-04 15:36:1054 days 2 hrs ago 0x014be6939d3113bd2415f91f7331d3c9d5ec5e9c 0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether
0x1693117ed826054c810a1a5fc8dcd30c35af63575fcd0bd29cdc6a856bb848c6114938302022-10-04 15:36:1054 days 2 hrs ago 0x1820a4b7618bde71dce8cdc73aab6c95905fad24 0x70110d0bc703bae5556f137b45721310e80b9ccc0 Ether
0x1693117ed826054c810a1a5fc8dcd30c35af63575fcd0bd29cdc6a856bb848c6114938302022-10-04 15:36:1054 days 2 hrs ago 0x014be6939d3113bd2415f91f7331d3c9d5ec5e9c 0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether
0xcdf511ac1a36f3f0f6beebd6eada0cae39ccaabbc6e8d4e0d696f6e0960d9284114938252022-10-04 15:34:5554 days 2 hrs ago 0x70110d0bc703bae5556f137b45721310e80b9ccc 0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether
0xad8c892497dc71f0e1c4af0e874d96aa2fb725d58f9d3f2f7a9d91c130ab0ece114937862022-10-04 15:25:1054 days 2 hrs ago 0x014be6939d3113bd2415f91f7331d3c9d5ec5e9c 0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether
0x833f6befacd05dfaf9db59a5c7e60f984babcdf6b781f94659cba6139f70f134114937832022-10-04 15:24:2554 days 2 hrs ago 0x014be6939d3113bd2415f91f7331d3c9d5ec5e9c 0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether
0x143819400283ac09f8eeafcfd7574b26021ce122ffebbe7c0389de7bc3e0c752114937722022-10-04 15:21:4054 days 2 hrs ago 0x014be6939d3113bd2415f91f7331d3c9d5ec5e9c 0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether
0xff814eaa5ae102648349efed87b5547ad6bc52bc52934dab3209f42b914776f5114937392022-10-04 15:13:2554 days 2 hrs ago 0x014be6939d3113bd2415f91f7331d3c9d5ec5e9c 0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether
0xff814eaa5ae102648349efed87b5547ad6bc52bc52934dab3209f42b914776f5114937392022-10-04 15:13:2554 days 2 hrs ago 0x014be6939d3113bd2415f91f7331d3c9d5ec5e9c 0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether
0x652a5055a9d35c2c7b2e8fa25f532aac19d8c7999ed0dc54ad0ef39331ba214c114937372022-10-04 15:12:5554 days 2 hrs ago 0x014be6939d3113bd2415f91f7331d3c9d5ec5e9c 0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether
0x86e05d679bf9ff9b0ef2bd5b0cd04077ffc7d8fc0cf093450e9c366bac7d3b31114937352022-10-04 15:12:2554 days 2 hrs ago 0x014be6939d3113bd2415f91f7331d3c9d5ec5e9c 0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether
0x86e05d679bf9ff9b0ef2bd5b0cd04077ffc7d8fc0cf093450e9c366bac7d3b31114937352022-10-04 15:12:2554 days 2 hrs ago 0x014be6939d3113bd2415f91f7331d3c9d5ec5e9c 0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether
0x86e05d679bf9ff9b0ef2bd5b0cd04077ffc7d8fc0cf093450e9c366bac7d3b31114937352022-10-04 15:12:2554 days 2 hrs ago 0x014be6939d3113bd2415f91f7331d3c9d5ec5e9c 0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether
0x86e05d679bf9ff9b0ef2bd5b0cd04077ffc7d8fc0cf093450e9c366bac7d3b31114937352022-10-04 15:12:2554 days 2 hrs ago 0x014be6939d3113bd2415f91f7331d3c9d5ec5e9c 0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether
0x86e05d679bf9ff9b0ef2bd5b0cd04077ffc7d8fc0cf093450e9c366bac7d3b31114937352022-10-04 15:12:2554 days 2 hrs ago 0x1820a4b7618bde71dce8cdc73aab6c95905fad24 0xb864859d627b07692b782113875989a9ec38a7b90 Ether
0x86e05d679bf9ff9b0ef2bd5b0cd04077ffc7d8fc0cf093450e9c366bac7d3b31114937352022-10-04 15:12:2554 days 2 hrs ago 0x014be6939d3113bd2415f91f7331d3c9d5ec5e9c 0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether
0x86e05d679bf9ff9b0ef2bd5b0cd04077ffc7d8fc0cf093450e9c366bac7d3b31114937352022-10-04 15:12:2554 days 2 hrs ago 0x014be6939d3113bd2415f91f7331d3c9d5ec5e9c 0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether
0x86e05d679bf9ff9b0ef2bd5b0cd04077ffc7d8fc0cf093450e9c366bac7d3b31114937352022-10-04 15:12:2554 days 2 hrs ago 0x014be6939d3113bd2415f91f7331d3c9d5ec5e9c 0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether
0x86e05d679bf9ff9b0ef2bd5b0cd04077ffc7d8fc0cf093450e9c366bac7d3b31114937352022-10-04 15:12:2554 days 2 hrs ago 0x014be6939d3113bd2415f91f7331d3c9d5ec5e9c 0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether
0x86e05d679bf9ff9b0ef2bd5b0cd04077ffc7d8fc0cf093450e9c366bac7d3b31114937352022-10-04 15:12:2554 days 2 hrs ago 0x014be6939d3113bd2415f91f7331d3c9d5ec5e9c 0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether
0x15fb6abd045ee5b125d12d51ed5d151bc202d8ff971584eaee1afba05b37e6b8114937242022-10-04 15:09:4054 days 2 hrs ago 0xb864859d627b07692b782113875989a9ec38a7b9 0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether
0x67a53c02a35fdde4dd27f40434645c2fb9ddb960735f99de62eb953e5ca96f4b114935632022-10-04 14:06:4154 days 3 hrs ago 0x628550b1a131233678be3b46d6183edf0f7f7089 0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether
0x67a53c02a35fdde4dd27f40434645c2fb9ddb960735f99de62eb953e5ca96f4b114935632022-10-04 14:06:4154 days 3 hrs ago 0x628550b1a131233678be3b46d6183edf0f7f7089 0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether
0xe3ca597157417d86887c1c4eb8d00855e75d15d263c9e18b8f52b45d802f2d55114935332022-10-04 13:59:0954 days 3 hrs ago 0x628550b1a131233678be3b46d6183edf0f7f7089 0x1820a4b7618bde71dce8cdc73aab6c95905fad240 Ether
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ERC1820Registry

Compiler Version
v0.5.3+commit.10d17f24

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2019-04-03
*/

/* ERC1820 Pseudo-introspection Registry Contract
 * This standard defines a universal registry smart contract where any address (contract or regular account) can
 * register which interface it supports and which smart contract is responsible for its implementation.
 *
 * Written in 2019 by Jordi Baylina and Jacques Dafflon
 *
 * To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to
 * this software to the public domain worldwide. This software is distributed without any warranty.
 *
 * You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see
 * <http://creativecommons.org/publicdomain/zero/1.0/>.
 *
 *    ███████╗██████╗  ██████╗ ██╗ █████╗ ██████╗  ██████╗
 *    ██╔════╝██╔══██╗██╔════╝███║██╔══██╗╚════██╗██╔═████╗
 *    █████╗  ██████╔╝██║     ╚██║╚█████╔╝ █████╔╝██║██╔██║
 *    ██╔══╝  ██╔══██╗██║      ██║██╔══██╗██╔═══╝ ████╔╝██║
 *    ███████╗██║  ██║╚██████╗ ██║╚█████╔╝███████╗╚██████╔╝
 *    ╚══════╝╚═╝  ╚═╝ ╚═════╝ ╚═╝ ╚════╝ ╚══════╝ ╚═════╝
 *
 *    ██████╗ ███████╗ ██████╗ ██╗███████╗████████╗██████╗ ██╗   ██╗
 *    ██╔══██╗██╔════╝██╔════╝ ██║██╔════╝╚══██╔══╝██╔══██╗╚██╗ ██╔╝
 *    ██████╔╝█████╗  ██║  ███╗██║███████╗   ██║   ██████╔╝ ╚████╔╝
 *    ██╔══██╗██╔══╝  ██║   ██║██║╚════██║   ██║   ██╔══██╗  ╚██╔╝
 *    ██║  ██║███████╗╚██████╔╝██║███████║   ██║   ██║  ██║   ██║
 *    ╚═╝  ╚═╝╚══════╝ ╚═════╝ ╚═╝╚══════╝   ╚═╝   ╚═╝  ╚═╝   ╚═╝
 *
 */
pragma solidity 0.5.3;
// IV is value needed to have a vanity address starting with '0x1820'.
// IV: 53759

/// @dev The interface a contract MUST implement if it is the implementer of
/// some (other) interface for any address other than itself.
interface ERC1820ImplementerInterface {
    /// @notice Indicates whether the contract implements the interface 'interfaceHash' for the address 'addr' or not.
    /// @param interfaceHash keccak256 hash of the name of the interface
    /// @param addr Address for which the contract will implement the interface
    /// @return ERC1820_ACCEPT_MAGIC only if the contract implements 'interfaceHash' for the address 'addr'.
    function canImplementInterfaceForAddress(bytes32 interfaceHash, address addr) external view returns(bytes32);
}


/// @title ERC1820 Pseudo-introspection Registry Contract
/// @author Jordi Baylina and Jacques Dafflon
/// @notice This contract is the official implementation of the ERC1820 Registry.
/// @notice For more details, see https://eips.ethereum.org/EIPS/eip-1820
contract ERC1820Registry {
    /// @notice ERC165 Invalid ID.
    bytes4 constant internal INVALID_ID = 0xffffffff;
    /// @notice Method ID for the ERC165 supportsInterface method (= `bytes4(keccak256('supportsInterface(bytes4)'))`).
    bytes4 constant internal ERC165ID = 0x01ffc9a7;
    /// @notice Magic value which is returned if a contract implements an interface on behalf of some other address.
    bytes32 constant internal ERC1820_ACCEPT_MAGIC = keccak256(abi.encodePacked("ERC1820_ACCEPT_MAGIC"));

    /// @notice mapping from addresses and interface hashes to their implementers.
    mapping(address => mapping(bytes32 => address)) internal interfaces;
    /// @notice mapping from addresses to their manager.
    mapping(address => address) internal managers;
    /// @notice flag for each address and erc165 interface to indicate if it is cached.
    mapping(address => mapping(bytes4 => bool)) internal erc165Cached;

    /// @notice Indicates a contract is the 'implementer' of 'interfaceHash' for 'addr'.
    event InterfaceImplementerSet(address indexed addr, bytes32 indexed interfaceHash, address indexed implementer);
    /// @notice Indicates 'newManager' is the address of the new manager for 'addr'.
    event ManagerChanged(address indexed addr, address indexed newManager);

    /// @notice Query if an address implements an interface and through which contract.
    /// @param _addr Address being queried for the implementer of an interface.
    /// (If '_addr' is the zero address then 'msg.sender' is assumed.)
    /// @param _interfaceHash Keccak256 hash of the name of the interface as a string.
    /// E.g., 'web3.utils.keccak256("ERC777TokensRecipient")' for the 'ERC777TokensRecipient' interface.
    /// @return The address of the contract which implements the interface '_interfaceHash' for '_addr'
    /// or '0' if '_addr' did not register an implementer for this interface.
    function getInterfaceImplementer(address _addr, bytes32 _interfaceHash) external view returns (address) {
        address addr = _addr == address(0) ? msg.sender : _addr;
        if (isERC165Interface(_interfaceHash)) {
            bytes4 erc165InterfaceHash = bytes4(_interfaceHash);
            return implementsERC165Interface(addr, erc165InterfaceHash) ? addr : address(0);
        }
        return interfaces[addr][_interfaceHash];
    }

    /// @notice Sets the contract which implements a specific interface for an address.
    /// Only the manager defined for that address can set it.
    /// (Each address is the manager for itself until it sets a new manager.)
    /// @param _addr Address for which to set the interface.
    /// (If '_addr' is the zero address then 'msg.sender' is assumed.)
    /// @param _interfaceHash Keccak256 hash of the name of the interface as a string.
    /// E.g., 'web3.utils.keccak256("ERC777TokensRecipient")' for the 'ERC777TokensRecipient' interface.
    /// @param _implementer Contract address implementing '_interfaceHash' for '_addr'.
    function setInterfaceImplementer(address _addr, bytes32 _interfaceHash, address _implementer) external {
        address addr = _addr == address(0) ? msg.sender : _addr;
        require(getManager(addr) == msg.sender, "Not the manager");

        require(!isERC165Interface(_interfaceHash), "Must not be an ERC165 hash");
        if (_implementer != address(0) && _implementer != msg.sender) {
            require(
                ERC1820ImplementerInterface(_implementer)
                    .canImplementInterfaceForAddress(_interfaceHash, addr) == ERC1820_ACCEPT_MAGIC,
                "Does not implement the interface"
            );
        }
        interfaces[addr][_interfaceHash] = _implementer;
        emit InterfaceImplementerSet(addr, _interfaceHash, _implementer);
    }

    /// @notice Sets '_newManager' as manager for '_addr'.
    /// The new manager will be able to call 'setInterfaceImplementer' for '_addr'.
    /// @param _addr Address for which to set the new manager.
    /// @param _newManager Address of the new manager for 'addr'. (Pass '0x0' to reset the manager to '_addr'.)
    function setManager(address _addr, address _newManager) external {
        require(getManager(_addr) == msg.sender, "Not the manager");
        managers[_addr] = _newManager == _addr ? address(0) : _newManager;
        emit ManagerChanged(_addr, _newManager);
    }

    /// @notice Get the manager of an address.
    /// @param _addr Address for which to return the manager.
    /// @return Address of the manager for a given address.
    function getManager(address _addr) public view returns(address) {
        // By default the manager of an address is the same address
        if (managers[_addr] == address(0)) {
            return _addr;
        } else {
            return managers[_addr];
        }
    }

    /// @notice Compute the keccak256 hash of an interface given its name.
    /// @param _interfaceName Name of the interface.
    /// @return The keccak256 hash of an interface name.
    function interfaceHash(string calldata _interfaceName) external pure returns(bytes32) {
        return keccak256(abi.encodePacked(_interfaceName));
    }

    /* --- ERC165 Related Functions --- */
    /* --- Developed in collaboration with William Entriken. --- */

    /// @notice Updates the cache with whether the contract implements an ERC165 interface or not.
    /// @param _contract Address of the contract for which to update the cache.
    /// @param _interfaceId ERC165 interface for which to update the cache.
    function updateERC165Cache(address _contract, bytes4 _interfaceId) external {
        interfaces[_contract][_interfaceId] = implementsERC165InterfaceNoCache(
            _contract, _interfaceId) ? _contract : address(0);
        erc165Cached[_contract][_interfaceId] = true;
    }

    /// @notice Checks whether a contract implements an ERC165 interface or not.
    //  If the result is not cached a direct lookup on the contract address is performed.
    //  If the result is not cached or the cached value is out-of-date, the cache MUST be updated manually by calling
    //  'updateERC165Cache' with the contract address.
    /// @param _contract Address of the contract to check.
    /// @param _interfaceId ERC165 interface to check.
    /// @return True if '_contract' implements '_interfaceId', false otherwise.
    function implementsERC165Interface(address _contract, bytes4 _interfaceId) public view returns (bool) {
        if (!erc165Cached[_contract][_interfaceId]) {
            return implementsERC165InterfaceNoCache(_contract, _interfaceId);
        }
        return interfaces[_contract][_interfaceId] == _contract;
    }

    /// @notice Checks whether a contract implements an ERC165 interface or not without using nor updating the cache.
    /// @param _contract Address of the contract to check.
    /// @param _interfaceId ERC165 interface to check.
    /// @return True if '_contract' implements '_interfaceId', false otherwise.
    function implementsERC165InterfaceNoCache(address _contract, bytes4 _interfaceId) public view returns (bool) {
        uint256 success;
        uint256 result;

        (success, result) = noThrowCall(_contract, ERC165ID);
        if (success == 0 || result == 0) {
            return false;
        }

        (success, result) = noThrowCall(_contract, INVALID_ID);
        if (success == 0 || result != 0) {
            return false;
        }

        (success, result) = noThrowCall(_contract, _interfaceId);
        if (success == 1 && result == 1) {
            return true;
        }
        return false;
    }

    /// @notice Checks whether the hash is a ERC165 interface (ending with 28 zeroes) or not.
    /// @param _interfaceHash The hash to check.
    /// @return True if '_interfaceHash' is an ERC165 interface (ending with 28 zeroes), false otherwise.
    function isERC165Interface(bytes32 _interfaceHash) internal pure returns (bool) {
        return _interfaceHash & 0x00000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF == 0;
    }

    /// @dev Make a call on a contract without throwing if the function does not exist.
    function noThrowCall(address _contract, bytes4 _interfaceId)
        internal view returns (uint256 success, uint256 result)
    {
        bytes4 erc165ID = ERC165ID;

        assembly {
            let x := mload(0x40)               // Find empty storage location using "free memory pointer"
            mstore(x, erc165ID)                // Place signature at beginning of empty storage
            mstore(add(x, 0x04), _interfaceId) // Place first argument directly next to signature

            success := staticcall(
                30000,                         // 30k gas
                _contract,                     // To addr
                x,                             // Inputs are stored at location x
                0x24,                          // Inputs are 36 (4 + 32) bytes long
                x,                             // Store output over input (saves space)
                0x20                           // Outputs are 32 bytes long
            )

            result := mload(x)                 // Load the result
        }
    }
}

Contract ABI

[{"constant":false,"inputs":[{"name":"_addr","type":"address"},{"name":"_interfaceHash","type":"bytes32"},{"name":"_implementer","type":"address"}],"name":"setInterfaceImplementer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_addr","type":"address"}],"name":"getManager","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_addr","type":"address"},{"name":"_newManager","type":"address"}],"name":"setManager","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_interfaceName","type":"string"}],"name":"interfaceHash","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"name":"_contract","type":"address"},{"name":"_interfaceId","type":"bytes4"}],"name":"updateERC165Cache","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_addr","type":"address"},{"name":"_interfaceHash","type":"bytes32"}],"name":"getInterfaceImplementer","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_contract","type":"address"},{"name":"_interfaceId","type":"bytes4"}],"name":"implementsERC165InterfaceNoCache","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_contract","type":"address"},{"name":"_interfaceId","type":"bytes4"}],"name":"implementsERC165Interface","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"addr","type":"address"},{"indexed":true,"name":"interfaceHash","type":"bytes32"},{"indexed":true,"name":"implementer","type":"address"}],"name":"InterfaceImplementerSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"addr","type":"address"},{"indexed":true,"name":"newManager","type":"address"}],"name":"ManagerChanged","type":"event"}]

608060405234801561001057600080fd5b506109c5806100206000396000f3fe608060405234801561001057600080fd5b50600436106100a5576000357c010000000000000000000000000000000000000000000000000000000090048063a41e7d5111610078578063a41e7d51146101d4578063aabbb8ca1461020a578063b705676514610236578063f712f3e814610280576100a5565b806329965a1d146100aa5780633d584063146100e25780635df8122f1461012457806365ba36c114610152575b600080fd5b6100e0600480360360608110156100c057600080fd5b50600160a060020a038135811691602081013591604090910135166102b6565b005b610108600480360360208110156100f857600080fd5b5035600160a060020a0316610570565b60408051600160a060020a039092168252519081900360200190f35b6100e06004803603604081101561013a57600080fd5b50600160a060020a03813581169160200135166105bc565b6101c26004803603602081101561016857600080fd5b81019060208101813564010000000081111561018357600080fd5b82018360208201111561019557600080fd5b803590602001918460018302840111640100000000831117156101b757600080fd5b5090925090506106b3565b60408051918252519081900360200190f35b6100e0600480360360408110156101ea57600080fd5b508035600160a060020a03169060200135600160e060020a0319166106ee565b6101086004803603604081101561022057600080fd5b50600160a060020a038135169060200135610778565b61026c6004803603604081101561024c57600080fd5b508035600160a060020a03169060200135600160e060020a0319166107ef565b604080519115158252519081900360200190f35b61026c6004803603604081101561029657600080fd5b508035600160a060020a03169060200135600160e060020a0319166108aa565b6000600160a060020a038416156102cd57836102cf565b335b9050336102db82610570565b600160a060020a031614610339576040805160e560020a62461bcd02815260206004820152600f60248201527f4e6f7420746865206d616e616765720000000000000000000000000000000000604482015290519081900360640190fd5b6103428361092a565b15610397576040805160e560020a62461bcd02815260206004820152601a60248201527f4d757374206e6f7420626520616e204552433136352068617368000000000000604482015290519081900360640190fd5b600160a060020a038216158015906103b85750600160a060020a0382163314155b156104ff5760405160200180807f455243313832305f4143434550545f4d4147494300000000000000000000000081525060140190506040516020818303038152906040528051906020012082600160a060020a031663249cb3fa85846040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083815260200182600160a060020a0316600160a060020a031681526020019250505060206040518083038186803b15801561047e57600080fd5b505afa158015610492573d6000803e3d6000fd5b505050506040513d60208110156104a857600080fd5b5051146104ff576040805160e560020a62461bcd02815260206004820181905260248201527f446f6573206e6f7420696d706c656d656e742074686520696e74657266616365604482015290519081900360640190fd5b600160a060020a03818116600081815260208181526040808320888452909152808220805473ffffffffffffffffffffffffffffffffffffffff19169487169485179055518692917f93baa6efbd2244243bfee6ce4cfdd1d04fc4c0e9a786abd3a41313bd352db15391a450505050565b600160a060020a03818116600090815260016020526040812054909116151561059a5750806105b7565b50600160a060020a03808216600090815260016020526040902054165b919050565b336105c683610570565b600160a060020a031614610624576040805160e560020a62461bcd02815260206004820152600f60248201527f4e6f7420746865206d616e616765720000000000000000000000000000000000604482015290519081900360640190fd5b81600160a060020a031681600160a060020a0316146106435780610646565b60005b600160a060020a03838116600081815260016020526040808220805473ffffffffffffffffffffffffffffffffffffffff19169585169590951790945592519184169290917f605c2dbf762e5f7d60a546d42e7205dcb1b011ebc62a61736a57c9089d3a43509190a35050565b600082826040516020018083838082843780830192505050925050506040516020818303038152906040528051906020012090505b92915050565b6106f882826107ef565b610703576000610705565b815b600160a060020a03928316600081815260208181526040808320600160e060020a031996909616808452958252808320805473ffffffffffffffffffffffffffffffffffffffff19169590971694909417909555908152600284528181209281529190925220805460ff19166001179055565b600080600160a060020a038416156107905783610792565b335b905061079d8361092a565b156107c357826107ad82826108aa565b6107b85760006107ba565b815b925050506106e8565b600160a060020a0390811660009081526020818152604080832086845290915290205416905092915050565b6000808061081d857f01ffc9a70000000000000000000000000000000000000000000000000000000061094c565b909250905081158061082d575080155b1561083d576000925050506106e8565b61084f85600160e060020a031961094c565b909250905081158061086057508015155b15610870576000925050506106e8565b61087a858561094c565b909250905060018214801561088f5750806001145b1561089f576001925050506106e8565b506000949350505050565b600160a060020a0382166000908152600260209081526040808320600160e060020a03198516845290915281205460ff1615156108f2576108eb83836107ef565b90506106e8565b50600160a060020a03808316600081815260208181526040808320600160e060020a0319871684529091529020549091161492915050565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff161590565b6040517f01ffc9a7000000000000000000000000000000000000000000000000000000008082526004820183905260009182919060208160248189617530fa90519096909550935050505056fea165627a7a72305820377f4a2d4301ede9949f163f319021a6e9c687c292a5e2b2c4734c126b524e6c0029

Swarm Source

bzzr://377f4a2d4301ede9949f163f319021a6e9c687c292a5e2b2c4734c126b524e6c
Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading

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.