ETH Price: $2,458.17 (-1.19%)

Contract

0x6fe80ea9F97eE1BA340Ac43727F4d76E78493Cb0
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Register Module107356202020-08-26 10:52:401530 days ago1598439160IN
0x6fe80ea9...E78493Cb0
0 ETH0.0063289680
Register Module107350932020-08-26 8:52:461530 days ago1598431966IN
0x6fe80ea9...E78493Cb0
0 ETH0.0063289680
Register Module107350632020-08-26 8:45:191530 days ago1598431519IN
0x6fe80ea9...E78493Cb0
0 ETH0.0063289680
Register Module103276112020-06-24 9:16:341593 days ago1592990194IN
0x6fe80ea9...E78493Cb0
0 ETH0.0034018143
Deregister Modul...103267142020-06-24 6:01:321593 days ago1592978492IN
0x6fe80ea9...E78493Cb0
0 ETH0.0011224334.28125123
Register Module103266342020-06-24 5:46:231593 days ago1592977583IN
0x6fe80ea9...E78493Cb0
0 ETH0.0034018143
Register Module103266282020-06-24 5:45:081593 days ago1592977508IN
0x6fe80ea9...E78493Cb0
0 ETH0.0032435941
Register Module102827122020-06-17 10:32:381600 days ago1592389958IN
0x6fe80ea9...E78493Cb0
0 ETH0.0026106933
Register Module102824952020-06-17 9:44:141600 days ago1592387054IN
0x6fe80ea9...E78493Cb0
0 ETH0.0026106933
Register Module102821762020-06-17 8:33:531600 days ago1592382833IN
0x6fe80ea9...E78493Cb0
0 ETH0.0027689235
Register Module102753662020-06-16 7:04:221601 days ago1592291062IN
0x6fe80ea9...E78493Cb0
0 ETH0.0026106933
Register Module102697822020-06-15 10:35:001602 days ago1592217300IN
0x6fe80ea9...E78493Cb0
0 ETH0.0043511655
Register Module102697782020-06-15 10:34:481602 days ago1592217288IN
0x6fe80ea9...E78493Cb0
0 ETH0.0043511655
Register Module102697772020-06-15 10:34:411602 days ago1592217281IN
0x6fe80ea9...E78493Cb0
0 ETH0.0043511655
Register Module102697762020-06-15 10:34:281602 days ago1592217268IN
0x6fe80ea9...E78493Cb0
0 ETH0.0043511655
Register Module102697752020-06-15 10:34:231602 days ago1592217263IN
0x6fe80ea9...E78493Cb0
0 ETH0.004350555
Register Module102697742020-06-15 10:33:591602 days ago1592217239IN
0x6fe80ea9...E78493Cb0
0 ETH0.0043511655
Deregister Modul...102695232020-06-15 9:36:231602 days ago1592213783IN
0x6fe80ea9...E78493Cb0
0 ETH0.0018001555
Deregister Modul...102695222020-06-15 9:36:141602 days ago1592213774IN
0x6fe80ea9...E78493Cb0
0 ETH0.0018008155
Deregister Modul...102695202020-06-15 9:35:431602 days ago1592213743IN
0x6fe80ea9...E78493Cb0
0 ETH0.0018008155
Deregister Modul...102695192020-06-15 9:35:361602 days ago1592213736IN
0x6fe80ea9...E78493Cb0
0 ETH0.0018008155
Deregister Modul...102694992020-06-15 9:32:311602 days ago1592213551IN
0x6fe80ea9...E78493Cb0
0 ETH0.0018008155
Deregister Modul...102694962020-06-15 9:31:491602 days ago1592213509IN
0x6fe80ea9...E78493Cb0
0 ETH0.0013994255
Deregister Modul...102694932020-06-15 9:31:251602 days ago1592213485IN
0x6fe80ea9...E78493Cb0
0 ETH0.0013994255
Deregister Modul...102694922020-06-15 9:31:211602 days ago1592213481IN
0x6fe80ea9...E78493Cb0
0 ETH0.0013994255
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ModuleRegistryImpl

Compiler Version
v0.6.6+commit.6c089d02

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2020-06-01
*/

/**
Author: Loopring Foundation (Loopring Project Ltd)
*/

pragma solidity ^0.6.6;


contract AddressSet {
    struct Set
    {
        address[] addresses;
        mapping (address => uint) positions;
        uint count;
    }
    mapping (bytes32 => Set) private sets;

    function addAddressToSet(
        bytes32 key,
        address addr,
        bool maintainList
        ) internal
    {
        Set storage set = sets[key];
        require(set.positions[addr] == 0, "ALREADY_IN_SET");
        
        if (maintainList) {
            require(set.addresses.length == set.count, "PREVIOUSLY_NOT_MAINTAILED");
            set.addresses.push(addr);
        } else {
            require(set.addresses.length == 0, "MUST_MAINTAIN");
        }

        set.count += 1;
        set.positions[addr] = set.count;
    }

    function removeAddressFromSet(
        bytes32 key,
        address addr
        )
        internal
    {
        Set storage set = sets[key];
        uint pos = set.positions[addr];
        require(pos != 0, "NOT_IN_SET");

        delete set.positions[addr];
        set.count -= 1;

        if (set.addresses.length > 0) {
            address lastAddr = set.addresses[set.count];
            if (lastAddr != addr) {
                set.addresses[pos - 1] = lastAddr;
                set.positions[lastAddr] = pos;
            }
            set.addresses.pop();
        }
    }

    function removeSet(bytes32 key)
        internal
    {
        delete sets[key];
    }

    function isAddressInSet(
        bytes32 key,
        address addr
        )
        internal
        view
        returns (bool)
    {
        return sets[key].positions[addr] != 0;
    }

    function numAddressesInSet(bytes32 key)
        internal
        view
        returns (uint)
    {
        Set storage set = sets[key];
        return set.count;
    }

    function addressesInSet(bytes32 key)
        internal
        view
        returns (address[] memory)
    {
        Set storage set = sets[key];
        require(set.count == set.addresses.length, "NOT_MAINTAINED");
        return sets[key].addresses;
    }
}

contract Ownable {
    address public owner;

    event OwnershipTransferred(
        address indexed previousOwner,
        address indexed newOwner
    );

    
    
    constructor()
        public
    {
        owner = msg.sender;
    }

    
    modifier onlyOwner()
    {
        require(msg.sender == owner, "UNAUTHORIZED");
        _;
    }

    
    
    
    function transferOwnership(
        address newOwner
        )
        public
        virtual
        onlyOwner
    {
        require(newOwner != address(0), "ZERO_ADDRESS");
        emit OwnershipTransferred(owner, newOwner);
        owner = newOwner;
    }

    function renounceOwnership()
        public
        onlyOwner
    {
        emit OwnershipTransferred(owner, address(0));
        owner = address(0);
    }
}

contract Claimable is Ownable
{
    address public pendingOwner;

    
    modifier onlyPendingOwner() {
        require(msg.sender == pendingOwner, "UNAUTHORIZED");
        _;
    }

    
    
    function transferOwnership(
        address newOwner
        )
        public
        override
        onlyOwner
    {
        require(newOwner != address(0) && newOwner != owner, "INVALID_ADDRESS");
        pendingOwner = newOwner;
    }

    
    function claimOwnership()
        public
        onlyPendingOwner
    {
        emit OwnershipTransferred(owner, pendingOwner);
        owner = pendingOwner;
        pendingOwner = address(0);
    }
}

interface ModuleRegistry {
    function registerModule(address module) external;
    function deregisterModule(address module) external;
    function isModuleRegistered(address module) external view returns (bool);
    function modules() external view returns (address[] memory _modules);
    function numOfModules() external view returns (uint);
}

contract ModuleRegistryImpl is Claimable, AddressSet, ModuleRegistry
{
    bytes32 internal constant MODULE = keccak256("__MODULE__");

    event ModuleRegistered      (address indexed module);
    event ModuleDeregistered    (address indexed module);

    constructor() public Claimable() {}

    function registerModule(address module)
        external
        override
        onlyOwner
    {
        addAddressToSet(MODULE, module, true);
        emit ModuleRegistered(module);
    }

    function deregisterModule(address module)
        external
        override
        onlyOwner
    {
        removeAddressFromSet(MODULE, module);
        emit ModuleDeregistered(module);
    }

    function isModuleRegistered(address module)
        external
        view
        override
        returns (bool)
    {
        return isAddressInSet(MODULE, module);
    }

    function modules()
        external
        view
        override
        returns (address[] memory)
    {
        return addressesInSet(MODULE);
    }

    function numOfModules()
        external
        view
        override
        returns (uint)
    {
        return numAddressesInSet(MODULE);
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"module","type":"address"}],"name":"ModuleDeregistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"module","type":"address"}],"name":"ModuleRegistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"claimOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"module","type":"address"}],"name":"deregisterModule","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"module","type":"address"}],"name":"isModuleRegistered","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"modules","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numOfModules","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"module","type":"address"}],"name":"registerModule","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50600080546001600160a01b03191633179055610a2c806100326000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c80638da5cb5b116100665780638da5cb5b1461012f578063ad64ae4b14610153578063e30c397814610179578063f2fde38b14610181578063f7e80e98146101a75761009e565b80631c5ebe2f146100a357806331f8e08c146100dd5780634e71e0c8146100f7578063715018a61461010157806378b1fa7414610109575b600080fd5b6100c9600480360360208110156100b957600080fd5b50356001600160a01b03166101ff565b604080519115158252519081900360200190f35b6100e5610231565b60408051918252519081900360200190f35b6100ff610261565b005b6100ff610313565b6100ff6004803603602081101561011f57600080fd5b50356001600160a01b03166103ab565b610137610459565b604080516001600160a01b039092168252519081900360200190f35b6100ff6004803603602081101561016957600080fd5b50356001600160a01b0316610468565b610137610518565b6100ff6004803603602081101561019757600080fd5b50356001600160a01b0316610527565b6101af610600565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156101eb5781810151838201526020016101d3565b505050509050019250505060405180910390f35b60408051695f5f4d4f44554c455f5f60b01b8152905190819003600a01902060009061022b908361062b565b92915050565b60408051695f5f4d4f44554c455f5f60b01b8152905190819003600a01902060009061025c90610659565b905090565b6001546001600160a01b031633146102af576040805162461bcd60e51b815260206004820152600c60248201526b15539055551213d49256915160a21b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000546001600160a01b03163314610361576040805162461bcd60e51b815260206004820152600c60248201526b15539055551213d49256915160a21b604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146103f9576040805162461bcd60e51b815260206004820152600c60248201526b15539055551213d49256915160a21b604482015290519081900360640190fd5b60408051695f5f4d4f44554c455f5f60b01b8152905190819003600a019020610422908261066f565b6040516001600160a01b038216907f012b8191d33dab99c8af7281aa2f0a7d3cd7b916801ef5f7b5ce4cb3497ed98790600090a250565b6000546001600160a01b031681565b6000546001600160a01b031633146104b6576040805162461bcd60e51b815260206004820152600c60248201526b15539055551213d49256915160a21b604482015290519081900360640190fd5b60408051695f5f4d4f44554c455f5f60b01b8152905190819003600a0190206104e1908260016107be565b6040516001600160a01b038216907f0961fbae397458c42f3f186eaabee4a989aafde93ac5d8d122cff462423a241e90600090a250565b6001546001600160a01b031681565b6000546001600160a01b03163314610575576040805162461bcd60e51b815260206004820152600c60248201526b15539055551213d49256915160a21b604482015290519081900360640190fd5b6001600160a01b0381161580159061059b57506000546001600160a01b03828116911614155b6105de576040805162461bcd60e51b815260206004820152600f60248201526e494e56414c49445f4144445245535360881b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60408051695f5f4d4f44554c455f5f60b01b8152905190819003600a01902060609061025c9061092e565b60008281526002602090815260408083206001600160a01b0385168452600101909152902054151592915050565b6000908152600260208190526040909120015490565b60008281526002602090815260408083206001600160a01b03851684526001810190925290912054806106d6576040805162461bcd60e51b815260206004820152600a6024820152691393d517d25397d4d15560b21b604482015290519081900360640190fd5b6001600160a01b03831660009081526001830160205260408120556002820180546000190190558154156107b85760008260000183600201548154811061071957fe5b6000918252602090912001546001600160a01b03908116915084168114610789578083600001600184038154811061074d57fe5b600091825260208083209190910180546001600160a01b0319166001600160a01b03948516179055918316815260018501909152604090208290555b825483908061079457fe5b600082815260209020810160001990810180546001600160a01b0319169055019055505b50505050565b60008381526002602090815260408083206001600160a01b0386168452600181019092529091205415610829576040805162461bcd60e51b815260206004820152600e60248201526d1053149150511657d25397d4d15560921b604482015290519081900360640190fd5b81156108b8576002810154815414610888576040805162461bcd60e51b815260206004820152601960248201527f50524556494f55534c595f4e4f545f4d41494e5441494c454400000000000000604482015290519081900360640190fd5b80546001810182556000828152602090200180546001600160a01b0319166001600160a01b0385161790556108fc565b8054156108fc576040805162461bcd60e51b815260206004820152600d60248201526c26aaa9aa2fa6a0a4a72a20a4a760991b604482015290519081900360640190fd5b6002810180546001908101918290556001600160a01b0390941660009081529190930160205260409020919091555050565b60008181526002602081905260409091208054918101546060921461098b576040805162461bcd60e51b815260206004820152600e60248201526d1393d517d350525395105253915160921b604482015290519081900360640190fd5b600083815260026020908152604091829020805483518184028101840190945280845290918301828280156109e957602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116109cb575b505050505091505091905056fea2646970667358221220a2e71a4722acd7f0ebefc3fce69060ea0f21b7bfab5b1518004ab43efae5a81e64736f6c63430006060033

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061009e5760003560e01c80638da5cb5b116100665780638da5cb5b1461012f578063ad64ae4b14610153578063e30c397814610179578063f2fde38b14610181578063f7e80e98146101a75761009e565b80631c5ebe2f146100a357806331f8e08c146100dd5780634e71e0c8146100f7578063715018a61461010157806378b1fa7414610109575b600080fd5b6100c9600480360360208110156100b957600080fd5b50356001600160a01b03166101ff565b604080519115158252519081900360200190f35b6100e5610231565b60408051918252519081900360200190f35b6100ff610261565b005b6100ff610313565b6100ff6004803603602081101561011f57600080fd5b50356001600160a01b03166103ab565b610137610459565b604080516001600160a01b039092168252519081900360200190f35b6100ff6004803603602081101561016957600080fd5b50356001600160a01b0316610468565b610137610518565b6100ff6004803603602081101561019757600080fd5b50356001600160a01b0316610527565b6101af610600565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156101eb5781810151838201526020016101d3565b505050509050019250505060405180910390f35b60408051695f5f4d4f44554c455f5f60b01b8152905190819003600a01902060009061022b908361062b565b92915050565b60408051695f5f4d4f44554c455f5f60b01b8152905190819003600a01902060009061025c90610659565b905090565b6001546001600160a01b031633146102af576040805162461bcd60e51b815260206004820152600c60248201526b15539055551213d49256915160a21b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000546001600160a01b03163314610361576040805162461bcd60e51b815260206004820152600c60248201526b15539055551213d49256915160a21b604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146103f9576040805162461bcd60e51b815260206004820152600c60248201526b15539055551213d49256915160a21b604482015290519081900360640190fd5b60408051695f5f4d4f44554c455f5f60b01b8152905190819003600a019020610422908261066f565b6040516001600160a01b038216907f012b8191d33dab99c8af7281aa2f0a7d3cd7b916801ef5f7b5ce4cb3497ed98790600090a250565b6000546001600160a01b031681565b6000546001600160a01b031633146104b6576040805162461bcd60e51b815260206004820152600c60248201526b15539055551213d49256915160a21b604482015290519081900360640190fd5b60408051695f5f4d4f44554c455f5f60b01b8152905190819003600a0190206104e1908260016107be565b6040516001600160a01b038216907f0961fbae397458c42f3f186eaabee4a989aafde93ac5d8d122cff462423a241e90600090a250565b6001546001600160a01b031681565b6000546001600160a01b03163314610575576040805162461bcd60e51b815260206004820152600c60248201526b15539055551213d49256915160a21b604482015290519081900360640190fd5b6001600160a01b0381161580159061059b57506000546001600160a01b03828116911614155b6105de576040805162461bcd60e51b815260206004820152600f60248201526e494e56414c49445f4144445245535360881b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60408051695f5f4d4f44554c455f5f60b01b8152905190819003600a01902060609061025c9061092e565b60008281526002602090815260408083206001600160a01b0385168452600101909152902054151592915050565b6000908152600260208190526040909120015490565b60008281526002602090815260408083206001600160a01b03851684526001810190925290912054806106d6576040805162461bcd60e51b815260206004820152600a6024820152691393d517d25397d4d15560b21b604482015290519081900360640190fd5b6001600160a01b03831660009081526001830160205260408120556002820180546000190190558154156107b85760008260000183600201548154811061071957fe5b6000918252602090912001546001600160a01b03908116915084168114610789578083600001600184038154811061074d57fe5b600091825260208083209190910180546001600160a01b0319166001600160a01b03948516179055918316815260018501909152604090208290555b825483908061079457fe5b600082815260209020810160001990810180546001600160a01b0319169055019055505b50505050565b60008381526002602090815260408083206001600160a01b0386168452600181019092529091205415610829576040805162461bcd60e51b815260206004820152600e60248201526d1053149150511657d25397d4d15560921b604482015290519081900360640190fd5b81156108b8576002810154815414610888576040805162461bcd60e51b815260206004820152601960248201527f50524556494f55534c595f4e4f545f4d41494e5441494c454400000000000000604482015290519081900360640190fd5b80546001810182556000828152602090200180546001600160a01b0319166001600160a01b0385161790556108fc565b8054156108fc576040805162461bcd60e51b815260206004820152600d60248201526c26aaa9aa2fa6a0a4a72a20a4a760991b604482015290519081900360640190fd5b6002810180546001908101918290556001600160a01b0390941660009081529190930160205260409020919091555050565b60008181526002602081905260409091208054918101546060921461098b576040805162461bcd60e51b815260206004820152600e60248201526d1393d517d350525395105253915160921b604482015290519081900360640190fd5b600083815260026020908152604091829020805483518184028101840190945280845290918301828280156109e957602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116109cb575b505050505091505091905056fea2646970667358221220a2e71a4722acd7f0ebefc3fce69060ea0f21b7bfab5b1518004ab43efae5a81e64736f6c63430006060033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

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.