Address Contract Partially Verified
Address
0x037A54AaB062628C9Bbae1FDB1583c195585fe41
Balance
0 ETH
Nonce
1
Code Size
6490 bytes
Creator
0xc0C704BF...e2b3 at tx 0x2272a83e...34b377
Indexed Transactions
5 (24,436,936 → 24,436,997)
Gas Used (indexed)
188,409
Contract Bytecode
6490 bytes
0x608060405234801561001057600080fd5b506004361061015f576000357c01000000000000000000000000000000000000000000000000000000009004806388d695b2116100d55780639e7bf05f116100995780639e7bf05f14610786578063a457c2d7146107d0578063a9059cbb14610836578063ba7c11a21461089c578063dd62ed3e14610902578063f2fde38b1461097a5761015f565b806388d695b2146104af5780638ca9f786146106135780638da5cb5b146106975780638f32d59b146106e157806395d89b41146107035761015f565b8063313ce56711610127578063313ce5671461034d578063395093511461036b57806342966c68146103d157806370a08231146103ff578063715018a61461045757806379cc6790146104615761015f565b806306fdde031461016457806307f97a3b146101e7578063095ea7b31461024357806318160ddd146102a957806323b872dd146102c7575b600080fd5b61016c6109be565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101ac578082015181840152602081019050610191565b50505050905090810190601f1680156101d95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610229600480360360208110156101fd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109f7565b604051808215151515815260200191505060405180910390f35b61028f6004803603604081101561025957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610a56565b604051808215151515815260200191505060405180910390f35b6102b1610a6d565b6040518082815260200191505060405180910390f35b610333600480360360608110156102dd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610a77565b604051808215151515815260200191505060405180910390f35b610355610b28565b6040518082815260200191505060405180910390f35b6103b76004803603604081101561038157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b2d565b604051808215151515815260200191505060405180910390f35b6103fd600480360360208110156103e757600080fd5b8101908080359060200190929190505050610bd2565b005b6104416004803603602081101561041557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bdf565b6040518082815260200191505060405180910390f35b61045f610c28565b005b6104ad6004803603604081101561047757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610cfa565b005b6105f9600480360360408110156104c557600080fd5b81019080803590602001906401000000008111156104e257600080fd5b8201836020820111156104f457600080fd5b8035906020019184602083028401116401000000008311171561051657600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561057657600080fd5b82018360208201111561058857600080fd5b803590602001918460208302840111640100000000831117156105aa57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610d08565b604051808215151515815260200191505060405180910390f35b61067d600480360360a081101561062957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190505050610d8d565b604051808215151515815260200191505060405180910390f35b61069f610ef5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106e9610f1e565b604051808215151515815260200191505060405180910390f35b61070b610f75565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561074b578082015181840152602081019050610730565b50505050905090810190601f1680156107785780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61078e610fae565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61081c600480360360408110156107e657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610fd4565b604051808215151515815260200191505060405180910390f35b6108826004803603604081101561084c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611079565b604051808215151515815260200191505060405180910390f35b6108e8600480360360408110156108b257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611090565b604051808215151515815260200191505060405180910390f35b6109646004803603604081101561091857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506111dd565b6040518082815260200191505060405180910390f35b6109bc6004803603602081101561099057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611264565b005b6040805190810160405280600381526020017f4c4358000000000000000000000000000000000000000000000000000000000081525081565b6000610a01610f1e565b1515610a0c57600080fd5b81600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050919050565b6000610a63338484611283565b6001905092915050565b6000600354905090565b6000610a848484846113e6565b610b1d8433610b1885600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115b690919063ffffffff16565b611283565b600190509392505050565b601281565b6000610bc83384610bc385600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115d890919063ffffffff16565b611283565b6001905092915050565b610bdc33826115f9565b50565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610c30610f1e565b1515610c3b57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610d04828261174f565b5050565b6000610d12610f1e565b1515610d1d57600080fd5b81518351141515610d2d57600080fd5b60008090505b8351811015610d8257610d75338583815181101515610d4e57fe5b906020019060200201518584815181101515610d6657fe5b906020019060200201516113e6565b8080600101915050610d33565b506001905092915050565b6000610d97610f1e565b1515610da257600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632a2eddde87878787876040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200185815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e7f57600080fd5b505af1158015610e93573d6000803e3d6000fd5b505050506040513d6020811015610ea957600080fd5b810190808051906020019092919050505050610ee833600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16876113e6565b6001905095945050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614905090565b6040805190810160405280600381526020017f4c4358000000000000000000000000000000000000000000000000000000000081525081565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600061106f338461106a85600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115b690919063ffffffff16565b611283565b6001905092915050565b60006110863384846113e6565b6001905092915050565b600061109a610f1e565b15156110a557600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630e77e5e384846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561116a57600080fd5b505af115801561117e573d6000803e3d6000fd5b505050506040513d602081101561119457600080fd5b8101908080519060200190929190505050506111d333600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846113e6565b6001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b61126c610f1e565b151561127757600080fd5b611280816117f6565b50565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141515156112bf57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156112fb57600080fd5b80600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415151561142257600080fd5b61147481600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115b690919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061150981600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115d890919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b60008282111515156115c757600080fd5b600082840390508091505092915050565b60008082840190508381101515156115ef57600080fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415151561163557600080fd5b61164a816003546115b690919063ffffffff16565b6003819055506116a281600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115b690919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b61175982826115f9565b6117f282336117ed84600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115b690919063ffffffff16565b611283565b5050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561183257600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000808314156119035760009050611928565b6000828402905082848281151561191657fe5b0414151561192357600080fd5b809150505b9291505056fea165627a7a7230582083a083bdf3f50e7504df119261e5b1d5bdcbf5ad163e15bbd3f9ee1c6e73b1880029
Verified Source Code Partial Match
Compiler: v0.5.4+commit.9549d8ff
EVM: byzantium
Optimization: No
lcxToken.sol 600 lines
pragma solidity 0.5.4;
/**
* @title interface of ERC 20 token
*
*/
interface IERC20 {
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);
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure.
* To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using SafeMath for uint256;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
require(token.transfer(to, value));
}
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
require(token.transferFrom(from, to, value));
}
function safeApprove(IERC20 token, address spender, uint256 value) internal {
require((value == 0) || (token.allowance(msg.sender, spender) == 0));
require(token.approve(spender, value));
}
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 newAllowance = token.allowance(address(this), spender).add(value);
require(token.approve(spender, newAllowance));
}
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 newAllowance = token.allowance(address(this), spender).sub(value);
require(token.approve(spender, newAllowance));
}
}
/**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error
*/
library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b);
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) {
require(b > 0);
uint256 c = a / b;
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);
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);
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);
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 private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor () internal {
_owner = msg.sender;
emit OwnershipTransferred(address(0), _owner);
}
/**
* @return the address of the owner.
*/
function owner() public view returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(isOwner());
_;
}
/**
* @return true if `msg.sender` is the owner of the contract.
*/
function isOwner() public view returns (bool) {
return msg.sender == _owner;
}
/**
* @dev Allows the current owner to relinquish control of the contract.
* @notice Warning!!!! only be used when owner address is compromised
*/
function renounceOwnership() public onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
_transferOwnership(newOwner);
}
/**
* @dev Transfers control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function _transferOwnership(address newOwner) internal {
require(newOwner != address(0));
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
}
/**
* @title Vesting token for specific period
*/
contract TokenVesting is Ownable{
using SafeMath for uint256;
using SafeERC20 for IERC20;
struct VestedToken{
uint256 cliff;
uint256 start;
uint256 duration;
uint256 releasedToken;
uint256 totalToken;
bool revoked;
}
mapping (address => VestedToken) public vestedUser;
// default Vesting parameter values
uint256 private _cliff = 2592000; // 30 days period
uint256 private _duration = 93312000; // for 3 years
bool private _revoked = false;
IERC20 public LCXToken;
event TokenReleased(address indexed account, uint256 amount);
event VestingRevoked(address indexed account);
/**
* @dev Its a modifier in which we authenticate the caller is owner or LCXToken Smart Contract
*/
modifier onlyLCXTokenAndOwner() {
require(msg.sender==owner() || msg.sender == address(LCXToken));
_;
}
/**
* @dev First we have to set token address before doing any thing
* @param token LCX Smart contract Address
*/
function setTokenAddress(IERC20 token) public onlyOwner returns(bool){
LCXToken = token;
return true;
}
/**
* @dev this will set the beneficiary with default vesting
* parameters ie, every month for 3 years
* @param account address of the beneficiary for vesting
* @param amount totalToken to be vested
*/
function setDefaultVesting(address account, uint256 amount) public onlyLCXTokenAndOwner returns(bool){
_setDefaultVesting(account, amount);
return true;
}
/**
*@dev Internal function to set default vesting parameters
*/
function _setDefaultVesting(address account, uint256 amount) internal {
require(account!=address(0));
VestedToken storage vested = vestedUser[account];
vested.cliff = _cliff;
vested.start = block.timestamp;
vested.duration = _duration;
vested.totalToken = amount;
vested.releasedToken = 0;
vested.revoked = _revoked;
}
/**
* @dev this will set the beneficiary with vesting
* parameters provided
* @param account address of the beneficiary for vesting
* @param amount totalToken to be vested
* @param cliff In seconds of one period in vesting
* @param duration In seconds of total vesting
* @param startAt UNIX timestamp in seconds from where vesting will start
*/
function setVesting(address account, uint256 amount, uint256 cliff, uint256 duration, uint256 startAt ) public onlyLCXTokenAndOwner returns(bool){
_setVesting(account, amount, cliff, duration, startAt);
return true;
}
/**
* @dev Internal function to set default vesting parameters
* @param account address of the beneficiary for vesting
* @param amount totalToken to be vested
* @param cliff In seconds of one period in vestin
* @param duration In seconds of total vesting duration
* @param startAt UNIX timestamp in seconds from where vesting will start
*
*/
function _setVesting(address account, uint256 amount, uint256 cliff, uint256 duration, uint256 startAt) internal {
require(account!=address(0));
require(cliff<=duration);
VestedToken storage vested = vestedUser[account];
vested.cliff = cliff;
vested.start = startAt;
vested.duration = duration;
vested.totalToken = amount;
vested.releasedToken = 0;
vested.revoked = false;
}
/**
* @notice Transfers vested tokens to beneficiary.
* anyone can release their token
*/
function releaseMyToken() public returns(bool) {
releaseToken(msg.sender);
return true;
}
/**
* @notice Transfers vested tokens to the given account.
* @param account address of the vested user
*/
function releaseToken(address account) public {
require(account != address(0));
VestedToken storage vested = vestedUser[account];
uint256 unreleasedToken = _releasableAmount(account); // total releasable token currently
require(unreleasedToken>0);
vested.releasedToken = vested.releasedToken.add(unreleasedToken);
LCXToken.safeTransfer(account,unreleasedToken);
emit TokenReleased(account, unreleasedToken);
}
/**
* @dev Calculates the amount that has already vested but hasn't been released yet.
* @param account address of user
*/
function _releasableAmount(address account) internal view returns (uint256) {
return _vestedAmount(account).sub(vestedUser[account].releasedToken);
}
/**
* @dev Calculates the amount that has already vested.
* @param account address of the user
*/
function _vestedAmount(address account) internal view returns (uint256) {
VestedToken storage vested = vestedUser[account];
uint256 totalToken = vested.totalToken;
if(block.timestamp < vested.start.add(vested.cliff)){
return 0;
}else if(block.timestamp >= vested.start.add(vested.duration) || vested.revoked){
return totalToken;
}else{
uint256 numberOfPeriods = (block.timestamp.sub(vested.start)).div(vested.cliff);
return totalToken.mul(numberOfPeriods.mul(vested.cliff)).div(vested.duration);
}
}
/**
* @notice Allows the owner to revoke the vesting. Tokens already vested
* remain in the contract, the rest are returned to the owner.
* @param account address in which the vesting is revoked
*/
function revoke(address account) public onlyOwner {
VestedToken storage vested = vestedUser[account];
require(!vested.revoked);
uint256 balance = vested.totalToken;
uint256 unreleased = _releasableAmount(account);
uint256 refund = balance.sub(unreleased);
vested.revoked = true;
vested.totalToken = unreleased;
LCXToken.safeTransfer(owner(), refund);
emit VestingRevoked(account);
}
}
contract lcxToken is IERC20, Ownable{
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
TokenVesting public vestingContractAddress;
/**
* @dev name, symbol and decimals of LCX Token
*/
string public constant name = 'LCX';
string public constant symbol = 'LCX';
uint256 public constant decimals = 18;
/**
* @dev Initializes the totalSupply of the token with decimal point 18
*/
constructor(uint256 totalSupply) public{
_totalSupply = totalSupply.mul(10**decimals);
_balances[msg.sender] = _totalSupply;
emit Transfer(address(0), msg.sender, _totalSupply);
}
/**
* @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 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) {
_transfer(msg.sender, to, value);
return true;
}
/**
* @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) {
_approve(msg.sender, spender, value);
return true;
}
/**
* @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) {
_transfer(from, to, value);
_approve(from, msg.sender, _allowed[from][msg.sender].sub(value));
return true;
}
/**
* @param spender The address which will spend the funds.
* @param addedValue The amount of tokens to increase the allowance by.
*/
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
_approve(msg.sender, spender, _allowed[msg.sender][spender].add(addedValue));
return true;
}
/**
* @param spender The address which will spend the funds.
* @param subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
_approve(msg.sender, spender, _allowed[msg.sender][spender].sub(subtractedValue));
return true;
}
/**
* @dev Burns a specific amount of tokens.
* @param value The amount of token to be burned.
*/
function burn(uint256 value) public {
_burn(msg.sender, value);
}
/**
* @dev Burns a specific amount of tokens from the target address and decrements allowance
* @param from address The account whose tokens will be burned.
* @param value uint256 The amount of token to be burned.
*/
function burnFrom(address from, uint256 value) public {
_burnFrom(from, value);
}
/**
* @dev Transfer token for a specified addresses
* @param from The address to transfer from.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function _transfer(address from, address to, uint256 value) internal {
require(to != address(0));
_balances[from] = _balances[from].sub(value);
_balances[to] = _balances[to].add(value);
emit Transfer(from, to, value);
}
/**
* @param account The account whose tokens will be burnt.
* @param value The amount that will be burnt.
*/
function _burn(address account, uint256 value) internal {
require(account != address(0));
_totalSupply = _totalSupply.sub(value);
_balances[account] = _balances[account].sub(value);
emit Transfer(account, address(0), value);
}
/**
* @param owner The address that owns the tokens.
* @param spender The address that will spend the tokens.
* @param value The number of tokens that can be spent.
*/
function _approve(address owner, address spender, uint256 value) internal {
require(spender != address(0));
require(owner != address(0));
_allowed[owner][spender] = value;
emit Approval(owner, spender, value);
}
/**
* @param account The account whose tokens will be burnt.
* @param value The amount that will be burnt.
*/
function _burnFrom(address account, uint256 value) internal {
_burn(account, value);
_approve(account, msg.sender, _allowed[account][msg.sender].sub(value));
}
/**
* @dev Set Vesting Token Smart contract Address before starting vesting
* @param tokenVestingAddress Smart conract Address of the Vesting Smart contract
*/
function setTokenVestingAddress(TokenVesting tokenVestingAddress) public onlyOwner returns(bool){
vestingContractAddress = tokenVestingAddress;
return true;
}
/**
* @dev Vesting users token by default parameters
* @param account address of the user
* @param amount the amount to be vested
*/
function setDefaultVestingToken(address account, uint256 amount) public onlyOwner returns(bool){
vestingContractAddress.setDefaultVesting(account, amount);
_transfer(msg.sender,address(vestingContractAddress), amount);
return true;
}
/**
* @dev Vesting users token by given parameters
* @param account address of the beneficiary for vesting
* @param amount totalToken to be vested
* @param cliff In seconds of one period in vestin
* @param duration In seconds of total vesting duration
* @param startAt UNIX timestamp in seconds from where vesting will start
*/
function setVestingToken(address account, uint256 amount, uint256 cliff, uint256 duration, uint256 startAt) public onlyOwner returns(bool){
vestingContractAddress.setVesting(account, amount, cliff, duration, startAt);
_transfer(msg.sender ,address(vestingContractAddress), amount);
return true;
}
/**
* @dev Batch Transfer Transactions
* @param accounts array of addresses
* @param values array of values to be transfer
*/
function batchTransfer(address[] memory accounts, uint256[] memory values ) public onlyOwner returns(bool){
require(accounts.length == values.length);
for(uint256 i=0;i< accounts.length;i++){
_transfer(msg.sender, accounts[i], values[i]);
}
return true;
}
}
Read Contract
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint256
isOwner 0x8f32d59b → bool
name 0x06fdde03 → string
owner 0x8da5cb5b → address
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
vestingContractAddress 0x9e7bf05f → address
Write Contract 13 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address spender
uint256 value
returns: bool
batchTransfer 0x88d695b2
address[] accounts
uint256[] values
returns: bool
burn 0x42966c68
uint256 value
burnFrom 0x79cc6790
address from
uint256 value
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
renounceOwnership 0x715018a6
No parameters
setDefaultVestingToken 0xba7c11a2
address account
uint256 amount
returns: bool
setTokenVestingAddress 0x07f97a3b
address tokenVestingAddress
returns: bool
setVestingToken 0x8ca9f786
address account
uint256 amount
uint256 cliff
uint256 duration
uint256 startAt
returns: bool
transfer 0xa9059cbb
address to
uint256 value
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 value
returns: bool
transferOwnership 0xf2fde38b
address newOwner
Top Interactions
| Address | Txns | Sent | Received |
|---|---|---|---|
| 0x25b9aA3a...C89b | 2 | 2 | |
| 0xb542c829...9aD4 | 1 | 1 | |
| 0x58805E6e...ba4D | 1 | 1 | |
| 0x7a6Ae0B4...539E | 1 | 1 |
Token Balances (2)
View Transfers →Recent Transactions
|
| Hash | Block | Age | From/To | Value | |
|---|---|---|---|---|---|
| 0x8f6f1e7f...029e61 | 24,436,997 | IN | 0xb542c829...9aD4 | 0 ETH | |
| 0x6ccee076...2021d3 | 24,436,989 | IN | 0x58805E6e...ba4D | 0 ETH | |
| 0x9cb0bb42...4eb309 | 24,436,962 | IN | 0x25b9aA3a...C89b | 0 ETH | |
| 0x4c785ef5...31fd6b | 24,436,955 | IN | 0x7a6Ae0B4...539E | 0 ETH | |
| 0x445fec84...5b1a5e | 24,436,936 | IN | 0x25b9aA3a...C89b | 0 ETH |