Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00Latest 1 internal transaction
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| Transfer | 5623690 | 2870 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xE76c5583...8e7d71b7B The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
VestingFund
Compiler Version
v0.4.21+commit.dfe3193c
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/**
*Submitted for verification at Etherscan.io on 2018-07-10
*/
pragma solidity ^0.4.13;
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
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;
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
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;
}
/**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
assert(c >= a);
return c;
}
}
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() 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) public onlyOwner {
require(newOwner != address(0));
OwnershipTransferred(owner, newOwner);
owner = newOwner;
}
}
contract VestingFund is Ownable {
using SafeMath for uint256;
using SafeERC20 for ERC20Basic;
event Released(uint256 amount);
// beneficiary of tokens after they are released
address public beneficiary;
ERC20Basic public token;
uint256 public quarters;
uint256 public start;
uint256 public released;
/**
* @dev Creates a vesting contract that vests its balance of any ERC20 token to the
* _beneficiary, tokens are release in an incremental fashion after a quater has passed until _start + _quarters * 3 * months.
* By then all of the balance will have vested.
* @param _beneficiary address of the beneficiary to whom vested tokens are transferred
* @param _quarters number of quarters the vesting will last
* @param _token ERC20 token which is being vested
*/
function VestingFund(address _beneficiary, uint256 _start, uint256 _quarters, address _token) public {
require(_beneficiary != address(0) && _token != address(0));
require(_quarters > 0);
beneficiary = _beneficiary;
quarters = _quarters;
start = _start;
token = ERC20Basic(_token);
}
/**
* @notice Transfers vested tokens to beneficiary.
*/
function release() public {
uint256 unreleased = releasableAmount();
require(unreleased > 0);
released = released.add(unreleased);
token.safeTransfer(beneficiary, unreleased);
Released(unreleased);
}
/**
* @dev Calculates the amount that has already vested but hasn't been released yet.
*/
function releasableAmount() public view returns(uint256) {
return vestedAmount().sub(released);
}
/**
* @dev Calculates the amount that has already vested.
*/
function vestedAmount() public view returns(uint256) {
uint256 currentBalance = token.balanceOf(this);
uint256 totalBalance = currentBalance.add(released);
if (now < start) {
return 0;
}
uint256 dT = now.sub(start); // time passed since start
uint256 dQuarters = dT.div(90 days); // quarters passed
if (dQuarters >= quarters) {
return totalBalance; // return everything if vesting period ended
} else {
return totalBalance.mul(dQuarters).div(quarters); // ammount = total * (quarters passed / total quarters)
}
}
}
contract ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeERC20 {
function safeTransfer(ERC20Basic token, address to, uint256 value) internal {
assert(token.transfer(to, value));
}
function safeTransferFrom(ERC20 token, address from, address to, uint256 value) internal {
assert(token.transferFrom(from, to, value));
}
function safeApprove(ERC20 token, address spender, uint256 value) internal {
assert(token.approve(spender, value));
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"constant":true,"inputs":[],"name":"beneficiary","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"vestedAmount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"releasableAmount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"release","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":"released","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"quarters","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"start","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"},{"constant":true,"inputs":[],"name":"token","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_beneficiary","type":"address"},{"name":"_start","type":"uint256"},{"name":"_quarters","type":"uint256"},{"name":"_token","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"amount","type":"uint256"}],"name":"Released","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]Contract Creation Code
0x6060604052341561000f57600080fd5b6040516080806105f88339810160405280805191906020018051919060200180519190602001805160008054600160a060020a03191633600160a060020a0390811691909117909155909250851615801591506100745750600160a060020a03811615155b151561007f57600080fd5b6000821161008c57600080fd5b60018054600160a060020a03958616600160a060020a03199182161790915560039290925560049290925560028054929093169116179055610525806100d36000396000f30060606040526004361061008a5763ffffffff60e060020a60003504166338af3eed811461008f57806344b1231f146100be5780635b940081146100e357806386d1a69f146100f65780638da5cb5b1461010b578063961325211461011e578063be98642014610131578063be9a655514610144578063f2fde38b14610157578063fc0c546a14610176575b600080fd5b341561009a57600080fd5b6100a2610189565b604051600160a060020a03909116815260200160405180910390f35b34156100c957600080fd5b6100d1610198565b60405190815260200160405180910390f35b34156100ee57600080fd5b6100d161029f565b341561010157600080fd5b6101096102c0565b005b341561011657600080fd5b6100a2610348565b341561012957600080fd5b6100d1610357565b341561013c57600080fd5b6100d161035d565b341561014f57600080fd5b6100d1610363565b341561016257600080fd5b610109600160a060020a0360043516610369565b341561018157600080fd5b6100a2610404565b600154600160a060020a031681565b6002546000908190819081908190600160a060020a03166370a082313060405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b15156101f357600080fd5b5af1151561020057600080fd5b50505060405180516005549095506102209150859063ffffffff61041316565b92506004544210156102355760009450610298565b60045461024990429063ffffffff61042d16565b915061025e826276a70063ffffffff61043f16565b600354909150811061027257829450610298565b60035461029590610289858463ffffffff61045616565b9063ffffffff61043f16565b94505b5050505090565b60006102bb6005546102af610198565b9063ffffffff61042d16565b905090565b60006102ca61029f565b9050600081116102d957600080fd5b6005546102ec908263ffffffff61041316565b60055560015460025461031291600160a060020a0391821691168363ffffffff61048116565b7ffb81f9b30d73d830c3544b34d827c08142579ee75710b490bab0b3995468c5658160405190815260200160405180910390a150565b600054600160a060020a031681565b60055481565b60035481565b60045481565b60005433600160a060020a0390811691161461038457600080fd5b600160a060020a038116151561039957600080fd5b600054600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600254600160a060020a031681565b60008282018381101561042257fe5b8091505b5092915050565b60008282111561043957fe5b50900390565b600080828481151561044d57fe5b04949350505050565b6000808315156104695760009150610426565b5082820282848281151561047957fe5b041461042257fe5b82600160a060020a031663a9059cbb838360405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b15156104d557600080fd5b5af115156104e257600080fd5b5050506040518051905015156104f457fe5b5050505600a165627a7a723058202af0381edc531ccad258dc5ea7e30d79467413ec25b1cbb537b2cbe37b1913b6002900000000000000000000000056b245be43f232f69c3e6f1ef1a3d25c1dca6535000000000000000000000000000000000000000000000000000000005acdf8bf000000000000000000000000000000000000000000000000000000000000000400000000000000000000000082adce3b6a226f9286af99841410b04a075b54d5
Deployed Bytecode
0x60606040526004361061008a5763ffffffff60e060020a60003504166338af3eed811461008f57806344b1231f146100be5780635b940081146100e357806386d1a69f146100f65780638da5cb5b1461010b578063961325211461011e578063be98642014610131578063be9a655514610144578063f2fde38b14610157578063fc0c546a14610176575b600080fd5b341561009a57600080fd5b6100a2610189565b604051600160a060020a03909116815260200160405180910390f35b34156100c957600080fd5b6100d1610198565b60405190815260200160405180910390f35b34156100ee57600080fd5b6100d161029f565b341561010157600080fd5b6101096102c0565b005b341561011657600080fd5b6100a2610348565b341561012957600080fd5b6100d1610357565b341561013c57600080fd5b6100d161035d565b341561014f57600080fd5b6100d1610363565b341561016257600080fd5b610109600160a060020a0360043516610369565b341561018157600080fd5b6100a2610404565b600154600160a060020a031681565b6002546000908190819081908190600160a060020a03166370a082313060405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b15156101f357600080fd5b5af1151561020057600080fd5b50505060405180516005549095506102209150859063ffffffff61041316565b92506004544210156102355760009450610298565b60045461024990429063ffffffff61042d16565b915061025e826276a70063ffffffff61043f16565b600354909150811061027257829450610298565b60035461029590610289858463ffffffff61045616565b9063ffffffff61043f16565b94505b5050505090565b60006102bb6005546102af610198565b9063ffffffff61042d16565b905090565b60006102ca61029f565b9050600081116102d957600080fd5b6005546102ec908263ffffffff61041316565b60055560015460025461031291600160a060020a0391821691168363ffffffff61048116565b7ffb81f9b30d73d830c3544b34d827c08142579ee75710b490bab0b3995468c5658160405190815260200160405180910390a150565b600054600160a060020a031681565b60055481565b60035481565b60045481565b60005433600160a060020a0390811691161461038457600080fd5b600160a060020a038116151561039957600080fd5b600054600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600254600160a060020a031681565b60008282018381101561042257fe5b8091505b5092915050565b60008282111561043957fe5b50900390565b600080828481151561044d57fe5b04949350505050565b6000808315156104695760009150610426565b5082820282848281151561047957fe5b041461042257fe5b82600160a060020a031663a9059cbb838360405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b15156104d557600080fd5b5af115156104e257600080fd5b5050506040518051905015156104f457fe5b5050505600a165627a7a723058202af0381edc531ccad258dc5ea7e30d79467413ec25b1cbb537b2cbe37b1913b60029
Swarm Source
bzzr://2af0381edc531ccad258dc5ea7e30d79467413ec25b1cbb537b2cbe37b1913b6
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 ]
[ 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.