Feature Tip: Add private address tag to any address under My Name Tag !
ERC-20
Rent
Overview
Max Total Supply
9,160,999,000 BTR
Holders
16,390 (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:
BitsrentToken
Compiler Version
v0.4.25+commit.59dbf8f1
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2018-10-07 */ pragma solidity ^0.4.24; /** * @title SafeMath * @dev Math operations with safety checks that revert on error */ library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ 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); return c; } /** * @dev Integer division of two numbers truncating the quotient, reverts on division by zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0); // Solidity only automatically asserts 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; } /** * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a); uint256 c = a - b; return c; } /** * @dev Adds two numbers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a); return c; } /** * @dev Divides two numbers 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); return a % b; } } /** * @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; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() 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) onlyOwner public { require(newOwner != address(0)); owner = newOwner; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); event Transfer( address indexed from, address indexed to, uint256 value ); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract ERC20 is IERC20,Ownable { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; //Freeze parameter mapping (address => bool) private _frozenAccount; // This notifies about accounts locked event FrozenFunds(address target, bool frozen); /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { return _totalSupply; } /** * @dev Gets the balance of the specified address. * @param owner The address to query the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address owner) public view returns (uint256) { return _balances[owner]; } /** * @dev Gets the freeze state of the specified address. * @param _address The address to query the freeze state of. * @return An bool representing the state of freeze. */ function isAccountFreezed(address _address) public view returns (bool) { return _frozenAccount[_address]; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param owner address The address which owns the funds. * @param spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance( address owner, address spender ) public view returns (uint256) { return _allowed[owner][spender]; } /** * @dev Transfer token for a specified address * @param to The address to transfer to. * @param value The amount to be transferred. */ function transfer(address to, uint256 value) public returns (bool) { require(value <= _balances[msg.sender]); require(!_frozenAccount[msg.sender]); //sender should not be frozen Account require(!_frozenAccount[to]); //receiver should not be frozen Account require(to != address(0)); _balances[msg.sender] = _balances[msg.sender].sub(value); _balances[to] = _balances[to].add(value); emit Transfer(msg.sender, to, value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. */ function approve(address spender, uint256 value) public returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = value; emit Approval(msg.sender, spender, value); return true; } /** * @dev Transfer tokens from one address to another * @param from address The address which you want to send tokens from * @param to address The address which you want to transfer to * @param value uint256 the amount of tokens to be transferred */ function transferFrom( address from, address to, uint256 value ) public returns (bool) { require(value <= _balances[from]); require(value <= _allowed[from][msg.sender]); require(!_frozenAccount[from]); //sender should not be frozen Account require(!_frozenAccount[to]); //receiver should not be frozen Account require(to != address(0)); _balances[from] = _balances[from].sub(value); _balances[to] = _balances[to].add(value); _allowed[from][msg.sender] = _allowed[from][msg.sender].sub(value); emit Transfer(from, to, value); return true; } /** * @dev Internal function that mints an amount of the token and assigns it to * an account. This encapsulates the modification of balances such that the * proper events are emitted. * @param account The account that will receive the created tokens. * @param amount The amount that will be created. */ function _mint(address account, uint256 amount) internal { require(account != 0); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } /** * @dev Internal function that burns an amount of the token of a given * account. * @param account The account whose tokens will be burnt. * @param amount The amount that will be burnt. */ function _burn(address account, uint256 amount) internal { require(account != 0); require(amount <= _balances[account]); _totalSupply = _totalSupply.sub(amount); _balances[account] = _balances[account].sub(amount); emit Transfer(account, address(0), amount); } /** * @dev Freezes the account from transferring tokens from own address to another * @param target The account which will be freezed. * @param freeze The decision to freeze. */ function _freezeAccount(address target, bool freeze) internal { _frozenAccount[target] = freeze; emit FrozenFunds(target, freeze); } } contract BitsrentToken is ERC20{ string public constant name = "Bitsrent"; string public constant symbol = "BTR"; uint8 public constant decimals = 18; //supply is 20 Billion uint256 public constant INITIAL_SUPPLY=20000000000*(10 ** uint256(decimals)); /** * @dev Constructor that gives msg.sender all of existing tokens. * minted only during contract initialization */ constructor() public { _mint(msg.sender, INITIAL_SUPPLY); } /** * @dev function that burns an amount of the token of a given * account. * @param amount The amount that will be burnt. **/ function burnToken( uint256 amount) public { _burn(msg.sender,amount); } /** * @dev Freezes the account from transferring tokens from own address to another * can be called by owner only **/ function freeze(address freezingAddress,bool decision) onlyOwner public { _freezeAccount(freezingAddress,decision); } }
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":"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":true,"inputs":[{"name":"_address","type":"address"}],"name":"isAccountFreezed","outputs":[{"name":"","type":"bool"}],"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":true,"inputs":[],"name":"INITIAL_SUPPLY","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","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":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"burnToken","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":false,"inputs":[{"name":"freezingAddress","type":"address"},{"name":"decision","type":"bool"}],"name":"freeze","outputs":[],"payable":false,"stateMutability":"nonpayable","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":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":"target","type":"address"},{"indexed":false,"name":"frozen","type":"bool"}],"name":"FrozenFunds","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":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"}]
Contract Creation Code
608060405234801561001057600080fd5b5060008054600160a060020a03191633908117909155610045906b409f9cbc7c4a04c22000000064010000000061004a810204565b61011d565b600160a060020a038216151561005f57600080fd5b600354610079908264010000000061086b61010482021704565b600355600160a060020a0382166000908152600160205260409020546100ac908264010000000061086b61010482021704565b600160a060020a03831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b60008282018381101561011657600080fd5b9392505050565b6109e48061012c6000396000f3006080604052600436106100da5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100df578063095ea7b31461016957806318160ddd146101a157806323000e4b146101c857806323b872dd146101e95780632ff2e9dc14610213578063313ce5671461022857806370a08231146102535780637b47ec1a146102745780638da5cb5b1461028e57806395d89b41146102bf578063a9059cbb146102d4578063bf120ae5146102f8578063dd62ed3e1461031e578063f2fde38b14610345575b600080fd5b3480156100eb57600080fd5b506100f4610366565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561012e578181015183820152602001610116565b50505050905090810190601f16801561015b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561017557600080fd5b5061018d600160a060020a036004351660243561039d565b604080519115158252519081900360200190f35b3480156101ad57600080fd5b506101b661041b565b60408051918252519081900360200190f35b3480156101d457600080fd5b5061018d600160a060020a0360043516610421565b3480156101f557600080fd5b5061018d600160a060020a036004358116906024351660443561043f565b34801561021f57600080fd5b506101b6610602565b34801561023457600080fd5b5061023d610612565b6040805160ff9092168252519081900360200190f35b34801561025f57600080fd5b506101b6600160a060020a0360043516610617565b34801561028057600080fd5b5061028c600435610632565b005b34801561029a57600080fd5b506102a361063f565b60408051600160a060020a039092168252519081900360200190f35b3480156102cb57600080fd5b506100f461064e565b3480156102e057600080fd5b5061018d600160a060020a0360043516602435610685565b34801561030457600080fd5b5061028c600160a060020a036004351660243515156107a9565b34801561032a57600080fd5b506101b6600160a060020a03600435811690602435166107ce565b34801561035157600080fd5b5061028c600160a060020a03600435166107f9565b60408051808201909152600881527f4269747372656e74000000000000000000000000000000000000000000000000602082015281565b6000600160a060020a03831615156103b457600080fd5b336000818152600260209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b60035490565b600160a060020a031660009081526004602052604090205460ff1690565b600160a060020a03831660009081526001602052604081205482111561046457600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561049457600080fd5b600160a060020a03841660009081526004602052604090205460ff16156104ba57600080fd5b600160a060020a03831660009081526004602052604090205460ff16156104e057600080fd5b600160a060020a03831615156104f557600080fd5b600160a060020a03841660009081526001602052604090205461051e908363ffffffff61085416565b600160a060020a038086166000908152600160205260408082209390935590851681522054610553908363ffffffff61086b16565b600160a060020a038085166000908152600160209081526040808320949094559187168152600282528281203382529091522054610597908363ffffffff61085416565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b6b409f9cbc7c4a04c22000000081565b601281565b600160a060020a031660009081526001602052604090205490565b61063c3382610884565b50565b600054600160a060020a031681565b60408051808201909152600381527f4254520000000000000000000000000000000000000000000000000000000000602082015281565b336000908152600160205260408120548211156106a157600080fd5b3360009081526004602052604090205460ff16156106be57600080fd5b600160a060020a03831660009081526004602052604090205460ff16156106e457600080fd5b600160a060020a03831615156106f957600080fd5b33600090815260016020526040902054610719908363ffffffff61085416565b3360009081526001602052604080822092909255600160a060020a0385168152205461074b908363ffffffff61086b16565b600160a060020a0384166000818152600160209081526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b600054600160a060020a031633146107c057600080fd5b6107ca8282610954565b5050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600054600160a060020a0316331461081057600080fd5b600160a060020a038116151561082557600080fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000808383111561086457600080fd5b5050900390565b60008282018381101561087d57600080fd5b9392505050565b600160a060020a038216151561089957600080fd5b600160a060020a0382166000908152600160205260409020548111156108be57600080fd5b6003546108d1908263ffffffff61085416565b600355600160a060020a0382166000908152600160205260409020546108fd908263ffffffff61085416565b600160a060020a0383166000818152600160209081526040808320949094558351858152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35050565b600160a060020a038216600081815260046020908152604091829020805460ff191685151590811790915582519384529083015280517f48335238b4855f35377ed80f164e8c6f3c366e54ac00b96a6402d4a9814a03a59281900390910190a150505600a165627a7a7230582001a26533d3b85afff622cb38d5037213f06f515380e77556ad136e4005543d630029
Deployed Bytecode
0x6080604052600436106100da5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100df578063095ea7b31461016957806318160ddd146101a157806323000e4b146101c857806323b872dd146101e95780632ff2e9dc14610213578063313ce5671461022857806370a08231146102535780637b47ec1a146102745780638da5cb5b1461028e57806395d89b41146102bf578063a9059cbb146102d4578063bf120ae5146102f8578063dd62ed3e1461031e578063f2fde38b14610345575b600080fd5b3480156100eb57600080fd5b506100f4610366565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561012e578181015183820152602001610116565b50505050905090810190601f16801561015b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561017557600080fd5b5061018d600160a060020a036004351660243561039d565b604080519115158252519081900360200190f35b3480156101ad57600080fd5b506101b661041b565b60408051918252519081900360200190f35b3480156101d457600080fd5b5061018d600160a060020a0360043516610421565b3480156101f557600080fd5b5061018d600160a060020a036004358116906024351660443561043f565b34801561021f57600080fd5b506101b6610602565b34801561023457600080fd5b5061023d610612565b6040805160ff9092168252519081900360200190f35b34801561025f57600080fd5b506101b6600160a060020a0360043516610617565b34801561028057600080fd5b5061028c600435610632565b005b34801561029a57600080fd5b506102a361063f565b60408051600160a060020a039092168252519081900360200190f35b3480156102cb57600080fd5b506100f461064e565b3480156102e057600080fd5b5061018d600160a060020a0360043516602435610685565b34801561030457600080fd5b5061028c600160a060020a036004351660243515156107a9565b34801561032a57600080fd5b506101b6600160a060020a03600435811690602435166107ce565b34801561035157600080fd5b5061028c600160a060020a03600435166107f9565b60408051808201909152600881527f4269747372656e74000000000000000000000000000000000000000000000000602082015281565b6000600160a060020a03831615156103b457600080fd5b336000818152600260209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b60035490565b600160a060020a031660009081526004602052604090205460ff1690565b600160a060020a03831660009081526001602052604081205482111561046457600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561049457600080fd5b600160a060020a03841660009081526004602052604090205460ff16156104ba57600080fd5b600160a060020a03831660009081526004602052604090205460ff16156104e057600080fd5b600160a060020a03831615156104f557600080fd5b600160a060020a03841660009081526001602052604090205461051e908363ffffffff61085416565b600160a060020a038086166000908152600160205260408082209390935590851681522054610553908363ffffffff61086b16565b600160a060020a038085166000908152600160209081526040808320949094559187168152600282528281203382529091522054610597908363ffffffff61085416565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b6b409f9cbc7c4a04c22000000081565b601281565b600160a060020a031660009081526001602052604090205490565b61063c3382610884565b50565b600054600160a060020a031681565b60408051808201909152600381527f4254520000000000000000000000000000000000000000000000000000000000602082015281565b336000908152600160205260408120548211156106a157600080fd5b3360009081526004602052604090205460ff16156106be57600080fd5b600160a060020a03831660009081526004602052604090205460ff16156106e457600080fd5b600160a060020a03831615156106f957600080fd5b33600090815260016020526040902054610719908363ffffffff61085416565b3360009081526001602052604080822092909255600160a060020a0385168152205461074b908363ffffffff61086b16565b600160a060020a0384166000818152600160209081526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b600054600160a060020a031633146107c057600080fd5b6107ca8282610954565b5050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600054600160a060020a0316331461081057600080fd5b600160a060020a038116151561082557600080fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000808383111561086457600080fd5b5050900390565b60008282018381101561087d57600080fd5b9392505050565b600160a060020a038216151561089957600080fd5b600160a060020a0382166000908152600160205260409020548111156108be57600080fd5b6003546108d1908263ffffffff61085416565b600355600160a060020a0382166000908152600160205260409020546108fd908263ffffffff61085416565b600160a060020a0383166000818152600160209081526040808320949094558351858152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35050565b600160a060020a038216600081815260046020908152604091829020805460ff191685151590811790915582519384529083015280517f48335238b4855f35377ed80f164e8c6f3c366e54ac00b96a6402d4a9814a03a59281900390910190a150505600a165627a7a7230582001a26533d3b85afff622cb38d5037213f06f515380e77556ad136e4005543d630029
Swarm Source
bzzr://01a26533d3b85afff622cb38d5037213f06f515380e77556ad136e4005543d63
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.