ETH Price: $1,603.76 (-1.27%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer Ownersh...99237482020-04-22 18:04:391819 days ago1587578679IN
0x5bAba73b...19F9C32A0
0 ETH0.0003402411

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Registry

Compiler Version
v0.5.8+commit.23d335f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, GNU GPLv3 license
/**
 *Submitted for verification at Etherscan.io on 2020-04-24
*/

// File: contracts/lib/Context.sol

// From package @openzeppelin/[email protected]
pragma solidity 0.5.8;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
contract Context {
    // Empty internal constructor, to prevent people from mistakenly deploying
    // an instance of this contract, which should be used via inheritance.
    constructor () internal { }
    // solhint-disable-previous-line no-empty-blocks

    function _msgSender() internal view returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

// File: contracts/lib/Ownable.sol

// From package @openzeppelin/[email protected]
pragma solidity 0.5.8;

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        _owner = _msgSender();
        emit OwnershipTransferred(address(0), _owner);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(isOwner(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Returns true if the caller is the current owner.
     */
    function isOwner() public view returns (bool) {
        return _msgSender() == _owner;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public onlyOwner {
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     */
    function _transferOwnership(address newOwner) internal {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

// File: contracts/Registry.sol

pragma solidity 0.5.8;


contract Registry is Ownable {
    // ------
    // STATE
    // ------

    struct Member {
        uint256 challengeID;
        uint256 memberStartTime; // Used for voting: voteWeight = sqrt(now - memberStartTime)
    }

    // Note, this address is used to map to the owner and delegates in the ERC-1056 registry
    mapping(address => Member) public members;

    // -----------------
    // GETTER FUNCTIONS
    // -----------------

    /**
    @dev                Get the challenge ID of a Member. If no challenge exists it returns 0
    @param _member      The member being checked
    @return             The challengeID
    */
    function getChallengeID(address _member) external view returns (uint256) {
        require(_member != address(0), "Can't check 0 address");
        Member memory member = members[_member];
        return member.challengeID;
    }

    /**
    @dev                Get the start time of a Member. If no time exists it returns 0
    @param _member      The member being checked
    @return             The start time
    */
    function getMemberStartTime(address _member) external view returns (uint256) {
        require(_member != address(0), "Can't check 0 address");
        Member memory member = members[_member];
        return member.memberStartTime;
    }

    // -----------------
    // SETTER FUNCTIONS
    // -----------------

    /**
    @dev                Set a member in the Registry. Only Everest can call this function.
    @param _member      The member being added
    @return             The start time of the member
    */
    function setMember(address _member) external onlyOwner returns (uint256) {
        require(_member != address(0), "Can't check 0 address");
        Member memory member = Member({
            challengeID: 0,
            /* solium-disable-next-line security/no-block-members*/
            memberStartTime: now
        });
        members[_member] = member;

        /* solium-disable-next-line security/no-block-members*/
        return now;
    }

    /**
    @dev                        Edit the challengeID. Can be used to set a challenge or remove a
                                challenge for a member. Only Everest can call.
    @param _member              The member being checked
    @param _newChallengeID      The new challenge ID. Pass in 0 to remove a challenge.
    */
    function editChallengeID(address _member, uint256 _newChallengeID) external onlyOwner {
        require(_member != address(0), "Can't check 0 address");
        Member storage member = members[_member];
        member.challengeID = _newChallengeID;
    }

    /**
    @dev                Remove a member. Only Everest can call
    @param _member      The member being removed
    */
    function deleteMember(address _member) external onlyOwner {
        require(_member != address(0), "Can't check 0 address");
        delete members[_member];
    }
}

Contract Security Audit

Contract ABI

API
[{"constant":false,"inputs":[{"name":"_member","type":"address"},{"name":"_newChallengeID","type":"uint256"}],"name":"editChallengeID","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"members","outputs":[{"name":"challengeID","type":"uint256"},{"name":"memberStartTime","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_member","type":"address"}],"name":"deleteMember","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_member","type":"address"}],"name":"getChallengeID","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_member","type":"address"}],"name":"getMemberStartTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_member","type":"address"}],"name":"setMember","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]

608060405261001261005f60201b60201c565b600080546001600160a01b0319166001600160a01b03928316178082556040519216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3610063565b3390565b61080c806100726000396000f3fe608060405234801561001057600080fd5b506004361061009d5760003560e01c8063715018a611610066578063715018a6146101935780638da5cb5b1461019b5780638f32d59b146101bf578063923e51d5146101db578063f2fde38b146102015761009d565b8062d264cc146100a257806308ae4b0c146100d057806311ffb1d41461010f5780632b94ea9714610135578063434eadb21461016d575b600080fd5b6100ce600480360360408110156100b857600080fd5b506001600160a01b038135169060200135610227565b005b6100f6600480360360208110156100e657600080fd5b50356001600160a01b03166102d9565b6040805192835260208301919091528051918290030190f35b6100ce6004803603602081101561012557600080fd5b50356001600160a01b03166102f2565b61015b6004803603602081101561014b57600080fd5b50356001600160a01b03166103a8565b60408051918252519081900360200190f35b61015b6004803603602081101561018357600080fd5b50356001600160a01b0316610434565b6100ce6104bf565b6101a3610553565b604080516001600160a01b039092168252519081900360200190f35b6101c7610562565b604080519115158252519081900360200190f35b61015b600480360360208110156101f157600080fd5b50356001600160a01b0316610586565b6100ce6004803603602081101561021757600080fd5b50356001600160a01b0316610663565b61022f610562565b6102715760408051600160e51b62461bcd02815260206004820181905260248201526000805160206107c1833981519152604482015290519081900360640190fd5b6001600160a01b0382166102bd5760408051600160e51b62461bcd02815260206004820152601560248201526000805160206107a1833981519152604482015290519081900360640190fd5b6001600160a01b03909116600090815260016020526040902055565b6001602081905260009182526040909120805491015482565b6102fa610562565b61033c5760408051600160e51b62461bcd02815260206004820181905260248201526000805160206107c1833981519152604482015290519081900360640190fd5b6001600160a01b0381166103885760408051600160e51b62461bcd02815260206004820152601560248201526000805160206107a1833981519152604482015290519081900360640190fd5b6001600160a01b0316600090815260016020819052604082208281550155565b60006001600160a01b0382166103f65760408051600160e51b62461bcd02815260206004820152601560248201526000805160206107a1833981519152604482015290519081900360640190fd5b6103fe610760565b50506001600160a01b03166000908152600160208181526040928390208351808501909452805480855292015492019190915290565b60006001600160a01b0382166104825760408051600160e51b62461bcd02815260206004820152601560248201526000805160206107a1833981519152604482015290519081900360640190fd5b61048a610760565b50506001600160a01b031660009081526001602081815260409283902083518085019094528054845290910154910181905290565b6104c7610562565b6105095760408051600160e51b62461bcd02815260206004820181905260248201526000805160206107c1833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b600080546001600160a01b03166105776106b9565b6001600160a01b031614905090565b6000610590610562565b6105d25760408051600160e51b62461bcd02815260206004820181905260248201526000805160206107c1833981519152604482015290519081900360640190fd5b6001600160a01b03821661061e5760408051600160e51b62461bcd02815260206004820152601560248201526000805160206107a1833981519152604482015290519081900360640190fd5b610626610760565b505060408051808201825260008082524260208084018281526001600160a01b038716845260019182905294909220925183559251910155919050565b61066b610562565b6106ad5760408051600160e51b62461bcd02815260206004820181905260248201526000805160206107c1833981519152604482015290519081900360640190fd5b6106b6816106bd565b50565b3390565b6001600160a01b03811661070557604051600160e51b62461bcd02815260040180806020018281038252602681526020018061077b6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60405180604001604052806000815260200160008152509056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737343616e277420636865636b2030206164647265737300000000000000000000004f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a165627a7a72305820531ce42e51ec8f869b5adc12f6238d5a03c73613bfe08266e92f641e4a390f0a0029

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061009d5760003560e01c8063715018a611610066578063715018a6146101935780638da5cb5b1461019b5780638f32d59b146101bf578063923e51d5146101db578063f2fde38b146102015761009d565b8062d264cc146100a257806308ae4b0c146100d057806311ffb1d41461010f5780632b94ea9714610135578063434eadb21461016d575b600080fd5b6100ce600480360360408110156100b857600080fd5b506001600160a01b038135169060200135610227565b005b6100f6600480360360208110156100e657600080fd5b50356001600160a01b03166102d9565b6040805192835260208301919091528051918290030190f35b6100ce6004803603602081101561012557600080fd5b50356001600160a01b03166102f2565b61015b6004803603602081101561014b57600080fd5b50356001600160a01b03166103a8565b60408051918252519081900360200190f35b61015b6004803603602081101561018357600080fd5b50356001600160a01b0316610434565b6100ce6104bf565b6101a3610553565b604080516001600160a01b039092168252519081900360200190f35b6101c7610562565b604080519115158252519081900360200190f35b61015b600480360360208110156101f157600080fd5b50356001600160a01b0316610586565b6100ce6004803603602081101561021757600080fd5b50356001600160a01b0316610663565b61022f610562565b6102715760408051600160e51b62461bcd02815260206004820181905260248201526000805160206107c1833981519152604482015290519081900360640190fd5b6001600160a01b0382166102bd5760408051600160e51b62461bcd02815260206004820152601560248201526000805160206107a1833981519152604482015290519081900360640190fd5b6001600160a01b03909116600090815260016020526040902055565b6001602081905260009182526040909120805491015482565b6102fa610562565b61033c5760408051600160e51b62461bcd02815260206004820181905260248201526000805160206107c1833981519152604482015290519081900360640190fd5b6001600160a01b0381166103885760408051600160e51b62461bcd02815260206004820152601560248201526000805160206107a1833981519152604482015290519081900360640190fd5b6001600160a01b0316600090815260016020819052604082208281550155565b60006001600160a01b0382166103f65760408051600160e51b62461bcd02815260206004820152601560248201526000805160206107a1833981519152604482015290519081900360640190fd5b6103fe610760565b50506001600160a01b03166000908152600160208181526040928390208351808501909452805480855292015492019190915290565b60006001600160a01b0382166104825760408051600160e51b62461bcd02815260206004820152601560248201526000805160206107a1833981519152604482015290519081900360640190fd5b61048a610760565b50506001600160a01b031660009081526001602081815260409283902083518085019094528054845290910154910181905290565b6104c7610562565b6105095760408051600160e51b62461bcd02815260206004820181905260248201526000805160206107c1833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b600080546001600160a01b03166105776106b9565b6001600160a01b031614905090565b6000610590610562565b6105d25760408051600160e51b62461bcd02815260206004820181905260248201526000805160206107c1833981519152604482015290519081900360640190fd5b6001600160a01b03821661061e5760408051600160e51b62461bcd02815260206004820152601560248201526000805160206107a1833981519152604482015290519081900360640190fd5b610626610760565b505060408051808201825260008082524260208084018281526001600160a01b038716845260019182905294909220925183559251910155919050565b61066b610562565b6106ad5760408051600160e51b62461bcd02815260206004820181905260248201526000805160206107c1833981519152604482015290519081900360640190fd5b6106b6816106bd565b50565b3390565b6001600160a01b03811661070557604051600160e51b62461bcd02815260040180806020018281038252602681526020018061077b6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60405180604001604052806000815260200160008152509056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737343616e277420636865636b2030206164647265737300000000000000000000004f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a165627a7a72305820531ce42e51ec8f869b5adc12f6238d5a03c73613bfe08266e92f641e4a390f0a0029

Deployed Bytecode Sourcemap

3787:3010:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3787:3010:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6231:258;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;6231:258:0;;;;;;;;:::i;:::-;;4118:41;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4118:41:0;-1:-1:-1;;;;;4118:41:0;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;6628:166;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;6628:166:0;-1:-1:-1;;;;;6628:166:0;;:::i;4450:233::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4450:233:0;-1:-1:-1;;;;;4450:233:0;;:::i;:::-;;;;;;;;;;;;;;;;4886:241;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4886:241:0;-1:-1:-1;;;;;4886:241:0;;:::i;2978:140::-;;;:::i;2167:79::-;;;:::i;:::-;;;;-1:-1:-1;;;;;2167:79:0;;;;;;;;;;;;;;2533:94;;;:::i;:::-;;;;;;;;;;;;;;;;;;5425:457;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5425:457:0;-1:-1:-1;;;;;5425:457:0;;:::i;3273:109::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3273:109:0;-1:-1:-1;;;;;3273:109:0;;:::i;6231:258::-;2379:9;:7;:9::i;:::-;2371:54;;;;;-1:-1:-1;;;;;2371:54:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2371:54:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;6336:21:0;;6328:55;;;;;-1:-1:-1;;;;;6328:55:0;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;6328:55:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;6418:16:0;;;6394:21;6418:16;;;:7;:16;;;;;6445:36;6231:258::o;4118:41::-;;;;;;;;;;;;;;;;;;;;:::o;6628:166::-;2379:9;:7;:9::i;:::-;2371:54;;;;;-1:-1:-1;;;;;2371:54:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2371:54:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;6705:21:0;;6697:55;;;;;-1:-1:-1;;;;;6697:55:0;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;6697:55:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;6770:16:0;;;;;:7;:16;;;;;;;6763:23;;;;;6628:166::o;4450:233::-;4514:7;-1:-1:-1;;;;;4542:21:0;;4534:55;;;;;-1:-1:-1;;;;;4534:55:0;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;4534:55:0;;;;;;;;;;;;;;;4600:20;;:::i;:::-;-1:-1:-1;;;;;;;4623:16:0;;;;;:7;:16;;;;;;;;;4600:39;;;;;;;;;;;;;;;;;;;;;;;4450:233::o;4886:241::-;4954:7;-1:-1:-1;;;;;4982:21:0;;4974:55;;;;;-1:-1:-1;;;;;4974:55:0;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;4974:55:0;;;;;;;;;;;;;;;5040:20;;:::i;:::-;-1:-1:-1;;;;;;;5063:16:0;;;;;:7;:16;;;;;;;;;5040:39;;;;;;;;;;;;;;;;;;;;;;4886:241::o;2978:140::-;2379:9;:7;:9::i;:::-;2371:54;;;;;-1:-1:-1;;;;;2371:54:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2371:54:0;;;;;;;;;;;;;;;3077:1;3061:6;;3040:40;;-1:-1:-1;;;;;3061:6:0;;;;3040:40;;3077:1;;3040:40;3108:1;3091:19;;-1:-1:-1;;;;;;3091:19:0;;;2978:140::o;2167:79::-;2205:7;2232:6;-1:-1:-1;;;;;2232:6:0;2167:79;:::o;2533:94::-;2573:4;2613:6;;-1:-1:-1;;;;;2613:6:0;2597:12;:10;:12::i;:::-;-1:-1:-1;;;;;2597:22:0;;2590:29;;2533:94;:::o;5425:457::-;5489:7;2379:9;:7;:9::i;:::-;2371:54;;;;;-1:-1:-1;;;;;2371:54:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2371:54:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;5517:21:0;;5509:55;;;;;-1:-1:-1;;;;;5509:55:0;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;5509:55:0;;;;;;;;;;;;;;;5575:20;;:::i;:::-;-1:-1:-1;;5598:152:0;;;;;;;;-1:-1:-1;5598:152:0;;;5735:3;5598:152;;;;;;;-1:-1:-1;;;;;5761:16:0;;;;:7;:16;;;;;;;;:25;;;;;;;;;5425:457;;;:::o;3273:109::-;2379:9;:7;:9::i;:::-;2371:54;;;;;-1:-1:-1;;;;;2371:54:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2371:54:0;;;;;;;;;;;;;;;3346:28;3365:8;3346:18;:28::i;:::-;3273:109;:::o;890:98::-;970:10;890:98;:::o;3488:229::-;-1:-1:-1;;;;;3562:22:0;;3554:73;;;;-1:-1:-1;;;;;3554:73:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3664:6;;;3643:38;;-1:-1:-1;;;;;3643:38:0;;;;3664:6;;;3643:38;;;3692:6;:17;;-1:-1:-1;;;;;;3692:17:0;-1:-1:-1;;;;;3692:17:0;;;;;;;;;;3488:229::o;3787:3010::-;;;;;;;;;;;;;;;;;;;:::o

Swarm Source

bzzr://531ce42e51ec8f869b5adc12f6238d5a03c73613bfe08266e92f641e4a390f0a

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.