ERC-20
Land
Overview
Max Total Supply
1,000,000,000 HRBE
Holders
2,259 (0.00%)
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
HarambeeToken
Compiler Version
v0.4.24+commit.e67f0147
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2018-09-05 */ pragma solidity 0.4.24; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * * This contract is used to set admin to the contract which has some additional features such as minting , burning etc * */ contract Owned { address public owner; constructor() public { owner = msg.sender; } modifier onlyOwner { require(msg.sender == owner); _; } /* This function is used to transfer adminship to new owner * @param _newOwner - address of new admin or owner */ function transferOwnership(address _newOwner) onlyOwner public { require(_newOwner != address(0)); owner = _newOwner; } } /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Owned { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { require(paused); _; } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused public { paused = true; emit Pause(); } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused public { paused = false; emit Unpause(); } } /** * This is base ERC20 Contract , basically ERC-20 defines a common list of rules for all Ethereum tokens to follow */ contract ERC20 is Pausable{ using SafeMath for uint256; //This creates an array with all balances mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) public allowed; // public variables of the token string public name; string public symbol; uint8 public decimals = 18; uint256 public totalSupply; // This notifies client about the approval done by owner to spender for a given value event Approval(address indexed owner, address indexed spender, uint256 value); // This notifies client about the approval done event Transfer(address indexed from, address indexed to, uint256 value); constructor (uint256 _initialSupply,string _tokenName, string _tokenSymbol) public { totalSupply = _initialSupply * 10 ** uint256(decimals); // Update total supply with the decimal amount balanceOf[msg.sender] = totalSupply; name = _tokenName; symbol = _tokenSymbol; } /* This function is used to transfer tokens to a particular address * @param _to receiver address where transfer is to be done * @param _value value to be transferred */ function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) { require(balanceOf[msg.sender] > 0); require(balanceOf[msg.sender] >= _value); // Check if the sender has enough require(_to != address(0)); // Prevent transfer to 0x0 address. Use burn() instead require(_value > 0); require(_to != msg.sender); // Check if sender and receiver is not same balanceOf[msg.sender] = balanceOf[msg.sender].sub(_value); // Subtract value from sender balanceOf[_to] = balanceOf[_to].add(_value); // Add the value to the receiver emit Transfer(msg.sender, _to, _value); // Notify all clients about the transfer events return true; } /* Send _value amount of tokens from address _from to address _to * The transferFrom method is used for a withdraw workflow, allowing contracts to send * tokens on your behalf * @param _from address from which amount is to be transferred * @param _to address to which amount is transferred * @param _amount to which amount is transferred */ function transferFrom( address _from, address _to, uint256 _amount ) public whenNotPaused returns (bool success) { require(balanceOf[_from] >= _amount); require(allowed[_from][msg.sender] >= _amount); require(_amount > 0); require(_to != address(0)); require(_from!=_to); balanceOf[_from] = balanceOf[_from].sub(_amount); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_amount); balanceOf[_to] = balanceOf[_to].add(_amount); emit Transfer(_from, _to, _amount); return true; } /* This function allows _spender to withdraw from your account, multiple times, up to the _value amount. * If this function is called again it overwrites the current allowance with _value. * @param _spender address of the spender * @param _amount amount allowed to be withdrawal */ function approve(address _spender, uint256 _amount) public whenNotPaused returns (bool success) { require(msg.sender!=_spender); allowed[msg.sender][_spender] = _amount; emit Approval(msg.sender, _spender, _amount); return true; } /* This function returns the amount of tokens approved by the owner that can be * transferred to the spender's account * @param _owner address of the owner * @param _spender address of the spender */ function allowance(address _owner, address _spender) public constant returns (uint256 remaining) { return allowed[_owner][_spender]; } } //This is the Main Harambee Token Contract derived from the other two contracts Owned and ERC20 contract HarambeeToken is Owned, ERC20 { using SafeMath for uint256; uint256 public tokenSupply = 1000000000; // This notifies clients about the amount burnt , only admin is able to burn the contract event Burn(address from, uint256 value); /* This is the main Token Constructor */ constructor() ERC20 (tokenSupply,"Harambee","HRBE") public { owner = msg.sender; } /** * This function Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public onlyOwner { require(_value <= balanceOf[msg.sender]); // no need to require value <= totalSupply, since that would imply the // sender's balance is greater than the totalSupply, which *should* be an assertion failure address burner = msg.sender; balanceOf[burner] = balanceOf[burner].sub(_value); totalSupply = totalSupply.sub(_value); emit Burn(burner, _value); } /** * This function is used to destroy the contract */ function destroyContract() public onlyOwner{ selfdestruct(owner); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"destroyContract","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_amount","type":"uint256"}],"name":"approve","outputs":[{"name":"success","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":"_amount","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"unpause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_value","type":"uint256"}],"name":"burn","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"allowed","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tokenSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"pause","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":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","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":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"from","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Burn","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"},{"anonymous":false,"inputs":[],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpause","type":"event"}]
Contract Creation Code
60806040526000805460a060020a60ff02191690556005805460ff19166012179055633b9aca0060075534801561003557600080fd5b50600754604080518082018252600881527f486172616d626565000000000000000000000000000000000000000000000000602080830191825283518085018552600481527f48524245000000000000000000000000000000000000000000000000000000008183015260008054600160a060020a03191633908117825560055460ff16600a0a880260068190559082526001909352949094205581519192916100e191600391610111565b5080516100f5906004906020840190610111565b505060008054600160a060020a03191633179055506101ac9050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061015257805160ff191683800117855561017f565b8280016001018555821561017f579182015b8281111561017f578251825591602001919060010190610164565b5061018b92915061018f565b5090565b6101a991905b8082111561018b5760008155600101610195565b90565b610b41806101bb6000396000f3006080604052600436106100fb5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610100578063092a5cce1461018a578063095ea7b3146101a157806318160ddd146101d957806323b872dd14610200578063313ce5671461022a5780633f4ba83a1461025557806342966c681461026a5780635c658165146102825780635c975abb146102a957806370a08231146102be5780637824407f146102df5780638456cb59146102f45780638da5cb5b1461030957806395d89b411461033a578063a9059cbb1461034f578063dd62ed3e14610373578063f2fde38b1461039a575b600080fd5b34801561010c57600080fd5b506101156103bb565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561014f578181015183820152602001610137565b50505050905090810190601f16801561017c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561019657600080fd5b5061019f610449565b005b3480156101ad57600080fd5b506101c5600160a060020a036004351660243561046e565b604080519115158252519081900360200190f35b3480156101e557600080fd5b506101ee610503565b60408051918252519081900360200190f35b34801561020c57600080fd5b506101c5600160a060020a0360043581169060243516604435610509565b34801561023657600080fd5b5061023f6106bc565b6040805160ff9092168252519081900360200190f35b34801561026157600080fd5b5061019f6106c5565b34801561027657600080fd5b5061019f60043561073b565b34801561028e57600080fd5b506101ee600160a060020a0360043581169060243516610807565b3480156102b557600080fd5b506101c5610824565b3480156102ca57600080fd5b506101ee600160a060020a0360043516610834565b3480156102eb57600080fd5b506101ee610846565b34801561030057600080fd5b5061019f61084c565b34801561031557600080fd5b5061031e6108c7565b60408051600160a060020a039092168252519081900360200190f35b34801561034657600080fd5b506101156108d6565b34801561035b57600080fd5b506101c5600160a060020a0360043516602435610931565b34801561037f57600080fd5b506101ee600160a060020a0360043581169060243516610a67565b3480156103a657600080fd5b5061019f600160a060020a0360043516610a92565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104415780601f1061041657610100808354040283529160200191610441565b820191906000526020600020905b81548152906001019060200180831161042457829003601f168201915b505050505081565b600054600160a060020a0316331461046057600080fd5b600054600160a060020a0316ff5b6000805460a060020a900460ff161561048657600080fd5b33600160a060020a038416141561049c57600080fd5b336000818152600260209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b60065481565b6000805460a060020a900460ff161561052157600080fd5b600160a060020a03841660009081526001602052604090205482111561054657600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561057657600080fd5b6000821161058357600080fd5b600160a060020a038316151561059857600080fd5b600160a060020a0384811690841614156105b157600080fd5b600160a060020a0384166000908152600160205260409020546105da908363ffffffff610aed16565b600160a060020a0385166000908152600160209081526040808320939093556002815282822033835290522054610617908363ffffffff610aed16565b600160a060020a03808616600090815260026020908152604080832033845282528083209490945591861681526001909152205461065b908363ffffffff610aff16565b600160a060020a0380851660008181526001602090815260409182902094909455805186815290519193928816927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a35060019392505050565b60055460ff1681565b600054600160a060020a031633146106dc57600080fd5b60005460a060020a900460ff1615156106f457600080fd5b6000805474ff0000000000000000000000000000000000000000191681556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b339190a1565b60008054600160a060020a0316331461075357600080fd5b3360009081526001602052604090205482111561076f57600080fd5b5033600081815260016020526040902054610790908363ffffffff610aed16565b600160a060020a0382166000908152600160205260409020556006546107bc908363ffffffff610aed16565b60065560408051600160a060020a03831681526020810184905281517fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5929181900390910190a15050565b600260209081526000928352604080842090915290825290205481565b60005460a060020a900460ff1681565b60016020526000908152604090205481565b60075481565b600054600160a060020a0316331461086357600080fd5b60005460a060020a900460ff161561087a57600080fd5b6000805474ff0000000000000000000000000000000000000000191660a060020a1781556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff6259190a1565b600054600160a060020a031681565b6004805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104415780601f1061041657610100808354040283529160200191610441565b6000805460a060020a900460ff161561094957600080fd5b336000908152600160205260408120541161096357600080fd5b3360009081526001602052604090205482111561097f57600080fd5b600160a060020a038316151561099457600080fd5b600082116109a157600080fd5b600160a060020a0383163314156109b757600080fd5b336000908152600160205260409020546109d7908363ffffffff610aed16565b3360009081526001602052604080822092909255600160a060020a03851681522054610a09908363ffffffff610aff16565b600160a060020a0384166000818152600160209081526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600054600160a060020a03163314610aa957600080fd5b600160a060020a0381161515610abe57600080fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600082821115610af957fe5b50900390565b600082820183811015610b0e57fe5b93925050505600a165627a7a7230582008ecb0cc34da94fc5153ceaba3b0f715d2bdcbd8808bf72351bccc8936b584900029
Deployed Bytecode
0x6080604052600436106100fb5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610100578063092a5cce1461018a578063095ea7b3146101a157806318160ddd146101d957806323b872dd14610200578063313ce5671461022a5780633f4ba83a1461025557806342966c681461026a5780635c658165146102825780635c975abb146102a957806370a08231146102be5780637824407f146102df5780638456cb59146102f45780638da5cb5b1461030957806395d89b411461033a578063a9059cbb1461034f578063dd62ed3e14610373578063f2fde38b1461039a575b600080fd5b34801561010c57600080fd5b506101156103bb565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561014f578181015183820152602001610137565b50505050905090810190601f16801561017c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561019657600080fd5b5061019f610449565b005b3480156101ad57600080fd5b506101c5600160a060020a036004351660243561046e565b604080519115158252519081900360200190f35b3480156101e557600080fd5b506101ee610503565b60408051918252519081900360200190f35b34801561020c57600080fd5b506101c5600160a060020a0360043581169060243516604435610509565b34801561023657600080fd5b5061023f6106bc565b6040805160ff9092168252519081900360200190f35b34801561026157600080fd5b5061019f6106c5565b34801561027657600080fd5b5061019f60043561073b565b34801561028e57600080fd5b506101ee600160a060020a0360043581169060243516610807565b3480156102b557600080fd5b506101c5610824565b3480156102ca57600080fd5b506101ee600160a060020a0360043516610834565b3480156102eb57600080fd5b506101ee610846565b34801561030057600080fd5b5061019f61084c565b34801561031557600080fd5b5061031e6108c7565b60408051600160a060020a039092168252519081900360200190f35b34801561034657600080fd5b506101156108d6565b34801561035b57600080fd5b506101c5600160a060020a0360043516602435610931565b34801561037f57600080fd5b506101ee600160a060020a0360043581169060243516610a67565b3480156103a657600080fd5b5061019f600160a060020a0360043516610a92565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104415780601f1061041657610100808354040283529160200191610441565b820191906000526020600020905b81548152906001019060200180831161042457829003601f168201915b505050505081565b600054600160a060020a0316331461046057600080fd5b600054600160a060020a0316ff5b6000805460a060020a900460ff161561048657600080fd5b33600160a060020a038416141561049c57600080fd5b336000818152600260209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b60065481565b6000805460a060020a900460ff161561052157600080fd5b600160a060020a03841660009081526001602052604090205482111561054657600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561057657600080fd5b6000821161058357600080fd5b600160a060020a038316151561059857600080fd5b600160a060020a0384811690841614156105b157600080fd5b600160a060020a0384166000908152600160205260409020546105da908363ffffffff610aed16565b600160a060020a0385166000908152600160209081526040808320939093556002815282822033835290522054610617908363ffffffff610aed16565b600160a060020a03808616600090815260026020908152604080832033845282528083209490945591861681526001909152205461065b908363ffffffff610aff16565b600160a060020a0380851660008181526001602090815260409182902094909455805186815290519193928816927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a35060019392505050565b60055460ff1681565b600054600160a060020a031633146106dc57600080fd5b60005460a060020a900460ff1615156106f457600080fd5b6000805474ff0000000000000000000000000000000000000000191681556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b339190a1565b60008054600160a060020a0316331461075357600080fd5b3360009081526001602052604090205482111561076f57600080fd5b5033600081815260016020526040902054610790908363ffffffff610aed16565b600160a060020a0382166000908152600160205260409020556006546107bc908363ffffffff610aed16565b60065560408051600160a060020a03831681526020810184905281517fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5929181900390910190a15050565b600260209081526000928352604080842090915290825290205481565b60005460a060020a900460ff1681565b60016020526000908152604090205481565b60075481565b600054600160a060020a0316331461086357600080fd5b60005460a060020a900460ff161561087a57600080fd5b6000805474ff0000000000000000000000000000000000000000191660a060020a1781556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff6259190a1565b600054600160a060020a031681565b6004805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104415780601f1061041657610100808354040283529160200191610441565b6000805460a060020a900460ff161561094957600080fd5b336000908152600160205260408120541161096357600080fd5b3360009081526001602052604090205482111561097f57600080fd5b600160a060020a038316151561099457600080fd5b600082116109a157600080fd5b600160a060020a0383163314156109b757600080fd5b336000908152600160205260409020546109d7908363ffffffff610aed16565b3360009081526001602052604080822092909255600160a060020a03851681522054610a09908363ffffffff610aff16565b600160a060020a0384166000818152600160209081526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600054600160a060020a03163314610aa957600080fd5b600160a060020a0381161515610abe57600080fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600082821115610af957fe5b50900390565b600082820183811015610b0e57fe5b93925050505600a165627a7a7230582008ecb0cc34da94fc5153ceaba3b0f715d2bdcbd8808bf72351bccc8936b584900029
Swarm Source
bzzr://08ecb0cc34da94fc5153ceaba3b0f715d2bdcbd8808bf72351bccc8936b58490
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.