Overview
Max Total Supply
8,000,000,000 SWL
Holders
175 (0.00%)
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 8 Decimals)
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Swiftlance
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-09-04 */ /* **************************** **************************** Swiftlance token contract **************************** **************************** */ pragma solidity ^0.4.24; /** * @title SafeMath */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } 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 a / b; } /** * @dev Subtracts 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 c) { c = a + b; assert(c >= a); return c; } } contract ERC20Basic { uint256 public totalSupply; function balanceOf(address who) public constant 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 constant 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); } contract Swiftlance is ERC20 { using SafeMath for uint256; address public owner; mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) allowed; string public constant name = "Swiftlance token"; string public constant symbol = "SWL"; uint public constant decimals = 8; uint256 public maxSupply = 8000000000e8; uint256 public constant minContrib = 1 ether / 100; uint256 public SWLPerEther = 20000000e8; event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); event Burn(address indexed burner, uint256 value); constructor () public { totalSupply = maxSupply; balances[msg.sender] = maxSupply; owner = msg.sender; } modifier onlyOwner() { require(msg.sender == owner); _; } function () public payable { buySWL(); } function dividend(uint256 _amount) internal view returns (uint256){ if(_amount >= SWLPerEther.div(2) && _amount < SWLPerEther){ return ((20*_amount).div(100)).add(_amount);} else if(_amount >= SWLPerEther && _amount < SWLPerEther.mul(5)){return ((40*_amount).div(100)).add(_amount);} else if(_amount >= SWLPerEther.mul(5)){return ((70*_amount).div(100)).add(_amount);} return _amount; } function buySWL() payable public { address investor = msg.sender; uint256 tokenAmt = SWLPerEther.mul(msg.value) / 1 ether; require(msg.value >= minContrib && msg.value > 0); tokenAmt = dividend(tokenAmt); require(balances[owner] >= tokenAmt); balances[owner] -= tokenAmt; balances[investor] += tokenAmt; emit Transfer(this, investor, tokenAmt); } function balanceOf(address _owner) constant public returns (uint256) { return balances[_owner]; } //mitigates the ERC20 short address attack //suggested by izqui9 @ http://bit.ly/2NMMCNv modifier onlyPayloadSize(uint size) { assert(msg.data.length >= size + 4); _; } function transfer(address _to, uint256 _amount) onlyPayloadSize(2 * 32) public returns (bool success) { require(_to != address(0)); require(_amount <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_amount); balances[_to] = balances[_to].add(_amount); emit Transfer(msg.sender, _to, _amount); return true; } function transferFrom(address _from, address _to, uint256 _amount) onlyPayloadSize(3 * 32) public returns (bool success) { require(_to != address(0)); require(_amount <= balances[_from]); require(_amount <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_amount); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_amount); balances[_to] = balances[_to].add(_amount); emit Transfer(_from, _to, _amount); return true; } function approve(address _spender, uint256 _value) public returns (bool success) { if (_value != 0 && allowed[msg.sender][_spender] != 0) { return false; } allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } function allowance(address _owner, address _spender) constant public returns (uint256) { return allowed[_owner][_spender]; } function transferOwnership(address _newOwner) onlyOwner public { if (_newOwner != address(0)) { owner = _newOwner; } } function withdrawFund() onlyOwner public { address thisCont = this; uint256 ethBal = thisCont.balance; owner.transfer(ethBal); } function burn(uint256 _value) onlyOwner public { require(_value <= balances[msg.sender]); address burner = msg.sender; balances[burner] = balances[burner].sub(_value); totalSupply = totalSupply.sub(_value); emit Burn(burner, _value); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"buySWL","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_value","type":"uint256"}],"name":"burn","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"SWLPerEther","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"maxSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"withdrawFund","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"minContrib","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"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":true,"name":"_to","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_spender","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"burner","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Burn","type":"event"}]
Contract Creation Code
6080604052670b1a2bc2ec50000060045566071afd498d000060055534801561002757600080fd5b50600454600081815533808252600260205260409091209190915560018054600160a060020a0319169091179055610b2e806100646000396000f3006080604052600436106100f05763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100fa578063095ea7b31461018457806318160ddd146101bc57806323b872dd146101e357806331014853146100f0578063313ce5671461020d57806342966c68146102225780634b61cf171461023a57806370a082311461024f5780638da5cb5b1461027057806395d89b41146102a1578063a9059cbb146102b6578063d5abeb01146102da578063dd62ed3e146102ef578063e07fa3c114610316578063ebc33c511461032b578063f2fde38b14610340575b6100f8610361565b005b34801561010657600080fd5b5061010f610454565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610149578181015183820152602001610131565b50505050905090810190601f1680156101765780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561019057600080fd5b506101a8600160a060020a036004351660243561048b565b604080519115158252519081900360200190f35b3480156101c857600080fd5b506101d1610533565b60408051918252519081900360200190f35b3480156101ef57600080fd5b506101a8600160a060020a0360043581169060243516604435610539565b34801561021957600080fd5b506101d16106be565b34801561022e57600080fd5b506100f86004356106c3565b34801561024657600080fd5b506101d161078d565b34801561025b57600080fd5b506101d1600160a060020a0360043516610793565b34801561027c57600080fd5b506102856107b2565b60408051600160a060020a039092168252519081900360200190f35b3480156102ad57600080fd5b5061010f6107c1565b3480156102c257600080fd5b506101a8600160a060020a03600435166024356107f8565b3480156102e657600080fd5b506101d16108e9565b3480156102fb57600080fd5b506101d1600160a060020a03600435811690602435166108ef565b34801561032257600080fd5b506100f861091a565b34801561033757600080fd5b506101d161097c565b34801561034c57600080fd5b506100f8600160a060020a0360043516610987565b6005543390600090670de0b6b3a764000090610383903463ffffffff6109d916565b81151561038c57fe5b049050662386f26fc1000034101580156103a65750600034115b15156103b157600080fd5b6103ba81610a02565b600154600160a060020a03166000908152600260205260409020549091508111156103e457600080fd5b600154600160a060020a039081166000908152600260209081526040808320805486900390559285168083529183902080548501905582518481529251919230927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35050565b60408051808201909152601081527f53776966746c616e636520746f6b656e00000000000000000000000000000000602082015281565b600081158015906104be5750336000908152600360209081526040808320600160a060020a038716845290915290205415155b156104cb5750600061052d565b336000818152600360209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b60005481565b60006060606436101561054857fe5b600160a060020a038416151561055d57600080fd5b600160a060020a03851660009081526002602052604090205483111561058257600080fd5b600160a060020a03851660009081526003602090815260408083203384529091529020548311156105b257600080fd5b600160a060020a0385166000908152600260205260409020546105db908463ffffffff610ace16565b600160a060020a0386166000908152600260209081526040808320939093556003815282822033835290522054610618908463ffffffff610ace16565b600160a060020a03808716600090815260036020908152604080832033845282528083209490945591871681526002909152205461065c908463ffffffff610ae016565b600160a060020a0380861660008181526002602090815260409182902094909455805187815290519193928916927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3506001949350505050565b600881565b600154600090600160a060020a031633146106dd57600080fd5b336000908152600260205260409020548211156106f957600080fd5b503360008181526002602052604090205461071a908363ffffffff610ace16565b600160a060020a03821660009081526002602052604081209190915554610747908363ffffffff610ace16565b600055604080518381529051600160a060020a038316917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a25050565b60055481565b600160a060020a0381166000908152600260205260409020545b919050565b600154600160a060020a031681565b60408051808201909152600381527f53574c0000000000000000000000000000000000000000000000000000000000602082015281565b60006040604436101561080757fe5b600160a060020a038416151561081c57600080fd5b3360009081526002602052604090205483111561083857600080fd5b33600090815260026020526040902054610858908463ffffffff610ace16565b3360009081526002602052604080822092909255600160a060020a0386168152205461088a908463ffffffff610ae016565b600160a060020a0385166000818152600260209081526040918290209390935580518681529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35060019392505050565b60045481565b600160a060020a03918216600090815260036020908152604080832093909416825291909152205490565b6001546000908190600160a060020a0316331461093657600080fd5b50506001546040513091823191600160a060020a03909116906108fc8315029083906000818181858888f19350505050158015610977573d6000803e3d6000fd5b505050565b662386f26fc1000081565b600154600160a060020a0316331461099e57600080fd5b600160a060020a038116156109d6576001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b50565b60008215156109ea5750600061052d565b508181028183828115156109fa57fe5b041461052d57fe5b600554600090610a1990600263ffffffff610aed16565b8210158015610a29575060055482105b15610a5957610a5282610a4660148202606463ffffffff610aed16565b9063ffffffff610ae016565b90506107ad565b6005548210158015610a7c575060058054610a799163ffffffff6109d916565b82105b15610a9957610a5282610a4660288202606463ffffffff610aed16565b60058054610aac9163ffffffff6109d916565b8210610aca57610a5282610a4660468202606463ffffffff610aed16565b5090565b600082821115610ada57fe5b50900390565b8181018281101561052d57fe5b60008183811515610afa57fe5b0493925050505600a165627a7a72305820cb50ceb04c3cfb43956ba1cb654a5da40b52e6a6705fe79e957376b8f08c76ac0029
Deployed Bytecode
0x6080604052600436106100f05763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100fa578063095ea7b31461018457806318160ddd146101bc57806323b872dd146101e357806331014853146100f0578063313ce5671461020d57806342966c68146102225780634b61cf171461023a57806370a082311461024f5780638da5cb5b1461027057806395d89b41146102a1578063a9059cbb146102b6578063d5abeb01146102da578063dd62ed3e146102ef578063e07fa3c114610316578063ebc33c511461032b578063f2fde38b14610340575b6100f8610361565b005b34801561010657600080fd5b5061010f610454565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610149578181015183820152602001610131565b50505050905090810190601f1680156101765780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561019057600080fd5b506101a8600160a060020a036004351660243561048b565b604080519115158252519081900360200190f35b3480156101c857600080fd5b506101d1610533565b60408051918252519081900360200190f35b3480156101ef57600080fd5b506101a8600160a060020a0360043581169060243516604435610539565b34801561021957600080fd5b506101d16106be565b34801561022e57600080fd5b506100f86004356106c3565b34801561024657600080fd5b506101d161078d565b34801561025b57600080fd5b506101d1600160a060020a0360043516610793565b34801561027c57600080fd5b506102856107b2565b60408051600160a060020a039092168252519081900360200190f35b3480156102ad57600080fd5b5061010f6107c1565b3480156102c257600080fd5b506101a8600160a060020a03600435166024356107f8565b3480156102e657600080fd5b506101d16108e9565b3480156102fb57600080fd5b506101d1600160a060020a03600435811690602435166108ef565b34801561032257600080fd5b506100f861091a565b34801561033757600080fd5b506101d161097c565b34801561034c57600080fd5b506100f8600160a060020a0360043516610987565b6005543390600090670de0b6b3a764000090610383903463ffffffff6109d916565b81151561038c57fe5b049050662386f26fc1000034101580156103a65750600034115b15156103b157600080fd5b6103ba81610a02565b600154600160a060020a03166000908152600260205260409020549091508111156103e457600080fd5b600154600160a060020a039081166000908152600260209081526040808320805486900390559285168083529183902080548501905582518481529251919230927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35050565b60408051808201909152601081527f53776966746c616e636520746f6b656e00000000000000000000000000000000602082015281565b600081158015906104be5750336000908152600360209081526040808320600160a060020a038716845290915290205415155b156104cb5750600061052d565b336000818152600360209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b60005481565b60006060606436101561054857fe5b600160a060020a038416151561055d57600080fd5b600160a060020a03851660009081526002602052604090205483111561058257600080fd5b600160a060020a03851660009081526003602090815260408083203384529091529020548311156105b257600080fd5b600160a060020a0385166000908152600260205260409020546105db908463ffffffff610ace16565b600160a060020a0386166000908152600260209081526040808320939093556003815282822033835290522054610618908463ffffffff610ace16565b600160a060020a03808716600090815260036020908152604080832033845282528083209490945591871681526002909152205461065c908463ffffffff610ae016565b600160a060020a0380861660008181526002602090815260409182902094909455805187815290519193928916927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3506001949350505050565b600881565b600154600090600160a060020a031633146106dd57600080fd5b336000908152600260205260409020548211156106f957600080fd5b503360008181526002602052604090205461071a908363ffffffff610ace16565b600160a060020a03821660009081526002602052604081209190915554610747908363ffffffff610ace16565b600055604080518381529051600160a060020a038316917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a25050565b60055481565b600160a060020a0381166000908152600260205260409020545b919050565b600154600160a060020a031681565b60408051808201909152600381527f53574c0000000000000000000000000000000000000000000000000000000000602082015281565b60006040604436101561080757fe5b600160a060020a038416151561081c57600080fd5b3360009081526002602052604090205483111561083857600080fd5b33600090815260026020526040902054610858908463ffffffff610ace16565b3360009081526002602052604080822092909255600160a060020a0386168152205461088a908463ffffffff610ae016565b600160a060020a0385166000818152600260209081526040918290209390935580518681529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35060019392505050565b60045481565b600160a060020a03918216600090815260036020908152604080832093909416825291909152205490565b6001546000908190600160a060020a0316331461093657600080fd5b50506001546040513091823191600160a060020a03909116906108fc8315029083906000818181858888f19350505050158015610977573d6000803e3d6000fd5b505050565b662386f26fc1000081565b600154600160a060020a0316331461099e57600080fd5b600160a060020a038116156109d6576001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b50565b60008215156109ea5750600061052d565b508181028183828115156109fa57fe5b041461052d57fe5b600554600090610a1990600263ffffffff610aed16565b8210158015610a29575060055482105b15610a5957610a5282610a4660148202606463ffffffff610aed16565b9063ffffffff610ae016565b90506107ad565b6005548210158015610a7c575060058054610a799163ffffffff6109d916565b82105b15610a9957610a5282610a4660288202606463ffffffff610aed16565b60058054610aac9163ffffffff6109d916565b8210610aca57610a5282610a4660468202606463ffffffff610aed16565b5090565b600082821115610ada57fe5b50900390565b8181018281101561052d57fe5b60008183811515610afa57fe5b0493925050505600a165627a7a72305820cb50ceb04c3cfb43956ba1cb654a5da40b52e6a6705fe79e957376b8f08c76ac0029
Swarm Source
bzzr://cb50ceb04c3cfb43956ba1cb654a5da40b52e6a6705fe79e957376b8f08c76ac
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.