Address Contract Partially Verified
Address
0x19E6BF254aBf5ABC925ad72d32bac44C6c03d3a4
Balance
0 ETH
Nonce
1
Code Size
3174 bytes
Creator
0xF9AA1897...e901 at tx 0x0da25b1d...ed210e
Indexed Transactions
0
Contract Bytecode
3174 bytes
0x608060405234801561001057600080fd5b50600436106100575760003560e01c80631f9d1c921461005c5780632e1a7d4d146100b45780638f4ffcb1146100e2578063c7e284b8146101e7578063f8b2cb4f14610205575b600080fd5b61009e6004803603602081101561007257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061025d565b6040518082815260200191505060405180910390f35b6100e0600480360360208110156100ca57600080fd5b81019080803590602001909291905050506102a6565b005b6101e5600480360360808110156100f857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561015f57600080fd5b82018360208201111561017157600080fd5b8035906020019184600183028401116401000000008311171561019357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610703565b005b6101ef610a28565b6040518082815260200191505060405180910390f35b6102476004803603602081101561021b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610aab565b6040518082815260200191505060405180910390f35b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b80600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561035b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f596f7520646f206e6f74206861766520656e6f75676820746f6b656e7321000081525060200191505060405180910390fd5b6000544210156103d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f546f6b656e7320617265206c6f636b656421000000000000000000000000000081525060200191505060405180910390fd5b6305f5e1006103e802811115610434576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180610bd86024913960400191505060405180910390fd5b62093a80600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054014210156104d1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180610b426022913960400191505060405180910390fd5b7326946ada5ecb57f3a1f91605050ce45c482c9eb173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561056c57600080fd5b505af1158015610580573d6000803e3d6000fd5b505050506040513d602081101561059657600080fd5b8101908080519060200190929190505050610619576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f436f756c64206e6f742077697468647261772042536f5621000000000000000081525060200191505060405180910390fd5b80600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555042600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff167f52281bdae4847001e3dc97f408c43fa2f8b5c4438279806255fc5ee00fc5195b8242604051808381526020018281526020019250505060405180910390a250565b7326946ada5ecb57f3a1f91605050ce45c482c9eb173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161461079b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180610b646029913960400191505060405180910390fd5b606483116107f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252604b815260200180610b8d604b913960600191505060405180910390fd5b7326946ada5ecb57f3a1f91605050ce45c482c9eb173ffffffffffffffffffffffffffffffffffffffff166323b872dd8530866040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1580156108c357600080fd5b505af11580156108d7573d6000803e3d6000fd5b505050506040513d60208110156108ed57600080fd5b8101908080519060200190929190505050610953576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526036815260200180610bfc6036913960400191505060405180910390fd5b600061097c606461096e606387610af490919063ffffffff16565b610b2190919063ffffffff16565b905080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508473ffffffffffffffffffffffffffffffffffffffff167fb54471ef4300c80735460d3ac0c87ad0ea1a75449c6250c1291a4018779390e68242604051808381526020018281526020019250505060405180910390a25050505050565b60004260005411610aa1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f546865206675747572652069732068657265210000000000000000000000000081525060200191505060405180910390fd5b4260005403905090565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600081830290506000831480610b12575081838281610b0f57fe5b04145b610b1b57600080fd5b92915050565b6000808211610b2f57600080fd5b818381610b3857fe5b0490509291505056fe547279696e6720746f20776974686472617720746f6f206672657175656e746c792143616e206f6e6c79206465706f7369742042536f5620696e746f207468697320636f6e7472616374214d7573742062652067726561746572207468616e20313030204d756e646f7320746f206b6565702070656f706c652066726f6d207768696e696e672061626f757420746865206d61746821547279696e6720746f20776974686472617720746f6f206d756368206174206f6e636521436f756c64206e6f74207472616e736665722042536f5620746f2054696d65204c6f636b20636f6e747261637420616464726573732ea265627a7a7230582037f290e8120db212697c01b8a297a9cc1f491755c092bd044fce2616aac0fba664736f6c634300050a0032
Verified Source Code Partial Match
Compiler: v0.5.10+commit.5a6ea5b1
EVM: petersburg
Optimization: No
LockMyBSOV.sol 111 lines
pragma solidity ^0.5.10;
// BitcoinSov Token TimeLock
//
// DO NOT SEND TOKENS DIRECTLY TO THIS CONTRACT!!!
// THEY WILL BE LOST FOREVER!!!
//
// For instructions on how to use this contract, please see the post on reddit.com/r/BitcoinSoV
//
// This contract locks all BSoV for 180 days once the contract is deployed. Tokens can be added at any TimeLock
// within that period without resetting the timer.
//
// After the desired date is reached, users can withdraw tokens with a rate limit to prevent all holders
// from withdrawing and selling at the same time. The limit is 1,000 BSoV per week once the 180 days is hit.
library SafeMath {
function add(uint a, uint b) internal pure returns(uint c) {
c = a + b;
require(c >= a);
}
function sub(uint a, uint b) internal pure returns(uint c) {
require(b <= a);
c = a - b;
}
function mul(uint a, uint b) internal pure returns(uint c) {
c = a * b;
require(a == 0 || c / a == b);
}
function div(uint a, uint b) internal pure returns(uint c) {
require(b > 0);
c = a / b;
}
}
contract ERC20Interface {
function totalSupply() public view returns(uint);
function balanceOf(address tokenOwner) public view returns(uint balance);
function allowance(address tokenOwner, address spender) public view returns(uint remaining);
function transfer(address to, uint tokens) public returns(bool success);
function approve(address spender, uint tokens) public returns(bool success);
function transferFrom(address from, address to, uint tokens) public returns(bool success);
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}
contract LockMyBSOV {
using SafeMath for uint;
address constant tokenContract = 0x26946adA5eCb57f3A1F91605050Ce45c482C9Eb1;
uint constant PRECISION = 100000000;
uint constant timeUntilUnlocked = 180 days; // All tokens locked for 180 days after contract creation.
uint constant maxWithdrawalAmount = 1000 * PRECISION; // Max withdrawal of 2.5k tokens per week per user once 180 days is hit.
uint constant timeBetweenWithdrawals = 7 days;
uint unfreezeDate;
mapping (address => uint) balance;
mapping (address => uint) lastWithdrawal;
event TokensFrozen (
address indexed addr,
uint256 amt,
uint256 time
);
event TokensUnfrozen (
address indexed addr,
uint256 amt,
uint256 time
);
constructor() public {
unfreezeDate = now + timeUntilUnlocked;
}
function withdraw(uint _amount) public {
require(balance[msg.sender] >= _amount, "You do not have enough tokens!");
require(now >= unfreezeDate, "Tokens are locked!");
require(_amount <= maxWithdrawalAmount, "Trying to withdraw too much at once!");
require(now >= lastWithdrawal[msg.sender] + timeBetweenWithdrawals, "Trying to withdraw too frequently!");
require(ERC20Interface(tokenContract).transfer(msg.sender, _amount), "Could not withdraw BSoV!");
balance[msg.sender] -= _amount;
lastWithdrawal[msg.sender] = now;
emit TokensUnfrozen(msg.sender, _amount, now);
}
function getBalance(address _addr) public view returns (uint256 _balance) {
return balance[_addr];
}
function getLastWithdrawal(address _addr) public view returns (uint256 _lastWithdrawal) {
return lastWithdrawal[_addr];
}
function getTimeLeft() public view returns (uint256 _timeLeft) {
require(unfreezeDate > now, "The future is here!");
return unfreezeDate - now;
}
function receiveApproval(address _sender, uint256 _value, address _tokenContract, bytes memory _extraData) public {
require(_tokenContract == tokenContract, "Can only deposit BSoV into this contract!");
require(_value > 100, "Must be greater than 100 Mundos to keep people from whining about the math!");
require(ERC20Interface(tokenContract).transferFrom(_sender, address(this), _value), "Could not transfer BSoV to Time Lock contract address.");
uint _adjustedValue = _value.mul(99).div(100);
balance[_sender] += _adjustedValue;
emit TokensFrozen(_sender, _adjustedValue, now);
}
}
Read Contract
getBalance 0xf8b2cb4f → uint256
getLastWithdrawal 0x1f9d1c92 → uint256
getTimeLeft 0xc7e284b8 → uint256
Write Contract 2 functions
These functions modify contract state and require a wallet transaction to execute.
receiveApproval 0x8f4ffcb1
address _sender
uint256 _value
address _tokenContract
bytes _extraData
withdraw 0x2e1a7d4d
uint256 _amount
Recent Transactions
No transactions found for this address