Accounts
0x56...ba2d
DIT

DIT

$500
This contract's source code is verified!
Contract Metadata
Compiler
0.5.5+commit.47a71e8f
Language
Solidity
Contract Source Code
File 1 of 1: DITToken.sol
pragma solidity ^0.5.5;

/*

file    : colossus.sol
ver     : 0.4.2

Deployment of Hut34's DIT contract - an ERC20 contract with all addresses having the entire supply, and being approved for transfers.
Additional functions allow on chain broadcast / storage of metadata related to encryption services provided by Colossus, Hut34's data encryption and storage beastie.

Come see us at https://hut34.io/ for further info (and see https://en.wikipedia.org/wiki/Colossus_computer for background.....)

Special thanks to OpenRelay's stateless contract "Notcoin" - https://blog.openrelay.xyz/notcoin/ :)

*/


/**
 * @title ERC20Basic
 * @dev Simpler version of ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/179
 */
contract ERC20Basic {
  function totalSupply() public view returns (uint256);
  function balanceOf(address who) public view returns (uint256);
  function transfer(address to, uint256 value) public returns (bool);
  event Transfer(address indexed from, address indexed to, uint256 value);
}


/**
 * @title ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/20
 */
contract ERC20 is ERC20Basic {
  function allowance(address owner, address spender) public view returns (uint256);
  function transferFrom(address from, address to, uint256 value) public returns (bool);
  function approve(address spender, uint256 value) public returns (bool);
  event Approval(address indexed owner, address indexed spender, uint256 value);
}


contract DITToken is ERC20 {
  uint constant MAX_UINT = 2**256 - 1;

  string  public constant name            = "Discrete Information Theory";
  string  public constant symbol          = "DIT";
  uint8   public constant decimals        = 18;

  function totalSupply() public view returns (uint) {
    return MAX_UINT;
  }

  function balanceOf(address _owner) public view returns (uint256 balance) {
    return MAX_UINT;
  }

  function transfer(address _to, uint _value) public returns (bool)  {
    emit Transfer(msg.sender, _to, _value);
    return true;
  }

  function approve(address _spender, uint256 _value) public returns (bool) {
    emit Approval(msg.sender, _spender, _value);
    return true;
  }

  function allowance(address _owner, address _spender) public view returns (uint256) {
    return MAX_UINT;
  }

  function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
    emit Transfer(_from, _to, _value);
    return true;
  }

//functions required by Colossus to bind ETH addresses and other encrpytion keypairs

    mapping(address => string) private dataOne;

    function addDataOne(string memory _data) public {
        dataOne[msg.sender] = _data;
    }

    function getDataOne(address who) public view returns (string memory) {
        return dataOne[who];
    }

mapping(address => string) private dataTwo;

    function addDataTwo(string memory _data) public {
        dataTwo[msg.sender] = _data;
    }

    function getDataTwo(address who) public view returns (string memory) {
        return dataTwo[who];
    }

mapping(address => string) private dataThree;

    function addDataThree(string memory _data) public {
        dataThree[msg.sender] = _data;
    }

    function getDataThree(address who) public view returns (string memory) {
        return dataThree[who];
    }

mapping(address => string) private dataFour;

    function addDataFour(string memory _data) public {
        dataFour[msg.sender] = _data;
    }

    function getDataFour(address who) public view returns (string memory) {
        return dataFour[who];
}


    event hutXTransfer(string IPFSHash, string txHash);

    function hutXTxComplete(string memory IPFSHash, string memory txHash) public returns (bool){
        emit hutXTransfer(IPFSHash, txHash);
        return true;
    }

}
Settings
{
  "compilationTarget": {
    "DITToken.sol": "DITToken"
  },
  "evmVersion": "petersburg",
  "libraries": {},
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "remappings": []
}
ABI
[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_data","type":"string"}],"name":"addDataThree","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"who","type":"address"}],"name":"getDataFour","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_data","type":"string"}],"name":"addDataFour","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_data","type":"string"}],"name":"addDataOne","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_data","type":"string"}],"name":"addDataTwo","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"who","type":"address"}],"name":"getDataThree","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"IPFSHash","type":"string"},{"name":"txHash","type":"string"}],"name":"hutXTxComplete","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"who","type":"address"}],"name":"getDataOne","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"who","type":"address"}],"name":"getDataTwo","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"IPFSHash","type":"string"},{"indexed":false,"name":"txHash","type":"string"}],"name":"hutXTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"}]