Contract 0x24E2Da05332D45Ef82CA6bD08820DC8422659775

Contract Overview

Balance:
0 Ether
Txn Hash
Method
Block
From
To
Value
0x7748016005e4b4660a5244925695e8dfd98b4595180f4c2cd95f61e5f3249a86Validate Vote Re...23560632018-05-27 8:50:131645 days 10 hrs ago0x7017b311a8f1ad3ef529455300ac16b943c7e5ef IN  0x24e2da05332d45ef82ca6bd08820dc84226597750 Ether0.000044351
0x15e2bb07d9d14d4198b615345ea806f9c643887979042563d4ac657c1df42b76Validate Nationa...23560632018-05-27 8:50:131645 days 10 hrs ago0x7017b311a8f1ad3ef529455300ac16b943c7e5ef IN  0x24e2da05332d45ef82ca6bd08820dc84226597750 Ether0.000065171
0x4bc096056b7ab717616edc620e8f03176e0b901c971bc8c0d1295983305a5063Add Validator23560562018-05-27 8:48:281645 days 10 hrs ago0x7a732352530cf334ca5ff8e7627b41efbcfec3b1 IN  0x24e2da05332d45ef82ca6bd08820dc84226597750 Ether0.000029561
0x76b8118fcc0de8fde4e8931792ac79799ec0970525d9cecc55588e15257e9523Add Validator23560402018-05-27 8:44:281645 days 10 hrs ago0x7a732352530cf334ca5ff8e7627b41efbcfec3b1 IN  0x24e2da05332d45ef82ca6bd08820dc84226597750 Ether0.000044561
0xbee836fc4a60cdf1931c60196939fd7b844d0d869bdc0624021cf7cbf24458ce0x6080604023560072018-05-27 8:36:131645 days 10 hrs ago0x7a732352530cf334ca5ff8e7627b41efbcfec3b1 IN  Create: Venezuela0 Ether0.000969761
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Venezuela

Compiler Version
v0.4.24+commit.e67f0147

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2018-05-27
*/

pragma solidity ^0.4.19;

interface Registry {

  function hasAttribute(address who, string attribute) public view returns (bool);
  function getAttribute(address who, string attribute) public view returns (uint256);

}

/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 */
contract Ownable {
  address public owner;


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


  /**
   * @dev The Ownable constructor sets the original `owner` of the contract to the sender
   * account.
   */
  function Ownable() public {
    owner = msg.sender;
  }

  /**
   * @dev Throws if called by any account other than the owner.
   */
  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }

  /**
   * @dev Allows the current owner to transfer control of the contract to a newOwner.
   * @param newOwner The address to transfer ownership to.
   */
  function transferOwnership(address newOwner) public onlyOwner {
    require(newOwner != address(0));
    OwnershipTransferred(owner, newOwner);
    owner = newOwner;
  }

}

contract Jurisdiction is Ownable, Registry {

  event ValidatorAdded(address validator);
  event ValidatorRemoved(address validator);

  mapping(address => mapping(string => uint256)) attributes;

  mapping(address => bool) validators;

  modifier onlyValidator() {
    require(isValidator(msg.sender));
    _;
  }

  function addValidator(address validator) public onlyOwner {
    validators[validator] = true;
    ValidatorAdded(validator);
  }

  function removeValidator(address validator) public onlyOwner {
    validators[validator] = false;
    ValidatorRemoved(validator);
  }

  function isValidator(address who) public view returns (bool) {
    return validators[who];
  }

  function addAttribute(address who, string attribute, uint256 value) public onlyValidator {
    attributes[who][attribute] = value;
  }

  function hasAttribute(address who, string attribute) public view returns (bool)  {
    return attributes[who][attribute] != 0;
  }

  function getAttribute(address who, string attribute) public view returns (uint256) {
    return attributes[who][attribute];
  }
}

contract Venezuela is Jurisdiction {

  function validateNationalID(address who) public onlyValidator {
      addAttribute(who, "IsANaturalPerson", 1);
      addAttribute(who, "HoldsANationalID", 1);
  }

  function validateVoteRegistry(address who) public onlyValidator {
      addAttribute(who, "IsRegisteredToVote", 1);
  }

  function holdsANationalID(address who) public view returns (bool) {
      return hasAttribute(who, "HoldsANationalID");
  }

  function isRegisteredToVote(address who) public view returns (bool) {
      return hasAttribute(who, "IsRegisteredToVote");
  }

}

Contract ABI

[{"constant":true,"inputs":[{"name":"who","type":"address"},{"name":"attribute","type":"string"}],"name":"hasAttribute","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"validator","type":"address"}],"name":"removeValidator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"validator","type":"address"}],"name":"addValidator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"who","type":"address"},{"name":"attribute","type":"string"}],"name":"getAttribute","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"who","type":"address"}],"name":"isRegisteredToVote","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"who","type":"address"},{"name":"attribute","type":"string"},{"name":"value","type":"uint256"}],"name":"addAttribute","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"who","type":"address"}],"name":"validateNationalID","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":"who","type":"address"}],"name":"holdsANationalID","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"who","type":"address"}],"name":"validateVoteRegistry","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"who","type":"address"}],"name":"isValidator","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"validator","type":"address"}],"name":"ValidatorAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"validator","type":"address"}],"name":"ValidatorRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]

6080604052336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610d25806100536000396000f3006080604052600436106100ba576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630b7c45a2146100bf57806340a141ff146101605780634d238c8e146101a35780635449e2fc146101e6578063584c0680146102835780638259c590146102de578063866ed641146103715780638da5cb5b146103b4578063c5be88ae1461040b578063c715419c14610466578063f2fde38b146104a9578063facd743b146104ec575b600080fd5b3480156100cb57600080fd5b50610146600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290505050610547565b604051808215151515815260200191505060405180910390f35b34801561016c57600080fd5b506101a1600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506105fd565b005b3480156101af57600080fd5b506101e4600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610716565b005b3480156101f257600080fd5b5061026d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061082f565b6040518082815260200191505060405180910390f35b34801561028f57600080fd5b506102c4600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108e2565b604051808215151515815260200191505060405180910390f35b3480156102ea57600080fd5b5061036f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091929192908035906020019092919050505061092a565b005b34801561037d57600080fd5b506103b2600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109f0565b005b3480156103c057600080fd5b506103c9610a89565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561041757600080fd5b5061044c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610aae565b604051808215151515815260200191505060405180910390f35b34801561047257600080fd5b506104a7600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610af6565b005b3480156104b557600080fd5b506104ea600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b4e565b005b3480156104f857600080fd5b5061052d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ca3565b604051808215151515815260200191505060405180910390f35b600080600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020836040518082805190602001908083835b6020831015156105bf578051825260208201915060208101905060208303925061059a565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020541415905092915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561065857600080fd5b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fe1434e25d6611e0db941968fdc97811c982ac1602e951637d206f5fdda9dd8f181604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561077157600080fd5b6001600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fe366c1c0452ed8eec96861e9e54141ebff23c9ec89fe27b996b45f5ec388498781604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020826040518082805190602001908083835b6020831015156108a65780518252602082019150602081019050602083039250610881565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902054905092915050565b6000610923826040805190810160405280601281526020017f497352656769737465726564546f566f74650000000000000000000000000000815250610547565b9050919050565b61093333610ca3565b151561093e57600080fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020836040518082805190602001908083835b6020831015156109b4578051825260208201915060208101905060208303925061098f565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902081905550505050565b6109f933610ca3565b1515610a0457600080fd5b610a45816040805190810160405280601081526020017f4973414e61747572616c506572736f6e00000000000000000000000000000000815250600161092a565b610a86816040805190810160405280601081526020017f486f6c6473414e6174696f6e616c494400000000000000000000000000000000815250600161092a565b50565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000610aef826040805190810160405280601081526020017f486f6c6473414e6174696f6e616c494400000000000000000000000000000000815250610547565b9050919050565b610aff33610ca3565b1515610b0a57600080fd5b610b4b816040805190810160405280601281526020017f497352656769737465726564546f566f74650000000000000000000000000000815250600161092a565b50565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610ba957600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610be557600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1690509190505600a165627a7a723058205e1844f419101f76a6ee9dd676542735a24ce812c380a1efa37b55c8a70f612a0029

Swarm Source

bzzr://5e1844f419101f76a6ee9dd676542735a24ce812c380a1efa37b55c8a70f612a
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.