ETH Price: $2,020.61 (+2.27%)

Contract

0x30f855afb78758Aa4C2dc706fb0fA3A98c865d2d
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Delegate147715682022-05-14 4:29:021414 days ago1652502542IN
0x30f855af...98c865d2d
0 ETH0.0007660324.53896692
Delegate147715212022-05-14 4:17:451414 days ago1652501865IN
0x30f855af...98c865d2d
0 ETH0.0015554130.42846338
Delegate118415362021-02-12 11:30:401870 days ago1613129440IN
0x30f855af...98c865d2d
0 ETH0.00391497107.8
Delegate116789122021-01-18 11:13:041895 days ago1610968384IN
0x30f855af...98c865d2d
0 ETH0.0026042971.71
Delegate116464572021-01-13 11:57:591900 days ago1610539079IN
0x30f855af...98c865d2d
0 ETH0.0014889941.00000145
Vote Out114560852020-12-15 6:42:081929 days ago1608014528IN
0x30f855af...98c865d2d
0 ETH0.0029157375.50000218
Vote Out114063712020-12-07 15:04:581937 days ago1607353498IN
0x30f855af...98c865d2d
0 ETH0.0020564653.25000039
Vote Out114063622020-12-07 15:02:291937 days ago1607353349IN
0x30f855af...98c865d2d
0 ETH0.002046853.00000145
Vote Out113948152020-12-05 20:27:221938 days ago1607200042IN
0x30f855af...98c865d2d
0 ETH0.0006256216.2
Vote Out113899672020-12-05 2:38:441939 days ago1607135924IN
0x30f855af...98c865d2d
0 ETH0.0012744233
Vote Out113899552020-12-05 2:35:431939 days ago1607135743IN
0x30f855af...98c865d2d
0 ETH0.0008109921
Delegate113816992020-12-03 19:58:181940 days ago1607025498IN
0x30f855af...98c865d2d
0 ETH0.0012710935
Vote Out113809102020-12-03 17:06:371941 days ago1607015197IN
0x30f855af...98c865d2d
0 ETH0.0015447640
Vote Out113647772020-12-01 5:29:491943 days ago1606800589IN
0x30f855af...98c865d2d
0 ETH0.0016567542.9
Delegate113601342020-11-30 12:26:211944 days ago1606739181IN
0x30f855af...98c865d2d
0 ETH0.0048751195
Vote Out113575212020-11-30 3:08:051944 days ago1606705685IN
0x30f855af...98c865d2d
0 ETH0.0020081852.00000145
Vote Out113574732020-11-30 2:56:181944 days ago1606704978IN
0x30f855af...98c865d2d
0 ETH0.0030734270
Vote Out113568762020-11-30 0:39:021944 days ago1606696742IN
0x30f855af...98c865d2d
0 ETH0.0015061439
Vote Out113564382020-11-29 23:03:191944 days ago1606690999IN
0x30f855af...98c865d2d
0 ETH0.0006565217
Vote Out113559722020-11-29 21:20:221944 days ago1606684822IN
0x30f855af...98c865d2d
0 ETH0.0005947315.4
Delegate113540792020-11-29 14:07:051945 days ago1606658825IN
0x30f855af...98c865d2d
0 ETH0.0006900219
Vote Out113510082020-11-29 2:52:001945 days ago1606618320IN
0x30f855af...98c865d2d
0 ETH0.0007685119.9
Vote Out113508382020-11-29 2:16:461945 days ago1606616206IN
0x30f855af...98c865d2d
0 ETH0.0004672812.1
Vote Out113500262020-11-28 23:19:501945 days ago1606605590IN
0x30f855af...98c865d2d
0 ETH0.0004750112.3
Vote Out113472462020-11-28 13:22:271946 days ago1606569747IN
0x30f855af...98c865d2d
0 ETH0.0005140113.31
View all transactions

Advanced mode:
Parent Transaction Hash Method Block
From
To
View All Internal Transactions
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
OrbsVoting

Compiler Version
v0.4.25+commit.59dbf8f1

Optimization Enabled:
Yes with 200 runs

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

pragma solidity 0.4.25;


interface IOrbsVoting {

    event VoteOut(address indexed voter, address[] validators, uint voteCounter);
    event Delegate(
        address indexed delegator,
        address indexed to,
        uint delegationCounter
    );
    event Undelegate(address indexed delegator, uint delegationCounter);

    /// @dev Voting method to select which validators you want to vote out in this election period.
    /// @param validators address[] an array of validators addresses you want to vote out. In case you want to vote, but not vote out anyone, send an empty array.
    function voteOut(address[] validators) external;

    /// @dev Delegation method to select who you would like to delegate your stake to.
    /// @param to address the address, you want to delegate your stake to. If you want to cancel a delegation - delegate to yourself to yourself.
    function delegate(address to) external;

    /// @dev Delegation method to select who you would like to delegate your stake to.
    function undelegate() external;

    /// @dev returns vote pair - validators list and the block number the vote was set.
    /// @param guardian address the address of the guardian
    function getCurrentVote(address guardian)
        external
        view
        returns (address[] validators, uint blockNumber);

    /// @dev returns vote pair - validators list and the block number the vote was set.
    ///      same as getCurrentVote but returns addresses represented as byte20.
    function getCurrentVoteBytes20(address guardian)
        external
        view
        returns (bytes20[] validatorsBytes20, uint blockNumber);

    /// @dev returns the address to which the delegator has delegated the stake
    /// @param delegator address the address of the delegator
    function getCurrentDelegation(address delegator)
        external
        view
        returns (address);
}


contract OrbsVoting is IOrbsVoting {

    // A vote is a pair of block number and list of validators. The vote's block
    // number is used to determine the vote qualification for an election event.
    struct VotingRecord {
        uint blockNumber;
        address[] validators;
    }

    // The version of the current Voting smart contract.
    uint public constant VERSION = 1;

    // Vars to see that voting and delegating is moving forward. Is used to emit
    // events to test for completeness.
    uint internal voteCounter;
    uint internal delegationCounter;

    // The amount of validators you can vote out in each election round. This will be set to 3 in the construction.
    uint public maxVoteOutCount;

    // Internal mappings to keep track of the votes and delegations.
    mapping(address => VotingRecord) internal votes;
    mapping(address => address) internal delegations;

    /// @dev Constructor that initializes the Voting contract. maxVoteOutCount will be set to 3.
    constructor(uint maxVoteOutCount_) public {
        require(maxVoteOutCount_ > 0, "maxVoteOutCount_ must be positive");
        maxVoteOutCount = maxVoteOutCount_;
    }

    /// @dev Voting method to select which validators you want to vote out in this election period.
    /// @param validators address[] an array of validators addresses you want to vote out. In case you want to vote, but not vote out anyone, send an empty array.
    function voteOut(address[] validators) external {
        address sender = msg.sender;
        require(validators.length <= maxVoteOutCount, "Validators list is over the allowed length");
        sanitizeValidators(validators);

        voteCounter++;

        votes[sender] = VotingRecord({
            blockNumber: block.number,
            validators: validators
        });

        emit VoteOut(sender, validators, voteCounter);
    }

    /// @dev Delegation method to select who you would like to delegate your stake to.
    /// @param to address the address, you want to delegate your stake to. If you want to cancel a delegation - delegate to yourself to yourself.
    function delegate(address to) external {
        address sender = msg.sender;
        require(to != address(0), "must delegate to non 0");
        require(sender != to , "cant delegate to yourself");

        delegationCounter++;

        delegations[sender] = to;

        emit Delegate(sender, to, delegationCounter);
    }

    /// @dev Delegation method to select who you would like to delegate your stake to.
    function undelegate() external {
        address sender = msg.sender;
        delegationCounter++;

        delete delegations[sender];

        emit Delegate(sender, sender, delegationCounter);
        emit Undelegate(sender, delegationCounter);
    }

    /// @dev returns vote pair - validators list and the block number the vote was set.
    ///      same as getCurrentVote but returns addresses represented as byte20.
    function getCurrentVoteBytes20(address guardian)
        public
        view
        returns (bytes20[] memory validatorsBytes20, uint blockNumber)
    {
        address[] memory validatorAddresses;
        (validatorAddresses, blockNumber) = getCurrentVote(guardian);

        uint validatorAddressesLength = validatorAddresses.length;

        validatorsBytes20 = new bytes20[](validatorAddressesLength);

        for (uint i = 0; i < validatorAddressesLength; i++) {
            validatorsBytes20[i] = bytes20(validatorAddresses[i]);
        }
    }

    /// @dev returns the address to which the delegator has delegated the stake
    /// @param delegator address the address of the delegator
    function getCurrentDelegation(address delegator)
        public
        view
        returns (address)
    {
        return delegations[delegator];
    }

    /// @dev returns vote pair - validators list and the block number the vote was set.
    /// @param guardian address the address of the guardian
    function getCurrentVote(address guardian)
        public
        view
        returns (address[] memory validators, uint blockNumber)
    {
        VotingRecord storage lastVote = votes[guardian];

        blockNumber = lastVote.blockNumber;
        validators = lastVote.validators;
    }

    /// @dev check that the validators array is unique and non zero.
    /// @param validators address[]
    function sanitizeValidators(address[] validators)
        private
        pure
    {
        uint validatorsLength = validators.length;
        for (uint i = 0; i < validatorsLength; i++) {
            require(validators[i] != address(0), "All validator addresses must be non 0");
            for (uint j = i + 1; j < validatorsLength; j++) {
                require(validators[j] != validators[i], "Duplicate Validators");
            }
        }
    }
}

Contract Security Audit

Contract ABI

API
[{"constant":true,"inputs":[{"name":"delegator","type":"address"}],"name":"getCurrentDelegation","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"}],"name":"delegate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"undelegate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"guardian","type":"address"}],"name":"getCurrentVote","outputs":[{"name":"validators","type":"address[]"},{"name":"blockNumber","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"maxVoteOutCount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"guardian","type":"address"}],"name":"getCurrentVoteBytes20","outputs":[{"name":"validatorsBytes20","type":"bytes20[]"},{"name":"blockNumber","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"validators","type":"address[]"}],"name":"voteOut","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"VERSION","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"maxVoteOutCount_","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"voter","type":"address"},{"indexed":false,"name":"validators","type":"address[]"},{"indexed":false,"name":"voteCounter","type":"uint256"}],"name":"VoteOut","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"delegator","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"delegationCounter","type":"uint256"}],"name":"Delegate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"delegator","type":"address"},{"indexed":false,"name":"delegationCounter","type":"uint256"}],"name":"Undelegate","type":"event"}]

608060405234801561001057600080fd5b50604051602080610a0a8339810160405251600081116100b757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f6d6178566f74654f7574436f756e745f206d75737420626520706f736974697660448201527f6500000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600255610941806100c96000396000f30060806040526004361061008d5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166345ba5b8a81146100925780635c19a95c146100cf57806392ab89bb146100f2578063a8b52c2514610107578063dc89665714610183578063e5d01618146101aa578063f8222020146101cb578063ffa1ad74146101eb575b600080fd5b34801561009e57600080fd5b506100b3600160a060020a0360043516610200565b60408051600160a060020a039092168252519081900360200190f35b3480156100db57600080fd5b506100f0600160a060020a036004351661021e565b005b3480156100fe57600080fd5b506100f0610365565b34801561011357600080fd5b50610128600160a060020a0360043516610417565b6040518080602001838152602001828103825284818151815260200191508051906020019060200280838360005b8381101561016e578181015183820152602001610156565b50505050905001935050505060405180910390f35b34801561018f57600080fd5b50610198610495565b60408051918252519081900360200190f35b3480156101b657600080fd5b50610128600160a060020a036004351661049b565b3480156101d757600080fd5b506100f06004803560248101910135610555565b3480156101f757600080fd5b506101986106fd565b600160a060020a039081166000908152600460205260409020541690565b33600160a060020a038216151561027f576040805160e560020a62461bcd02815260206004820152601660248201527f6d7573742064656c656761746520746f206e6f6e203000000000000000000000604482015290519081900360640190fd5b600160a060020a0381811690831614156102e3576040805160e560020a62461bcd02815260206004820152601960248201527f63616e742064656c656761746520746f20796f757273656c6600000000000000604482015290519081900360640190fd5b6001805481018155600160a060020a03828116600081815260046020908152604091829020805473ffffffffffffffffffffffffffffffffffffffff19169488169485179055935481519081529051929391927f510b11bb3f3c799b11307c01ab7db0d335683ef5b2da98f7697de744f465eacc929181900390910190a35050565b600180548101815533600081815260046020908152604091829020805473ffffffffffffffffffffffffffffffffffffffff191690559254815190815290519192839283927f510b11bb3f3c799b11307c01ab7db0d335683ef5b2da98f7697de744f465eacc92908290030190a36001546040805191825251600160a060020a038316917f17659a1d1f57d2e58b7063ee8b518b50d00bf3e5c0d8224b68ba865e4725a0b4919081900360200190a250565b600160a060020a0381166000908152600360209081526040918290208054600182018054855181860281018601909652808652606095929483018282801561048857602002820191906000526020600020905b8154600160a060020a0316815260019091019060200180831161046a575b5050505050925050915091565b60025481565b6060600060606000806104ad86610417565b809550819450505082519150816040519080825280602002602001820160405280156104e3578160200160208202803883390190505b509450600090505b8181101561054d57828181518110151561050157fe5b906020019060200201516c0100000000000000000000000002858281518110151561052857fe5b6bffffffffffffffffffffffff199092166020928302909101909101526001016104eb565b505050915091565b60025433908211156105d7576040805160e560020a62461bcd02815260206004820152602a60248201527f56616c696461746f7273206c697374206973206f7665722074686520616c6c6f60448201527f776564206c656e67746800000000000000000000000000000000000000000000606482015290519081900360840190fd5b61060d83838080602002602001604051908101604052809392919081815260200183836020028082843750610702945050505050565b6000805460010190556040805180820182524381528151602085810282810182019094528582529192828401928791879182919085019084908082843750505092909352505050600160a060020a038216600090815260036020908152604090912082518155828201518051919261068d9260018501929091019061086f565b5090505080600160a060020a03167f94a3724087eae106b6eeb3198e1c6a4c9a6ece40950796a3d1350e110aad4b218484600054604051808060200183815260200182810382528585828181526020019250602002808284376040519201829003965090945050505050a2505050565b600181565b80516000805b8282101561086957835160009085908490811061072157fe5b60209081029091010151600160a060020a031614156107b0576040805160e560020a62461bcd02815260206004820152602560248201527f416c6c2076616c696461746f7220616464726573736573206d7573742062652060448201527f6e6f6e2030000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b50600181015b8281101561085e5783828151811015156107cc57fe5b90602001906020020151600160a060020a031684828151811015156107ed57fe5b60209081029091010151600160a060020a03161415610856576040805160e560020a62461bcd02815260206004820152601460248201527f4475706c69636174652056616c696461746f7273000000000000000000000000604482015290519081900360640190fd5b6001016107b6565b600190910190610708565b50505050565b8280548282559060005260206000209081019282156108d1579160200282015b828111156108d1578251825473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0390911617825560209092019160019091019061088f565b506108dd9291506108e1565b5090565b61091291905b808211156108dd57805473ffffffffffffffffffffffffffffffffffffffff191681556001016108e7565b905600a165627a7a723058203401dc80c14277da0efb385b202efc13d277040b473d9f9273cd7d8f2f7c66ba00290000000000000000000000000000000000000000000000000000000000000003

Deployed Bytecode

0x60806040526004361061008d5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166345ba5b8a81146100925780635c19a95c146100cf57806392ab89bb146100f2578063a8b52c2514610107578063dc89665714610183578063e5d01618146101aa578063f8222020146101cb578063ffa1ad74146101eb575b600080fd5b34801561009e57600080fd5b506100b3600160a060020a0360043516610200565b60408051600160a060020a039092168252519081900360200190f35b3480156100db57600080fd5b506100f0600160a060020a036004351661021e565b005b3480156100fe57600080fd5b506100f0610365565b34801561011357600080fd5b50610128600160a060020a0360043516610417565b6040518080602001838152602001828103825284818151815260200191508051906020019060200280838360005b8381101561016e578181015183820152602001610156565b50505050905001935050505060405180910390f35b34801561018f57600080fd5b50610198610495565b60408051918252519081900360200190f35b3480156101b657600080fd5b50610128600160a060020a036004351661049b565b3480156101d757600080fd5b506100f06004803560248101910135610555565b3480156101f757600080fd5b506101986106fd565b600160a060020a039081166000908152600460205260409020541690565b33600160a060020a038216151561027f576040805160e560020a62461bcd02815260206004820152601660248201527f6d7573742064656c656761746520746f206e6f6e203000000000000000000000604482015290519081900360640190fd5b600160a060020a0381811690831614156102e3576040805160e560020a62461bcd02815260206004820152601960248201527f63616e742064656c656761746520746f20796f757273656c6600000000000000604482015290519081900360640190fd5b6001805481018155600160a060020a03828116600081815260046020908152604091829020805473ffffffffffffffffffffffffffffffffffffffff19169488169485179055935481519081529051929391927f510b11bb3f3c799b11307c01ab7db0d335683ef5b2da98f7697de744f465eacc929181900390910190a35050565b600180548101815533600081815260046020908152604091829020805473ffffffffffffffffffffffffffffffffffffffff191690559254815190815290519192839283927f510b11bb3f3c799b11307c01ab7db0d335683ef5b2da98f7697de744f465eacc92908290030190a36001546040805191825251600160a060020a038316917f17659a1d1f57d2e58b7063ee8b518b50d00bf3e5c0d8224b68ba865e4725a0b4919081900360200190a250565b600160a060020a0381166000908152600360209081526040918290208054600182018054855181860281018601909652808652606095929483018282801561048857602002820191906000526020600020905b8154600160a060020a0316815260019091019060200180831161046a575b5050505050925050915091565b60025481565b6060600060606000806104ad86610417565b809550819450505082519150816040519080825280602002602001820160405280156104e3578160200160208202803883390190505b509450600090505b8181101561054d57828181518110151561050157fe5b906020019060200201516c0100000000000000000000000002858281518110151561052857fe5b6bffffffffffffffffffffffff199092166020928302909101909101526001016104eb565b505050915091565b60025433908211156105d7576040805160e560020a62461bcd02815260206004820152602a60248201527f56616c696461746f7273206c697374206973206f7665722074686520616c6c6f60448201527f776564206c656e67746800000000000000000000000000000000000000000000606482015290519081900360840190fd5b61060d83838080602002602001604051908101604052809392919081815260200183836020028082843750610702945050505050565b6000805460010190556040805180820182524381528151602085810282810182019094528582529192828401928791879182919085019084908082843750505092909352505050600160a060020a038216600090815260036020908152604090912082518155828201518051919261068d9260018501929091019061086f565b5090505080600160a060020a03167f94a3724087eae106b6eeb3198e1c6a4c9a6ece40950796a3d1350e110aad4b218484600054604051808060200183815260200182810382528585828181526020019250602002808284376040519201829003965090945050505050a2505050565b600181565b80516000805b8282101561086957835160009085908490811061072157fe5b60209081029091010151600160a060020a031614156107b0576040805160e560020a62461bcd02815260206004820152602560248201527f416c6c2076616c696461746f7220616464726573736573206d7573742062652060448201527f6e6f6e2030000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b50600181015b8281101561085e5783828151811015156107cc57fe5b90602001906020020151600160a060020a031684828151811015156107ed57fe5b60209081029091010151600160a060020a03161415610856576040805160e560020a62461bcd02815260206004820152601460248201527f4475706c69636174652056616c696461746f7273000000000000000000000000604482015290519081900360640190fd5b6001016107b6565b600190910190610708565b50505050565b8280548282559060005260206000209081019282156108d1579160200282015b828111156108d1578251825473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0390911617825560209092019160019091019061088f565b506108dd9291506108e1565b5090565b61091291905b808211156108dd57805473ffffffffffffffffffffffffffffffffffffffff191681556001016108e7565b905600a165627a7a723058203401dc80c14277da0efb385b202efc13d277040b473d9f9273cd7d8f2f7c66ba0029

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

0000000000000000000000000000000000000000000000000000000000000003

-----Decoded View---------------
Arg [0] : maxVoteOutCount_ (uint256): 3

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000003


Swarm Source

bzzr://3401dc80c14277da0efb385b202efc13d277040b473d9f9273cd7d8f2f7c66ba

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