More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 8354647 | 1856 days ago | IN | 0 ETH | 0.00640365 |
Loading...
Loading
Contract Name:
CoinMetroVault
Compiler Version
v0.4.24+commit.e67f0147
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2019-08-15 */ /** *Submitted for verification at Etherscan.io on 2019-06-26 */ 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) { uint256 c = a * b; assert(a == 0 || 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; } } /** * @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; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @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) public onlyOwner { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } contract CoinMetroToken is Ownable { using SafeMath for uint; string public constant name = "CoinMetro Token"; string public constant symbol = "XCM"; uint8 public constant decimals = 18; uint256 public totalSupply; bool public mintingFinished = false; mapping(address => uint256) balances; mapping (address => mapping (address => uint256)) internal allowed; event NewToken(address _token); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); event Burned(address burner, uint burnedAmount); event MintFinished(); modifier canMint() { require(!mintingFinished, "Minting was already finished"); _; } constructor() public { emit NewToken(address(this)); } /** * @dev Function to mint tokens * @param _to The address that will receive the minted tokens. * @param _amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */ function mint(address _to, uint256 _amount) public onlyOwner canMint returns (bool) { totalSupply = totalSupply.add(_amount); balances[_to] = balances[_to].add(_amount); emit Transfer(address(0), _to, _amount); return true; } // Burn tokens from an address function burn(uint burnAmount) public { address burner = msg.sender; balances[burner] = balances[burner].sub(burnAmount); totalSupply = totalSupply.sub(burnAmount); emit Burned(burner, burnAmount); } /** * @dev Function to stop minting new tokens. * @return True if the operation was successful. */ function finishMinting() public onlyOwner returns (bool) { mintingFinished = true; emit MintFinished(); return true; } /** * @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(_to != address(0), "Address should not be zero"); require(_value <= balances[msg.sender], "Insufficient balance"); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender] - _value; balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _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(_to != address(0), "Address should not be zero"); require(_value <= balances[_from], "Insufficient Balance"); require(_value <= allowed[_from][msg.sender], "Insufficient Allowance"); balances[_from] = balances[_from] - _value; balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender] - _value; emit Transfer(_from, _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) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @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 remaining) { return allowed[_owner][_spender]; } /** * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol */ function increaseApproval (address _spender, uint _addedValue) public returns (bool success) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; } } contract CoinMetroVault is Ownable { using SafeMath for uint256; CoinMetroToken public token; address public masterWallet; uint256 public releaseTimestamp; event TokenReleased(address _masterWallet, uint256 _amount); constructor(CoinMetroToken _token, address _masterWallet, uint256 _releaseTimestamp) public { require(_masterWallet != address(0x0)); require(_releaseTimestamp > now); token = _token; masterWallet = _masterWallet; releaseTimestamp = _releaseTimestamp; } function() external payable { // does not allow incoming ETH revert(); } // function to release all tokens to master wallet // revert if timestamp is before {releaseTimestamp} function release() external { require(now > releaseTimestamp, "Transaction locked"); uint balance = token.balanceOf(address(this)); token.transfer(masterWallet, balance); emit TokenReleased(masterWallet, balance); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[],"name":"releaseTimestamp","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":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"},{"constant":true,"inputs":[],"name":"masterWallet","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_token","type":"address"},{"name":"_masterWallet","type":"address"},{"name":"_releaseTimestamp","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_masterWallet","type":"address"},{"indexed":false,"name":"_amount","type":"uint256"}],"name":"TokenReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]
Contract Creation Code
608060405234801561001057600080fd5b50604051606080610893833981018060405281019080805190602001909291908051906020019092919080519060200190929190505050336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141515156100c357600080fd5b42811115156100d157600080fd5b82600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806003819055505050506107278061016c6000396000f300608060405260043610610078576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630a3f013f1461007d57806386d1a69f146100a85780638da5cb5b146100bf578063f2fde38b14610116578063fc0c546a14610159578063fc0d0117146101b0575b600080fd5b34801561008957600080fd5b50610092610207565b6040518082815260200191505060405180910390f35b3480156100b457600080fd5b506100bd61020d565b005b3480156100cb57600080fd5b506100d4610535565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561012257600080fd5b50610157600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061055a565b005b34801561016557600080fd5b5061016e6106af565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101bc57600080fd5b506101c56106d5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60035481565b600060035442111515610288576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f5472616e73616374696f6e206c6f636b6564000000000000000000000000000081525060200191505060405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561034557600080fd5b505af1158015610359573d6000803e3d6000fd5b505050506040513d602081101561036f57600080fd5b81019080805190602001909291905050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561046957600080fd5b505af115801561047d573d6000803e3d6000fd5b505050506040513d602081101561049357600080fd5b8101908080519060200190929190505050507f9cf9e3ab58b33f06d81842ea0ad850b6640c6430d6396973312e1715792e7a91600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a150565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156105b557600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156105f157600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a72305820f167caa061adee8b78d067e92a800f121b626e2841b2d9f6bb8b713c0cc6d84e002900000000000000000000000044e2ca91cea1147f1b503e669f06cd11fb0c54900000000000000000000000007c1c73bf60feb40cbcf0f12324200238ee23bb540000000000000000000000000000000000000000000000000000000066aad000
Deployed Bytecode
0x608060405260043610610078576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630a3f013f1461007d57806386d1a69f146100a85780638da5cb5b146100bf578063f2fde38b14610116578063fc0c546a14610159578063fc0d0117146101b0575b600080fd5b34801561008957600080fd5b50610092610207565b6040518082815260200191505060405180910390f35b3480156100b457600080fd5b506100bd61020d565b005b3480156100cb57600080fd5b506100d4610535565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561012257600080fd5b50610157600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061055a565b005b34801561016557600080fd5b5061016e6106af565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101bc57600080fd5b506101c56106d5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60035481565b600060035442111515610288576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f5472616e73616374696f6e206c6f636b6564000000000000000000000000000081525060200191505060405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561034557600080fd5b505af1158015610359573d6000803e3d6000fd5b505050506040513d602081101561036f57600080fd5b81019080805190602001909291905050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561046957600080fd5b505af115801561047d573d6000803e3d6000fd5b505050506040513d602081101561049357600080fd5b8101908080519060200190929190505050507f9cf9e3ab58b33f06d81842ea0ad850b6640c6430d6396973312e1715792e7a91600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a150565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156105b557600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156105f157600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a72305820f167caa061adee8b78d067e92a800f121b626e2841b2d9f6bb8b713c0cc6d84e0029
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000044e2ca91cea1147f1b503e669f06cd11fb0c54900000000000000000000000007c1c73bf60feb40cbcf0f12324200238ee23bb540000000000000000000000000000000000000000000000000000000066aad000
-----Decoded View---------------
Arg [0] : _token (address): 0x44E2ca91ceA1147f1B503e669f06CD11FB0C5490
Arg [1] : _masterWallet (address): 0x7C1C73Bf60fEb40cBCF0F12324200238ee23BB54
Arg [2] : _releaseTimestamp (uint256): 1722470400
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000044e2ca91cea1147f1b503e669f06cd11fb0c5490
Arg [1] : 0000000000000000000000007c1c73bf60feb40cbcf0f12324200238ee23bb54
Arg [2] : 0000000000000000000000000000000000000000000000000000000066aad000
Deployed Bytecode Sourcemap
8232:1043:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8877:8;;;8379:31;;8:9:-1;5:2;;;30:1;27;20:12;5:2;8379:31:0;;;;;;;;;;;;;;;;;;;;;;;9014:258;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9014:258:0;;;;;;1186:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1186:20:0;;;;;;;;;;;;;;;;;;;;;;;;;;;1852:192;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1852:192:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;8309:27;;8:9:-1;5:2;;;30:1;27;20:12;5:2;8309:27:0;;;;;;;;;;;;;;;;;;;;;;;;;;;8345;;8:9:-1;5:2;;;30:1;27;20:12;5:2;8345:27:0;;;;;;;;;;;;;;;;;;;;;;;;;;;8379:31;;;;:::o;9014:258::-;9117:12;9067:16;;9061:3;:22;9053:53;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9132:5;;;;;;;;;;;:15;;;9156:4;9132:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9132:30:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9132:30:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;9132:30:0;;;;;;;;;;;;;;;;9117:45;;9173:5;;;;;;;;;;;:14;;;9188:12;;;;;;;;;;;9202:7;9173:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9173:37:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9173:37:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;9173:37:0;;;;;;;;;;;;;;;;;9228:36;9242:12;;;;;;;;;;;9256:7;9228:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;9014:258;:::o;1186:20::-;;;;;;;;;;;;;:::o;1852:192::-;1647:5;;;;;;;;;;;1633:19;;:10;:19;;;1625:28;;;;;;;;1953:1;1933:22;;:8;:22;;;;1925:31;;;;;;;;2000:8;1972:37;;1993:5;;;;;;;;;;;1972:37;;;;;;;;;;;;2028:8;2020:5;;:16;;;;;;;;;;;;;;;;;;1852:192;:::o;8309:27::-;;;;;;;;;;;;;:::o;8345:::-;;;;;;;;;;;;;:::o
Swarm Source
bzzr://f167caa061adee8b78d067e92a800f121b626e2841b2d9f6bb8b713c0cc6d84e
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.