Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
VT201811003
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-11-17
*/
pragma solidity ^0.4.24;
library SafeMath {
function mul(uint a, uint b) internal pure returns(uint) {
uint c = a * b;
assert(a == 0 || c / a == b);
return c;
}
function div(uint a, uint b) internal pure returns(uint) {
uint c = a / b;
return c;
}
function sub(uint a, uint b) internal pure returns(uint) {
assert(b <= a);
return a - b;
}
function add(uint a, uint b) internal pure returns(uint) {
uint c = a + b;
assert(c >= a);
return c;
}
function max64(uint64 a, uint64 b) internal pure returns(uint64) {
return a >= b ? a : b;
}
function min64(uint64 a, uint64 b) internal pure returns(uint64) {
return a < b ? a : b;
}
function max256(uint256 a, uint256 b) internal pure returns(uint256) {
return a >= b ? a : b;
}
function min256(uint256 a, uint256 b) internal pure returns(uint256) {
return a < b ? a : b;
}
}
contract ERC20Basic {
uint public totalSupply;
function balanceOf(address who) public constant returns(uint);
function transfer(address to, uint value) public;
event Transfer(address indexed from, address indexed to, uint value);
}
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public constant returns(uint);
function transferFrom(address from, address to, uint value) public;
function approve(address spender, uint value) public;
event Approval(address indexed owner, address indexed spender, uint value);
}
/**
* @title TokenVesting
* @dev A contract can unlock token at designated time.
*/
contract VT201811003 {
using SafeMath for uint256;
event Released(uint256 amounts);
event InvalidCaller(address caller);
address public owner;
address[] private _beneficiary ;
uint256 private _locktime;
uint256 private _unlocktime;
uint256[] private _amount;
constructor() public
{
owner = msg.sender;
_unlocktime =0;
}
/*
* MODIFIERS
*/
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
/**
* @return the beneficiary of the tokens.
*/
function beneficiary() public view returns(address[]) {
return _beneficiary;
}
/**
* @return the unlocktime time of the token vesting.
*/
function unlocktime() public view returns(uint256) {
return _unlocktime;
}
/**
* @return the locktime time of the token vesting.
*/
function locktime() public view returns(uint256) {
return _locktime;
}
/**
* @return the amount of the tokens.
*/
function amount() public view returns(uint256[]) {
return _amount;
}
/**
* @notice Setting lock time.
*/
function setLockTime(uint256 locktimeParam,uint256 unlocktimeParam) public onlyOwner{
_unlocktime = unlocktimeParam;
_locktime = locktimeParam;
}
/**
* @notice Setting UserInfo.
*/
function setUserInfo(address[] beneficiaryParam,uint256[] amountParam) public onlyOwner{
if( block.timestamp <=_locktime){
_beneficiary = beneficiaryParam;
_amount = amountParam;
}
}
/**
* @notice Transfers vested tokens to beneficiary.
* @param token ERC20 token which is being vested
*/
function release(ERC20 token) public {
for(uint i = 0; i < _beneficiary.length; i++) {
if(block.timestamp >= _unlocktime ){
token.transfer(_beneficiary[i], _amount[i].mul(10**18));
emit Released( _amount[i]);
_amount[i]=0;
}
}
}
/**
* @notice Release the unexpected token.
* @param token ERC20 token which is being vested
*/
function checkRelease(ERC20 token) public {
uint _unRelease = 0;
for(uint i = 0; i < _amount.length; i++) {
_unRelease = _unRelease.add(_amount[i]);
}
if(_unRelease==0 && block.timestamp >= _unlocktime ){
token.transfer(owner,token.balanceOf(this));
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"constant":false,"inputs":[{"name":"token","type":"address"}],"name":"release","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"token","type":"address"}],"name":"checkRelease","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"unlocktime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"beneficiary","outputs":[{"name":"","type":"address[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"locktime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"locktimeParam","type":"uint256"},{"name":"unlocktimeParam","type":"uint256"}],"name":"setLockTime","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":"amount","outputs":[{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"beneficiaryParam","type":"address[]"},{"name":"amountParam","type":"uint256[]"}],"name":"setUserInfo","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"amounts","type":"uint256"}],"name":"Released","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"caller","type":"address"}],"name":"InvalidCaller","type":"event"}]Contract Creation Code
608060405234801561001057600080fd5b5060008054600160a060020a031916331781556003556107c5806100356000396000f30060806040526004361061007f5763ffffffff60e060020a6000350416631916558781146100845780631a9e6aab146100a7578063323772ee146100c857806338af3eed146100ef57806361c533b41461015457806387eb31f4146101695780638da5cb5b14610184578063aa8c217c146101b5578063f0f31b68146101ca575b600080fd5b34801561009057600080fd5b506100a5600160a060020a0360043516610258565b005b3480156100b357600080fd5b506100a5600160a060020a03600435166103bd565b3480156100d457600080fd5b506100dd610520565b60408051918252519081900360200190f35b3480156100fb57600080fd5b50610104610527565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610140578181015183820152602001610128565b505050509050019250505060405180910390f35b34801561016057600080fd5b506100dd610589565b34801561017557600080fd5b506100a560043560243561058f565b34801561019057600080fd5b506101996105ae565b60408051600160a060020a039092168252519081900360200190f35b3480156101c157600080fd5b506101046105bd565b3480156101d657600080fd5b50604080516020600480358082013583810280860185019096528085526100a595369593946024949385019291829185019084908082843750506040805187358901803560208181028481018201909552818452989b9a9989019892975090820195509350839250850190849080828437509497506106149650505050505050565b60005b6001548110156103b95760035442106103b15781600160a060020a031663a9059cbb60018381548110151561028c57fe5b60009182526020909120015460048054600160a060020a03909216916102d991670de0b6b3a764000091879081106102c057fe5b906000526020600020015461065b90919063ffffffff16565b6040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050600060405180830381600087803b15801561032b57600080fd5b505af115801561033f573d6000803e3d6000fd5b505050507ffb81f9b30d73d830c3544b34d827c08142579ee75710b490bab0b3995468c56560048281548110151561037357fe5b90600052602060002001546040518082815260200191505060405180910390a160006004828154811015156103a457fe5b6000918252602090912001555b60010161025b565b5050565b6000805b600454811015610401576103f76004828154811015156103dd57fe5b90600052602060002001548361068690919063ffffffff16565b91506001016103c1565b8115801561041157506003544210155b1561051b5760008054604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a038088169463a9059cbb949091169285926370a0823192602480840193602093929083900390910190829087803b15801561048a57600080fd5b505af115801561049e573d6000803e3d6000fd5b505050506040513d60208110156104b457600080fd5b50516040805160e060020a63ffffffff8616028152600160a060020a039093166004840152602483019190915251604480830192600092919082900301818387803b15801561050257600080fd5b505af1158015610516573d6000803e3d6000fd5b505050505b505050565b6003545b90565b6060600180548060200260200160405190810160405280929190818152602001828054801561057f57602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610561575b5050505050905090565b60025490565b600054600160a060020a031633146105a657600080fd5b600355600255565b600054600160a060020a031681565b6060600480548060200260200160405190810160405280929190818152602001828054801561057f57602002820191906000526020600020905b8154815260200190600101908083116105f7575050505050905090565b600054600160a060020a0316331461062b57600080fd5b60025442116103b9578151610647906001906020850190610695565b50805161051b906004906020840190610707565b6000828202831580610677575082848281151561067457fe5b04145b151561067f57fe5b9392505050565b60008282018381101561067f57fe5b8280548282559060005260206000209081019282156106f7579160200282015b828111156106f7578251825473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039091161782556020909201916001909101906106b5565b5061070392915061074e565b5090565b828054828255906000526020600020908101928215610742579160200282015b82811115610742578251825591602001919060010190610727565b5061070392915061077f565b61052491905b8082111561070357805473ffffffffffffffffffffffffffffffffffffffff19168155600101610754565b61052491905b8082111561070357600081556001016107855600a165627a7a7230582096f279c5798d5a2fac03af641dd9a825e947bbb195446bf8c3f98e9525ba7cea0029
Deployed Bytecode
0x60806040526004361061007f5763ffffffff60e060020a6000350416631916558781146100845780631a9e6aab146100a7578063323772ee146100c857806338af3eed146100ef57806361c533b41461015457806387eb31f4146101695780638da5cb5b14610184578063aa8c217c146101b5578063f0f31b68146101ca575b600080fd5b34801561009057600080fd5b506100a5600160a060020a0360043516610258565b005b3480156100b357600080fd5b506100a5600160a060020a03600435166103bd565b3480156100d457600080fd5b506100dd610520565b60408051918252519081900360200190f35b3480156100fb57600080fd5b50610104610527565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610140578181015183820152602001610128565b505050509050019250505060405180910390f35b34801561016057600080fd5b506100dd610589565b34801561017557600080fd5b506100a560043560243561058f565b34801561019057600080fd5b506101996105ae565b60408051600160a060020a039092168252519081900360200190f35b3480156101c157600080fd5b506101046105bd565b3480156101d657600080fd5b50604080516020600480358082013583810280860185019096528085526100a595369593946024949385019291829185019084908082843750506040805187358901803560208181028481018201909552818452989b9a9989019892975090820195509350839250850190849080828437509497506106149650505050505050565b60005b6001548110156103b95760035442106103b15781600160a060020a031663a9059cbb60018381548110151561028c57fe5b60009182526020909120015460048054600160a060020a03909216916102d991670de0b6b3a764000091879081106102c057fe5b906000526020600020015461065b90919063ffffffff16565b6040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050600060405180830381600087803b15801561032b57600080fd5b505af115801561033f573d6000803e3d6000fd5b505050507ffb81f9b30d73d830c3544b34d827c08142579ee75710b490bab0b3995468c56560048281548110151561037357fe5b90600052602060002001546040518082815260200191505060405180910390a160006004828154811015156103a457fe5b6000918252602090912001555b60010161025b565b5050565b6000805b600454811015610401576103f76004828154811015156103dd57fe5b90600052602060002001548361068690919063ffffffff16565b91506001016103c1565b8115801561041157506003544210155b1561051b5760008054604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a038088169463a9059cbb949091169285926370a0823192602480840193602093929083900390910190829087803b15801561048a57600080fd5b505af115801561049e573d6000803e3d6000fd5b505050506040513d60208110156104b457600080fd5b50516040805160e060020a63ffffffff8616028152600160a060020a039093166004840152602483019190915251604480830192600092919082900301818387803b15801561050257600080fd5b505af1158015610516573d6000803e3d6000fd5b505050505b505050565b6003545b90565b6060600180548060200260200160405190810160405280929190818152602001828054801561057f57602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610561575b5050505050905090565b60025490565b600054600160a060020a031633146105a657600080fd5b600355600255565b600054600160a060020a031681565b6060600480548060200260200160405190810160405280929190818152602001828054801561057f57602002820191906000526020600020905b8154815260200190600101908083116105f7575050505050905090565b600054600160a060020a0316331461062b57600080fd5b60025442116103b9578151610647906001906020850190610695565b50805161051b906004906020840190610707565b6000828202831580610677575082848281151561067457fe5b04145b151561067f57fe5b9392505050565b60008282018381101561067f57fe5b8280548282559060005260206000209081019282156106f7579160200282015b828111156106f7578251825473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039091161782556020909201916001909101906106b5565b5061070392915061074e565b5090565b828054828255906000526020600020908101928215610742579160200282015b82811115610742578251825591602001919060010190610727565b5061070392915061077f565b61052491905b8082111561070357805473ffffffffffffffffffffffffffffffffffffffff19168155600101610754565b61052491905b8082111561070357600081556001016107855600a165627a7a7230582096f279c5798d5a2fac03af641dd9a825e947bbb195446bf8c3f98e9525ba7cea0029
Swarm Source
bzzr://96f279c5798d5a2fac03af641dd9a825e947bbb195446bf8c3f98e9525ba7cea
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.