Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0x9c12d9b1223130B641154d8d3DB35F91D81c8dfd
Balance 0 ETH
Nonce 1
Code Size 10156 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

10156 bytes
0x608060405234801561001057600080fd5b506004361061014d5760003560e01c80635294d0e8116100c357806395d89b411161007c57806395d89b411461078a578063a9059cbb1461080d578063a9dab16714610873578063ab4a2eb3146108c3578063d71be8db1461091b578063dd62ed3e1461098f5761014d565b80635294d0e8146105395780635a3b7e421461059b5780635ca48d8c1461061e57806370a082311461068057806371d66f00146106d857806381fc4d901461073a5761014d565b80632e82aaf2116101155780632e82aaf21461034b5780632f6c493c146103a5578063313ce567146103fd57806342966c68146104215780634b0ee02a146104675780634cb5465f146104bf5761014d565b806306fdde0314610152578063095ea7b3146101d5578063179e91f11461023b57806318160ddd146102a757806323b872dd146102c5575b600080fd5b61015a610a07565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561019a57808201518184015260208101905061017f565b50505050905090810190601f1680156101c75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610221600480360360408110156101eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610aa5565b604051808215151515815260200191505060405180910390f35b6102916004803603606081101561025157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050610b97565b6040518082815260200191505060405180910390f35b6102af610c52565b6040518082815260200191505060405180910390f35b610331600480360360608110156102db57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c58565b604051808215151515815260200191505060405180910390f35b61038b6004803603606081101561036157600080fd5b81019080803590602001909291908035906020019092919080359060200190929190505050610fd8565b604051808215151515815260200191505060405180910390f35b6103e7600480360360208110156103bb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112bf565b6040518082815260200191505060405180910390f35b6104056115d5565b604051808260ff1660ff16815260200191505060405180910390f35b61044d6004803603602081101561043757600080fd5b81019080803590602001909291905050506115e8565b604051808215151515815260200191505060405180910390f35b6104a96004803603602081101561047d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061174b565b6040518082815260200191505060405180910390f35b61051f600480360360808110156104d557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611864565b604051808215151515815260200191505060405180910390f35b6105856004803603604081101561054f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611b4c565b6040518082815260200191505060405180910390f35b6105a3611c71565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105e35780820151818401526020810190506105c8565b50505050905090810190601f1680156106105780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61066a6004803603604081101561063457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611d0f565b6040518082815260200191505060405180910390f35b6106c26004803603602081101561069657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611dd3565b6040518082815260200191505060405180910390f35b610724600480360360408110156106ee57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611deb565b6040518082815260200191505060405180910390f35b6107706004803603604081101561075057600080fd5b810190808035906020019092919080359060200190929190505050611e19565b604051808215151515815260200191505060405180910390f35b61079261204b565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156107d25780820151818401526020810190506107b7565b50505050905090810190601f1680156107ff5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6108596004803603604081101561082357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506120e9565b604051808215151515815260200191505060405180910390f35b6108a96004803603604081101561088957600080fd5b8101908080359060200190929190803590602001909291905050506122d0565b604051808215151515815260200191505060405180910390f35b610905600480360360208110156108d957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506124f7565b6040518082815260200191505060405180910390f35b6109676004803603604081101561093157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506125ce565b6040518084815260200183815260200182151515158152602001935050505060405180910390f35b6109f1600480360360408110156109a557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612612565b6040518082815260200191505060405180910390f35b60008054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610a9d5780601f10610a7257610100808354040283529160200191610a9d565b820191906000526020600020905b815481529060010190602001808311610a8057829003601f168201915b505050505081565b600081600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b600081600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000858152602001908152602001600020600101541115610c4b57600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008481526020019081526020016000206000015490505b9392505050565b60035481565b600081600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610ca657600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610d2f57600080fd5b610d8182600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461263790919063ffffffff16565b600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e1682600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546126c090919063ffffffff16565b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610ee882600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461263790919063ffffffff16565b600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b600080610fee83426126c090919063ffffffff16565b90506000610ffc3387611d0f565b1461106f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f546f6b656e7320616c7265616479206c6f636b6564000000000000000000000081525060200191505060405180910390fd5b60008414156110e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f416d6f756e742063616e206e6f7420626520300000000000000000000000000081525060200191505060405180910390fd5b6000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008781526020019081526020016000206000015414156111ac57600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208590806001815401808255809150509060018203906000526020600020016000909192909190915055505b6111b630856120e9565b50604051806060016040528085815260200182815260200160001515815250600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000878152602001908152602001600020600082015181600001556020820151816001015560408201518160020160006101000a81548160ff021916908315150217905550905050843373ffffffffffffffffffffffffffffffffffffffff167fea90ef40963535482537f0689e05cb8d259e459ebd21530e826702294d0eafdd8684604051808381526020018281526020019250505060405180910390a360019150509392505050565b60008060008090505b600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490508110156115015761137084600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020838154811061136057fe5b9060005260206000200154611b4c565b915060008211156114f45761138e82846126c090919063ffffffff16565b92506001600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000600760008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020848154811061141d57fe5b9060005260206000200154815260200190815260200160002060020160006101000a81548160ff021916908315150217905550600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020818154811061149a57fe5b90600052602060002001548473ffffffffffffffffffffffffffffffffffffffff167f11f87fd5adcd05786919b8b868f59a70d78ae4eb6f305c5927f9c5b1659841a4846040518082815260200191505060405180910390a35b80806001019150506112c8565b5060008211156115cf573073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb84846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561159257600080fd5b505af11580156115a6573d6000803e3d6000fd5b505050506040513d60208110156115bc57600080fd5b8101908080519060200190929190505050505b50919050565b600460009054906101000a900460ff1681565b600081600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561163657600080fd5b600082101561164457600080fd5b61169682600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461263790919063ffffffff16565b600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506116ee8260035461263790919063ffffffff16565b6003819055503373ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a260019050919050565b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008090505b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054905081101561185e5761184f61184084600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020848154811061183057fe5b9060005260206000200154611d0f565b836126c090919063ffffffff16565b91508080600101915050611795565b50919050565b60008061187a83426126c090919063ffffffff16565b905060006118888787611d0f565b146118fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f546f6b656e7320616c7265616479206c6f636b6564000000000000000000000081525060200191505060405180910390fd5b6000841415611972576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f416d6f756e742063616e206e6f7420626520300000000000000000000000000081525060200191505060405180910390fd5b6000600860008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000878152602001908152602001600020600001541415611a3857600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208590806001815401808255809150509060018203906000526020600020016000909192909190915055505b611a4230856120e9565b50604051806060016040528085815260200182815260200160001515815250600860008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000878152602001908152602001600020600082015181600001556020820151816001015560408201518160020160006101000a81548160ff021916908315150217905550905050848673ffffffffffffffffffffffffffffffffffffffff167fea90ef40963535482537f0689e05cb8d259e459ebd21530e826702294d0eafdd8684604051808381526020018281526020019250505060405180910390a36001915050949350505050565b600042600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008481526020019081526020016000206001015411158015611c0f5750600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002060020160009054906101000a900460ff16155b15611c6b57600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206000015490505b92915050565b60028054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611d075780601f10611cdc57610100808354040283529160200191611d07565b820191906000526020600020905b815481529060010190602001808311611cea57829003601f168201915b505050505081565b6000600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002060020160009054906101000a900460ff16611dcd57600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206000015490505b92915050565b60056020528060005260406000206000915090505481565b60076020528160005260406000208181548110611e0457fe5b90600052602060002001600091509150505481565b600080611e263385611d0f565b11611e7c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180612749602f913960400191505060405180910390fd5b611e8630836120e9565b50611eed82600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000868152602001908152602001600020600001546126c090919063ffffffff16565b600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600085815260200190815260200160002060000181905550823373ffffffffffffffffffffffffffffffffffffffff167fea90ef40963535482537f0689e05cb8d259e459ebd21530e826702294d0eafdd600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600087815260200190815260200160002060000154600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600088815260200190815260200160002060010154604051808381526020018281526020019250505060405180910390a36001905092915050565b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156120e15780601f106120b6576101008083540402835291602001916120e1565b820191906000526020600020905b8154815290600101906020018083116120c457829003601f168201915b505050505081565b600081600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561213757600080fd5b61218982600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461263790919063ffffffff16565b600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061221e82600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546126c090919063ffffffff16565b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000806122dd3385611d0f565b11612333576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180612749602f913960400191505060405180910390fd5b61239982600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000868152602001908152602001600020600101546126c090919063ffffffff16565b600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600085815260200190815260200160002060010181905550823373ffffffffffffffffffffffffffffffffffffffff167fea90ef40963535482537f0689e05cb8d259e459ebd21530e826702294d0eafdd600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600087815260200190815260200160002060000154600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600088815260200190815260200160002060010154604051808381526020018281526020019250505060405180910390a36001905092915050565b600080600090505b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490508110156125c8576125b96125aa84600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020848154811061259a57fe5b9060005260206000200154611b4c565b836126c090919063ffffffff16565b915080806001019150506124ff565b50919050565b6008602052816000526040600020602052806000526040600020600091509150508060000154908060010154908060020160009054906101000a900460ff16905083565b6006602052816000526040600020602052806000526040600020600091509150505481565b6000828211156126af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525060200191505060405180910390fd5b600082840390508091505092915050565b60008082840190508381101561273e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe546865726520617265206e6f20746f6b656e73206c6f636b656420666f722073706563696669656420726561736f6ea265627a7a72315820e4972ffb7a6f61359d7e28fda71cf3b889a9afd8ea28e39fbab01811f36c767964736f6c634300050b0032

Verified Source Code Partial Match

Compiler: v0.5.11+commit.c082d0b4 EVM: petersburg Optimization: No
InBitToken.sol 390 lines
pragma solidity >= 0.4.5<0.60;

/**
 * @title SafeMath
 * @dev Unsigned math operations with safety checks that revert on error.
 */
library SafeMath {
  /**
  * @dev Multiplies two unsigned integers, reverts on overflow.
  * @notice source:
  * https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/math/SafeMath.sol
  */
  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    // Gas optimization: this is cheaper than requiring 'a' not being zero,
    // but the benefit is lost if 'b' is also tested.
    // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
    if (a == 0) {
      return 0;
    }
    uint256 c = a * b;
    require(c / a == b, "SafeMath: multiplication overflow");
    return c;
  }

  /**
   * @dev Integer division of two unsigned integers truncating the quotient,
   * reverts on division by zero.
   */
  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    // Solidity only automatically asserts when dividing by 0
    require(b > 0, "SafeMath: division by zero");
    uint256 c = a / b;
    // assert(a == b * c + a % b); // There is no case in which this doesn't hold
    return c;
  }

  /**
   * @dev Subtracts two unsigned integers, reverts on overflow
   * (i.e. if subtrahend is greater than minuend).
   */
  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    require(b <= a, "SafeMath: subtraction overflow");
    uint256 c = a - b;
    return c;
  }

  /**
   * @dev Adds two unsigned integers, reverts on overflow.
   */
  function add(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a + b;
    require(c >= a, "SafeMath: addition overflow");
    return c;
  }

  /**
   * @dev Divides two unsigned integers and returns the remainder
   *(unsigned integer modulo), reverts when dividing by zero.
   */
  function mod(uint256 a, uint256 b) internal pure returns (uint256) {
    require(b != 0, "SafeMath: modulo by zero");
    return a % b;
  }
}

/*
ERC-20 token
EIP-1132 locking functions
Burn function
*/
contract InBitToken {

  using SafeMath for uint;

  string public name = 'InBit Token';
  string public symbol = 'InBit';
  string public standard = 'InBit Token v1.0';
  uint256 public totalSupply;
  uint8 public decimals;

  // @dev Records data of all the tokens transferred
  // @param _from Address that sends tokens
  // @param _to Address that receives tokens
  // @param _value the amount that _spender can spend on behalf of _owner
  event Transfer(
    address indexed _from,
    address indexed _to,
    uint256 _value
  );

  // @dev Records data of an Approval to spend the tokens on behalf of
  // @param _owner address that approves to pay on its behalf
  // @param _spender address to whom the approval is issued
  // @param _value the amount that _spender can spend on behalf of _owner

  event Approval(
    address indexed _owner,
    address indexed _spender,
    uint256 _value
  );

  //@dev Records the burn of tokens from a specific address
  // @param _from address that burns the tokens from its balance
  // @param _value the number of tokens that are being burned
  event Burn(
    address indexed _from,
    uint256 _value
  );

  //@dev Records data of all the tokens locked
  //@param _of address that has tokens locked
  //@param _reason the reason explaining why these tokens are locked
  //@param _amount the number of tokens being locked
  //@param _validity time in seconds tokens will be locked for
  event Locked(
    address indexed _of,
    bytes32 indexed _reason,
    uint256 _amount,
    uint256 _validity
  );

  //@dev Records data of all the tokens unlocked
  //@param _of address for whom the tokens are unlocked
  //@param _reason the reason explaining why these tokens were locked
  //@param _amount the number of tokens being unlocked
  event Unlocked(
    address indexed _of,
    bytes32 indexed _reason,
    uint256 _amount
  );

  //@dev mapping array for keeping the balances of all the accounts
  mapping(address => uint256) public balanceOf;

  //@dev amping array that keeps the allowance that is still allowed to withdraw from _owner
  mapping(address => mapping(address => uint256)) public allowance;
  //@notice account A approved account B to send C tokens (amount C is actually left )

  //@dev reasons why tokens have been locked
  mapping(address => bytes32[]) public lockReason;

  //@dev holds number & validity of tokens locked for a given reason for a specified address
  //@notice tokens locked for A account with B reason and C data: structure {ammount, valididty, claimed}
  mapping(address => mapping(bytes32 => lockToken)) public locked;

  // @dev locked token structure
  // @param amount - the amount of tokens lockedToken
  // @param validity - timestamp until when the tokes are locked
  // @param claimed - where the locked tokens already claimed
  // (unlocked and transferred to the address)
  struct lockToken {
    uint256 amount;
    uint256 validity;
    bool claimed;
  }

  constructor(uint256 _intialSupply, uint8 _intialDecimals)
    public
  {
    balanceOf[msg.sender] = _intialSupply;
    totalSupply = _intialSupply;
    decimals = _intialDecimals;
  }


  // @dev Transfers tokens from sender account to
  // @param _from Address that sends tokens
  // @param _to Address that receives tokens
  // @param _value the amount that _spender can spend on behalf of _owner
  function transfer(address _to, uint256 _value)
    public
    returns(bool success)
  {
    require(balanceOf[msg.sender] >= _value);
    balanceOf[msg.sender] = balanceOf[msg.sender].sub(_value);
    balanceOf[_to] = balanceOf[_to].add(_value);
    emit Transfer(msg.sender, _to, _value);
    return true;
  }

  // @dev Allows _spender to withdraw from [msg.sender] account multiple times,
  // up to the _value amount.
  // @param _spender address to whom the approval is issued
  // @param _value the amount that _spender can spend on behalf of _owner
  // @notice If this function is called again it overwrites the current allowance
  // with _value.
  function approve(address _spender, uint256 _value)
    public
    returns(bool success)
  {
    allowance[msg.sender][_spender] = _value;
    emit Approval(msg.sender, _spender, _value);
    return true;
  }

  // @dev Transfers tokens on behalf of _form account to _to account. [msg.sender]
  // should have an allowance from _from account to transfer the number of tokens.
  // @param _from address tokens are transferred from
  // @param _to address tokens are transferred to
  // @parram _value the number of tokens transferred
  // @notice _from account should have enough tokens and allowance should be equal
  // or greater than the amount transferred
  function transferFrom(address _from, address _to, uint256 _value)
    public
    returns(bool success)
  {
    require(balanceOf[_from] >= _value);
    require(allowance[_from][msg.sender] >= _value);
    balanceOf[_from] = balanceOf[_from].sub(_value);
    balanceOf[_to] = balanceOf[_to].add(_value);
    allowance[_from][msg.sender] = allowance[_from][msg.sender].sub(_value);
    emit Transfer(_from, _to, _value);
    return true;
  }

  // @notice Functions used for locking the tokens go next
  // @dev Locks a specified amount of tokens against an [msg.sender] address,
  // for a specified reason and time
  // @param _reason The reason to lock tokens
  // @param _amount Number of tokens to be locked
  // @param _time Lock time in seconds
  function lock(bytes32 _reason, uint256 _amount, uint256 _time)
  public
  returns (bool)
  {
    uint256 validUntil = now.add(_time);
    require(tokensLocked(msg.sender, _reason) == 0, 'Tokens already locked');
    // If tokens are already locked, then functions extendLock or
    // increaseLockAmount should be used to make any changes
    require(_amount != 0, 'Amount can not be 0');
    if (locked[msg.sender][_reason].amount == 0)
      lockReason[msg.sender].push(_reason);
    transfer(address(this), _amount);
    locked[msg.sender][_reason] = lockToken(_amount, validUntil, false);
    emit Locked(msg.sender, _reason, _amount, validUntil);
    return true;
  }

  // @dev Transfers from [msg.sender] account and locks against specified address
  // a specified amount of tokens, for a specified reason and time
  // @param _to Address against which tokens have to be locked (to which address
  // should be transferred after unlocking and claiming)
  // @param _reason The reason to lock tokens
  // @param _amount Number of tokens to be transferred and locked
  // @param _time Lock time in seconds
  function transferWithLock(
    address _to,
    bytes32 _reason,
    uint256 _amount,
    uint256 _time
  )
    public
    returns (bool)
  {
    uint256 validUntil = now.add(_time);
    require(tokensLocked(_to, _reason) == 0, 'Tokens already locked');
    require(_amount != 0, 'Amount can not be 0');
    if (locked[_to][_reason].amount == 0)
      lockReason[_to].push(_reason);
    transfer(address(this), _amount);
    locked[_to][_reason] = lockToken(_amount, validUntil, false);
    emit Locked(_to, _reason, _amount, validUntil);
    return true;
  }

  // @notice Functions used for increasing the number or time of locked tokens go next
  // @dev Extends the time of lock for tokens already locked for a specific reason
  // @param _reason The reason tokens are locked for.
  // @param _time Desirable lock extension time in seconds
  function extendLock(bytes32 _reason, uint256 _time)
    public
    returns (bool)
  {
    require(tokensLocked(msg.sender, _reason) > 0, 'There are no tokens locked for specified reason');
    locked[msg.sender][_reason].validity = locked[msg.sender][_reason].validity.add(_time);
    emit Locked(msg.sender, _reason, locked[msg.sender][_reason].amount, locked[msg.sender][_reason].validity);
    return true;
  }

  // @dev Increase number of tokens already locked for a specified reason
  // @param _reason The reason tokens are locked for.
  // @param _amount Number of tokens to be increased
  function increaseLockAmount(bytes32 _reason, uint256 _amount) public returns (bool)
  {
    require(tokensLocked(msg.sender, _reason) > 0, 'There are no tokens locked for specified reason');
    transfer(address(this), _amount);
    locked[msg.sender][_reason].amount = locked[msg.sender][_reason].amount.add(_amount);
    emit Locked(msg.sender, _reason, locked[msg.sender][_reason].amount, locked[msg.sender][_reason].validity);
    return true;
  }

  // @notice Function used for unlocking tokens goes next
  // @dev Unlocks the unlockable tokens of a specified address
  // @param _of Address of user, claiming back unlockable tokens
  function unlock(address _of) public returns (uint256 unlockableTokens) {
    uint256 lockedTokens;
    for (uint256 i = 0; i < lockReason[_of].length; i++) {
      lockedTokens = tokensUnlockable(_of, lockReason[_of][i]);
      if (lockedTokens > 0) {
        unlockableTokens = unlockableTokens.add(lockedTokens);
        locked[_of][lockReason[_of][i]].claimed = true;
        emit Unlocked(_of, lockReason[_of][i], lockedTokens);
      }
    }
    if (unlockableTokens > 0)
      this.transfer(_of, unlockableTokens);
  }

  // @dev Burns the tokens form the [msg.sender] account and reduces the TotalSupply
  // @parram _value the number of tokens to be burned
  function burn(uint256 _value) public returns (bool success)
  {
    require(balanceOf[msg.sender] >= _value);
    require(_value >= 0);
    balanceOf[msg.sender] = balanceOf[msg.sender].sub(_value);
    totalSupply = totalSupply.sub(_value);
    emit Burn(msg.sender, _value);
    return true;
  }

  //@notice The end of standard ERC-20 functions
  //@noitce Further goes additional function from ERC1132 and burn function
  //@dev Returns tokens locked for a specified address for a specified reason
  //@param _of the address being checked
  //@param _reason the reason balance of locked tokens is checked for (how many tokens are locked for a specified reason)
  //@noitce this function shows the number of unclaimed tokens for the _of address at the moment. It shows as locked as well as unlockable but not yet claimed tokens
  function tokensLocked(address _of, bytes32 _reason)
    public
    view
    returns (uint256 amount)
  {
    if (!locked[_of][_reason].claimed)
    amount = locked[_of][_reason].amount;
  }

  // @dev Returns tokens locked for a specified address for a specified reason at a specific time
  // @param _of the address being checked
  // @param _reason the reason balance of locked tokens is checked for (how many tokens will be locked for a specified reason)
  // @param _time the future timestamp balance of locked tokens is checked for (how many tokens will be locked for a specified reason at a specified timestamp)
  // @noitce this function shows the number of unclaimed tokens for the _of address at the moment in future defined in a _time parameter. It shows only locked tokens.
  // The difference with tokensLocked is because of tokensLocked shows the amount at the current moment and calculates both locked and unlockable but not yet claimed tokes at the moment.
  // In the future, we cannot predict the behavior of the user and can show only locked ones.
  function tokensLockedAtTime(address _of, bytes32 _reason, uint256 _time)
    public
    view
    returns (uint256 amount)
  {
    if (locked[_of][_reason].validity > _time)
    amount = locked[_of][_reason].amount;
  }

  // @dev Returns total number of tokens held by an address (locked + unlockable but not yet claimed + transferable)
  // @param _of The address to query the total balance of
  function totalBalanceOf(address _of)
    public
    view
    returns (uint256 amount)
  {
    amount = balanceOf[_of];
    for (uint256 i = 0; i < lockReason[_of].length; i++) {
      amount = amount.add(tokensLocked(_of, lockReason[_of][i]));
    }
  }

  // @dev Returns the amount of unlockable tokens for a specified address for a specified reason
  // @param _of The address being checked
  // @param _reason The reason number of unlockable tokens is checked for
  // @notice How many tokens are unlockable for a specified reason for a specified address
  function tokensUnlockable(address _of, bytes32 _reason)
    public
    view
    returns (uint256 amount)
  {
    if (locked[_of][_reason].validity <= now && !locked[_of][_reason].claimed){
      amount = locked[_of][_reason].amount;
    }
  }

  // @dev Returns the total amount of all unlockable tokens for a specified address.
  // @param _of The address to query the unlockable token count of
  function getUnlockableTokens(address _of)
    public
    view
    returns (uint256 unlockableTokens)
  {
    for (uint256 i = 0; i < lockReason[_of].length; i++) {
      unlockableTokens = unlockableTokens.add(tokensUnlockable(_of, lockReason[_of][i]));
    }
  }
}

Read Contract

allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint8
getUnlockableTokens 0xab4a2eb3 → uint256
lockReason 0x71d66f00 → bytes32
locked 0xd71be8db → uint256, uint256, bool
name 0x06fdde03 → string
standard 0x5a3b7e42 → string
symbol 0x95d89b41 → string
tokensLocked 0x5ca48d8c → uint256
tokensLockedAtTime 0x179e91f1 → uint256
tokensUnlockable 0x5294d0e8 → uint256
totalBalanceOf 0x4b0ee02a → uint256
totalSupply 0x18160ddd → uint256

Write Contract 9 functions

These functions modify contract state and require a wallet transaction to execute.

approve 0x095ea7b3
address _spender
uint256 _value
returns: bool
burn 0x42966c68
uint256 _value
returns: bool
extendLock 0xa9dab167
bytes32 _reason
uint256 _time
returns: bool
increaseLockAmount 0x81fc4d90
bytes32 _reason
uint256 _amount
returns: bool
lock 0x2e82aaf2
bytes32 _reason
uint256 _amount
uint256 _time
returns: bool
transfer 0xa9059cbb
address _to
uint256 _value
returns: bool
transferFrom 0x23b872dd
address _from
address _to
uint256 _value
returns: bool
transferWithLock 0x4cb5465f
address _to
bytes32 _reason
uint256 _amount
uint256 _time
returns: bool
unlock 0x2f6c493c
address _of
returns: uint256

Recent Transactions

No transactions found for this address