Address Contract Partially Verified
Address
0x8790f2fc7Ca2e7Db841307FB3f4e72a03Baf7b47
Balance
0.006000 ETH
Nonce
1
Code Size
7941 bytes
Creator
0x618f5F2C...5D64 at tx 0xa7ae611b...df5679
Indexed Transactions
0
Contract Bytecode
7941 bytes
0x6080604052600436106102555760003560e01c806389a3027111610139578063c0246668116100b6578063dd62ed3e1161007a578063dd62ed3e14610707578063e2f456051461074d578063f11a24d314610763578063f2fde38b14610779578063f637434214610799578063f8b45b05146107af57600080fd5b8063c02466681461067b578063c18bc1951461069b578063c8c8ebe4146106bb578063d257b34f146106d1578063d85ba063146106f157600080fd5b806395d89b41116100fd57806395d89b41146105fb5780639c3b4fdc14610610578063a0d82dc514610626578063a9059cbb1461063c578063bbc0c7421461065c57600080fd5b806389a30271146105685780638a8c523c146105885780638da5cb5b1461059d5780638ea5220f146105bb578063924de9b7146105db57600080fd5b8063313ce567116101d25780636a486a8e116101965780636a486a8e146104b25780636ddd1713146104c857806370a08231146104e8578063715018a61461051e578063751039fc146105335780637571336a1461054857600080fd5b8063313ce567146103ef57806349bd5a5e1461040b5780634a62bb651461043f5780634fbee1931461045957806366ca9b831461049257600080fd5b806318160ddd1161021957806318160ddd1461035a5780631816467f14610379578063203e727e1461039957806323b872dd146103b957806327c8f835146103d957600080fd5b806302dbd8f81461026157806306fdde0314610283578063095ea7b3146102ae57806310d5de53146102de5780631694505e1461030e57600080fd5b3661025c57005b600080fd5b34801561026d57600080fd5b5061028161027c366004611b1b565b6107c5565b005b34801561028f57600080fd5b50610298610865565b6040516102a59190611b3d565b60405180910390f35b3480156102ba57600080fd5b506102ce6102c9366004611ba9565b6108f7565b60405190151581526020016102a5565b3480156102ea57600080fd5b506102ce6102f9366004611bd3565b60136020526000908152604090205460ff1681565b34801561031a57600080fd5b506103427f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d81565b6040516001600160a01b0390911681526020016102a5565b34801561036657600080fd5b506002545b6040519081526020016102a5565b34801561038557600080fd5b50610281610394366004611bd3565b61090d565b3480156103a557600080fd5b506102816103b4366004611bee565b610994565b3480156103c557600080fd5b506102ce6103d4366004611c07565b610a71565b3480156103e557600080fd5b5061034261dead81565b3480156103fb57600080fd5b50604051601281526020016102a5565b34801561041757600080fd5b506103427f000000000000000000000000e59fd78557093a0beb569369ef8f47bc48a32c7581565b34801561044b57600080fd5b50600b546102ce9060ff1681565b34801561046557600080fd5b506102ce610474366004611bd3565b6001600160a01b031660009081526012602052604090205460ff1690565b34801561049e57600080fd5b506102816104ad366004611b1b565b610b1b565b3480156104be57600080fd5b5061036b600f5481565b3480156104d457600080fd5b50600b546102ce9062010000900460ff1681565b3480156104f457600080fd5b5061036b610503366004611bd3565b6001600160a01b031660009081526020819052604090205490565b34801561052a57600080fd5b50610281610bae565b34801561053f57600080fd5b506102ce610be4565b34801561055457600080fd5b50610281610563366004611c53565b610c21565b34801561057457600080fd5b50600654610342906001600160a01b031681565b34801561059457600080fd5b50610281610c76565b3480156105a957600080fd5b506005546001600160a01b0316610342565b3480156105c757600080fd5b50600754610342906001600160a01b031681565b3480156105e757600080fd5b506102816105f6366004611c86565b610cb3565b34801561060757600080fd5b50610298610cf9565b34801561061c57600080fd5b5061036b600d5481565b34801561063257600080fd5b5061036b60105481565b34801561064857600080fd5b506102ce610657366004611ba9565b610d08565b34801561066857600080fd5b50600b546102ce90610100900460ff1681565b34801561068757600080fd5b50610281610696366004611c53565b610d15565b3480156106a757600080fd5b506102816106b6366004611bee565b610d9e565b3480156106c757600080fd5b5061036b60085481565b3480156106dd57600080fd5b506102ce6106ec366004611bee565b610e6f565b3480156106fd57600080fd5b5061036b600c5481565b34801561071357600080fd5b5061036b610722366004611ca1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b34801561075957600080fd5b5061036b60095481565b34801561076f57600080fd5b5061036b600e5481565b34801561078557600080fd5b50610281610794366004611bd3565b610fc6565b3480156107a557600080fd5b5061036b60115481565b3480156107bb57600080fd5b5061036b600a5481565b6005546001600160a01b031633146107f85760405162461bcd60e51b81526004016107ef90611ccb565b60405180910390fd5b6010829055601181905561080c8183611d16565b600f819055600a10156108615760405162461bcd60e51b815260206004820152601d60248201527f4d757374206b656570206665657320617420313025206f72206c65737300000060448201526064016107ef565b5050565b60606003805461087490611d2e565b80601f01602080910402602001604051908101604052809291908181526020018280546108a090611d2e565b80156108ed5780601f106108c2576101008083540402835291602001916108ed565b820191906000526020600020905b8154815290600101906020018083116108d057829003601f168201915b5050505050905090565b6000610904338484611061565b50600192915050565b6005546001600160a01b031633146109375760405162461bcd60e51b81526004016107ef90611ccb565b6007546040516001600160a01b03918216918316907f90b8024c4923d3873ff5b9fcb43d0360d4b9217fa41225d07ba379993552e74390600090a3600780546001600160a01b0319166001600160a01b0392909216919091179055565b6005546001600160a01b031633146109be5760405162461bcd60e51b81526004016107ef90611ccb565b670de0b6b3a76400006103e86109d360025490565b6109de906001611d68565b6109e89190611d87565b6109f29190611d87565b811015610a595760405162461bcd60e51b815260206004820152602f60248201527f43616e6e6f7420736574206d61785472616e73616374696f6e416d6f756e742060448201526e6c6f776572207468616e20302e312560881b60648201526084016107ef565b610a6b81670de0b6b3a7640000611d68565b60085550565b6000610a7e848484611185565b6001600160a01b038416600090815260016020908152604080832033845290915290205482811015610b035760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084016107ef565b610b108533858403611061565b506001949350505050565b6005546001600160a01b03163314610b455760405162461bcd60e51b81526004016107ef90611ccb565b600d829055600e819055610b598183611d16565b600c819055600a10156108615760405162461bcd60e51b815260206004820152601d60248201527f4d757374206b656570206665657320617420313025206f72206c65737300000060448201526064016107ef565b6005546001600160a01b03163314610bd85760405162461bcd60e51b81526004016107ef90611ccb565b610be260006117c8565b565b6005546000906001600160a01b03163314610c115760405162461bcd60e51b81526004016107ef90611ccb565b50600b805460ff19169055600190565b6005546001600160a01b03163314610c4b5760405162461bcd60e51b81526004016107ef90611ccb565b6001600160a01b03919091166000908152601360205260409020805460ff1916911515919091179055565b6005546001600160a01b03163314610ca05760405162461bcd60e51b81526004016107ef90611ccb565b600b805462ffff00191662010100179055565b6005546001600160a01b03163314610cdd5760405162461bcd60e51b81526004016107ef90611ccb565b600b8054911515620100000262ff000019909216919091179055565b60606004805461087490611d2e565b6000610904338484611185565b6005546001600160a01b03163314610d3f5760405162461bcd60e51b81526004016107ef90611ccb565b6001600160a01b038216600081815260126020908152604091829020805460ff191685151590811790915591519182527f9d8f7706ea1113d1a167b526eca956215946dd36cc7df39eb16180222d8b5df7910160405180910390a25050565b6005546001600160a01b03163314610dc85760405162461bcd60e51b81526004016107ef90611ccb565b670de0b6b3a76400006103e8610ddd60025490565b610de8906005611d68565b610df29190611d87565b610dfc9190611d87565b811015610e575760405162461bcd60e51b8152602060048201526024808201527f43616e6e6f7420736574206d617857616c6c6574206c6f776572207468616e20604482015263302e352560e01b60648201526084016107ef565b610e6981670de0b6b3a7640000611d68565b600a5550565b6005546000906001600160a01b03163314610e9c5760405162461bcd60e51b81526004016107ef90611ccb565b620186a0610ea960025490565b610eb4906001611d68565b610ebe9190611d87565b821015610f2b5760405162461bcd60e51b815260206004820152603560248201527f5377617020616d6f756e742063616e6e6f74206265206c6f776572207468616e60448201527410181718181892903a37ba30b61039bab838363c9760591b60648201526084016107ef565b6103e8610f3760025490565b610f42906005611d68565b610f4c9190611d87565b821115610fb85760405162461bcd60e51b815260206004820152603460248201527f5377617020616d6f756e742063616e6e6f742062652068696768657220746861604482015273371018171a92903a37ba30b61039bab838363c9760611b60648201526084016107ef565b50600981905560015b919050565b6005546001600160a01b03163314610ff05760405162461bcd60e51b81526004016107ef90611ccb565b6001600160a01b0381166110555760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107ef565b61105e816117c8565b50565b6001600160a01b0383166110c35760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016107ef565b6001600160a01b0382166111245760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016107ef565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166111ab5760405162461bcd60e51b81526004016107ef90611da9565b6001600160a01b0382166111d15760405162461bcd60e51b81526004016107ef90611dee565b806000036111ea576111e58383600061181a565b505050565b600b5460ff16156114c2576005546001600160a01b0384811691161480159061122157506005546001600160a01b03838116911614155b801561123557506001600160a01b03821615155b801561124c57506001600160a01b03821661dead14155b80156112625750600654600160a01b900460ff16155b156114c257600b54610100900460ff166112fa576001600160a01b03831660009081526012602052604090205460ff16806112b557506001600160a01b03821660009081526012602052604090205460ff165b6112fa5760405162461bcd60e51b81526020600482015260166024820152752a3930b234b7339034b9903737ba1030b1ba34bb329760511b60448201526064016107ef565b7f000000000000000000000000e59fd78557093a0beb569369ef8f47bc48a32c756001600160a01b0316836001600160a01b031614801561135457506001600160a01b03821660009081526013602052604090205460ff16155b15611438576008548111156113c95760405162461bcd60e51b815260206004820152603560248201527f427579207472616e7366657220616d6f756e742065786365656473207468652060448201527436b0bc2a3930b739b0b1ba34b7b720b6b7bab73a1760591b60648201526084016107ef565b600a546001600160a01b0383166000908152602081905260409020546113ef9083611d16565b11156114335760405162461bcd60e51b815260206004820152601360248201527213585e081dd85b1b195d08195e18d959591959606a1b60448201526064016107ef565b6114c2565b6001600160a01b03821660009081526013602052604090205460ff166114c257600a546001600160a01b03831660009081526020819052604090205461147e9083611d16565b11156114c25760405162461bcd60e51b815260206004820152601360248201527213585e081dd85b1b195d08195e18d959591959606a1b60448201526064016107ef565b30600090815260208190526040902054600954811080159081906114ee5750600b5462010000900460ff165b80156115045750600654600160a01b900460ff16155b801561154157507f000000000000000000000000e59fd78557093a0beb569369ef8f47bc48a32c756001600160a01b0316846001600160a01b0316145b801561156657506001600160a01b03851660009081526012602052604090205460ff16155b801561158b57506001600160a01b03841660009081526012602052604090205460ff16155b156115b9576006805460ff60a01b1916600160a01b1790556115ab61196f565b6006805460ff60a01b191690555b6006546001600160a01b03861660009081526012602052604090205460ff600160a01b90920482161591168061160757506001600160a01b03851660009081526012602052604090205460ff165b15611610575060005b600080600083156117b2577f000000000000000000000000e59fd78557093a0beb569369ef8f47bc48a32c756001600160a01b0316886001600160a01b031614801561165e57506000600f54115b156116c457611683606461167d600f548a6119b990919063ffffffff16565b906119cc565b9250600f54601154846116969190611d68565b6116a09190611d87565b9150600f54601054846116b39190611d68565b6116bd9190611d87565b9050611763565b7f000000000000000000000000e59fd78557093a0beb569369ef8f47bc48a32c756001600160a01b0316896001600160a01b031614801561170757506000600c54115b1561176357611726606461167d600c548a6119b990919063ffffffff16565b9250600c54600e54846117399190611d68565b6117439190611d87565b9150600c54600d54846117569190611d68565b6117609190611d87565b90505b82156117745761177489308561181a565b81156117a5576117a5307f000000000000000000000000e59fd78557093a0beb569369ef8f47bc48a32c758461181a565b6117af8388611e31565b96505b6117bd89898961181a565b505050505050505050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b0383166118405760405162461bcd60e51b81526004016107ef90611da9565b6001600160a01b0382166118665760405162461bcd60e51b81526004016107ef90611dee565b6001600160a01b038316600090815260208190526040902054818110156118de5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016107ef565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290611915908490611d16565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161196191815260200190565b60405180910390a350505050565b306000908152602081905260408120549081900361198a5750565b600954611998906014611d68565b8111156119b0576009546119ad906014611d68565b90505b61105e816119d8565b60006119c58284611d68565b9392505050565b60006119c58284611d87565b6040805160028082526060820183526000926020830190803683370190505090503081600081518110611a0d57611a0d611e48565b6001600160a01b039283166020918202929092010152600654825191169082906001908110611a3e57611a3e611e48565b60200260200101906001600160a01b031690816001600160a01b031681525050611a89307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d84611061565b600754604051635c11d79560e01b81526001600160a01b037f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d811692635c11d79592611ae5928792600092889291909116904290600401611e5e565b600060405180830381600087803b158015611aff57600080fd5b505af1158015611b13573d6000803e3d6000fd5b505050505050565b60008060408385031215611b2e57600080fd5b50508035926020909101359150565b600060208083528351808285015260005b81811015611b6a57858101830151858201604001528201611b4e565b81811115611b7c576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b0381168114610fc157600080fd5b60008060408385031215611bbc57600080fd5b611bc583611b92565b946020939093013593505050565b600060208284031215611be557600080fd5b6119c582611b92565b600060208284031215611c0057600080fd5b5035919050565b600080600060608486031215611c1c57600080fd5b611c2584611b92565b9250611c3360208501611b92565b9150604084013590509250925092565b80358015158114610fc157600080fd5b60008060408385031215611c6657600080fd5b611c6f83611b92565b9150611c7d60208401611c43565b90509250929050565b600060208284031215611c9857600080fd5b6119c582611c43565b60008060408385031215611cb457600080fd5b611cbd83611b92565b9150611c7d60208401611b92565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008219821115611d2957611d29611d00565b500190565b600181811c90821680611d4257607f821691505b602082108103611d6257634e487b7160e01b600052602260045260246000fd5b50919050565b6000816000190483118215151615611d8257611d82611d00565b500290565b600082611da457634e487b7160e01b600052601260045260246000fd5b500490565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b600082821015611e4357611e43611d00565b500390565b634e487b7160e01b600052603260045260246000fd5b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611eae5784516001600160a01b031683529383019391830191600101611e89565b50506001600160a01b0396909616606085015250505060800152939250505056fea2646970667358221220790e2f4d71870c318c2ab27580a75e43bdc6b4b59aa4dfd925b9d5c728c9815164736f6c634300080f0033
Verified Source Code Partial Match
Compiler: v0.8.15+commit.e14f2714
EVM: london
Optimization: Yes (200 runs)
SpillWays.sol 1080 lines
/****
Welcome to SpillWays!
The place where your business is none of our business.
Created as a viable alternative to Tornado Cash, SpillWays is comprised of a fully decentralized protocol for private transactions on Ethereum. Fast, secure and scalable.
Token Details
Network: ERC-20
100 million supply
6% Buy
-3% Dev
-3% Liquidity
6% Sell
-3% Dev
-3% Liquidity
Join Our Community!
Medium :https://spillways.medium.com/
Telegram :https://t.me/SpillWaysJoin
Twitter :https://twitter.com/spillways10
Website :https://spillways.finance/
***/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
////// lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol
// OpenZeppelin Contracts v4.4.0 (token/ERC20/IERC20.sol)
/* pragma solidity ^0.8.0; */
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: 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
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
////// lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol
// OpenZeppelin Contracts v4.4.0 (token/ERC20/extensions/IERC20Metadata.sol)
/* pragma solidity ^0.8.0; */
/* import "../IERC20.sol"; */
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}
////// lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol
// OpenZeppelin Contracts v4.4.0 (token/ERC20/ERC20.sol)
/* pragma solidity ^0.8.0; */
/* import "./IERC20.sol"; */
/* import "./extensions/IERC20Metadata.sol"; */
/* import "../../utils/Context.sol"; */
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` on failure. This behavior is nonetheless
* conventional and does not conflict with the expectations of ERC20
* applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* The default value of {decimals} is 18. To select a different value for
* {decimals} you should overload it.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5.05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the value {ERC20} uses, unless this function is
* overridden;
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual override returns (uint8) {
return 18;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* Requirements:
*
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* - the caller must have allowance for ``sender``'s tokens of at least
* `amount`.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
uint256 currentAllowance = _allowances[sender][_msgSender()];
require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
unchecked {
_approve(sender, _msgSender(), currentAllowance - amount);
}
return true;
}
/**
* @dev Moves `amount` of tokens from `sender` to `recipient`.
*
* This internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
* - `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
*/
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
uint256 senderBalance = _balances[sender];
require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
unchecked {
_balances[sender] = senderBalance - amount;
}
_balances[recipient] += amount;
emit Transfer(sender, recipient, amount);
_afterTokenTransfer(sender, recipient, amount);
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply += amount;
_balances[account] += amount;
emit Transfer(address(0), account, amount);
_afterTokenTransfer(address(0), account, amount);
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* has been transferred to `to`.
* - when `from` is zero, `amount` tokens have been minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens have been burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
}
////// lib/openzeppelin-contracts/contracts/utils/math/SafeMath.sol
// OpenZeppelin Contracts v4.4.0 (utils/math/SafeMath.sol)
/* pragma solidity ^0.8.0; */
// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.
/**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
* now has built in overflow checking.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the substraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator.
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}
interface IUniswapV2Factory {
event PairCreated(
address indexed token0,
address indexed token1,
address pair,
uint256
);
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
interface IUniswapV2Router02 {
function factory() external pure returns (address);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
contract SpillWays is ERC20, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public immutable uniswapV2Router;
address public immutable uniswapV2Pair;
address public constant deadAddress = address(0xdead);
address public USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;
bool private swapping;
address public devWallet;
uint256 public maxTransactionAmount;
uint256 public swapTokensAtAmount;
uint256 public maxWallet;
bool public limitsInEffect = true;
bool public tradingActive = false;
bool public swapEnabled = true;
uint256 public buyTotalFees;
uint256 public buyDevFee;
uint256 public buyLiquidityFee;
uint256 public sellTotalFees;
uint256 public sellDevFee;
uint256 public sellLiquidityFee;
/******************/
// exlcude from fees and max transaction amount
mapping(address => bool) private _isExcludedFromFees;
mapping(address => bool) public _isExcludedMaxTransactionAmount;
event ExcludeFromFees(address indexed account, bool isExcluded);
event devWalletUpdated(
address indexed newWallet,
address indexed oldWallet
);
constructor() ERC20("SpillWays", "SpillWays") {
IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
excludeFromMaxTransaction(address(_uniswapV2Router), true);
uniswapV2Router = _uniswapV2Router;
uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory())
.createPair(address(this), USDC);
excludeFromMaxTransaction(address(uniswapV2Pair), true);
uint256 _buyDevFee = 6;
uint256 _buyLiquidityFee = 0;
uint256 _sellDevFee = 6;
uint256 _sellLiquidityFee = 0;
uint256 totalSupply = 100_000_000 * 1e18;
maxTransactionAmount = totalSupply * 1 / 100; // 2% from total supply maxTransactionAmountTxn
maxWallet = totalSupply * 2 / 100; // 2% from total supply maxWallet
swapTokensAtAmount = (totalSupply * 5) / 10000; // 0.05% swap wallet
buyDevFee = _buyDevFee;
buyLiquidityFee = _buyLiquidityFee;
buyTotalFees = buyDevFee + buyLiquidityFee;
sellDevFee = _sellDevFee;
sellLiquidityFee = _sellLiquidityFee;
sellTotalFees = sellDevFee + sellLiquidityFee;
devWallet = address(0x618f5F2C385602D49215F51d4551A0F27BE65D64); // set as dev wallet
// exclude from paying fees or having max transaction amount
excludeFromFees(owner(), true);
excludeFromFees(address(this), true);
excludeFromFees(address(0xdead), true);
excludeFromMaxTransaction(owner(), true);
excludeFromMaxTransaction(address(this), true);
excludeFromMaxTransaction(address(0xdead), true);
/*
_mint is an internal function in ERC20.sol that is only called here,
and CANNOT be called ever again
*/
_mint(msg.sender, totalSupply);
}
receive() external payable {}
// once enabled, can never be turned off
function enableTrading() external onlyOwner {
tradingActive = true;
swapEnabled = true;
}
// remove limits after token is stable
function removeLimits() external onlyOwner returns (bool) {
limitsInEffect = false;
return true;
}
// change the minimum amount of tokens to sell from fees
function updateSwapTokensAtAmount(uint256 newAmount)
external
onlyOwner
returns (bool)
{
require(
newAmount >= (totalSupply() * 1) / 100000,
"Swap amount cannot be lower than 0.001% total supply."
);
require(
newAmount <= (totalSupply() * 5) / 1000,
"Swap amount cannot be higher than 0.5% total supply."
);
swapTokensAtAmount = newAmount;
return true;
}
function updateMaxTxnAmount(uint256 newNum) external onlyOwner {
require(
newNum >= ((totalSupply() * 1) / 1000) / 1e18,
"Cannot set maxTransactionAmount lower than 0.1%"
);
maxTransactionAmount = newNum * (10**18);
}
function updateMaxWalletAmount(uint256 newNum) external onlyOwner {
require(
newNum >= ((totalSupply() * 5) / 1000) / 1e18,
"Cannot set maxWallet lower than 0.5%"
);
maxWallet = newNum * (10**18);
}
function excludeFromMaxTransaction(address updAds, bool isEx)
public
onlyOwner
{
_isExcludedMaxTransactionAmount[updAds] = isEx;
}
// only use to disable contract sales if absolutely necessary (emergency use only)
function updateSwapEnabled(bool enabled) external onlyOwner {
swapEnabled = enabled;
}
function updateBuyFees(
uint256 _devFee,
uint256 _liquidityFee
) external onlyOwner {
buyDevFee = _devFee;
buyLiquidityFee = _liquidityFee;
buyTotalFees = buyDevFee + buyLiquidityFee;
require(buyTotalFees <= 10, "Must keep fees at 10% or less");
}
function updateSellFees(
uint256 _devFee,
uint256 _liquidityFee
) external onlyOwner {
sellDevFee = _devFee;
sellLiquidityFee = _liquidityFee;
sellTotalFees = sellDevFee + sellLiquidityFee;
require(sellTotalFees <= 10, "Must keep fees at 10% or less");
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
_isExcludedFromFees[account] = excluded;
emit ExcludeFromFees(account, excluded);
}
function updateDevWallet(address newDevWallet)
external
onlyOwner
{
emit devWalletUpdated(newDevWallet, devWallet);
devWallet = newDevWallet;
}
function isExcludedFromFees(address account) public view returns (bool) {
return _isExcludedFromFees[account];
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
if (amount == 0) {
super._transfer(from, to, 0);
return;
}
if (limitsInEffect) {
if (
from != owner() &&
to != owner() &&
to != address(0) &&
to != address(0xdead) &&
!swapping
) {
if (!tradingActive) {
require(
_isExcludedFromFees[from] || _isExcludedFromFees[to],
"Trading is not active."
);
}
// at launch if the transfer delay is enabled, ensure the block timestamps for purchasers is set -- during launch.
//when buy
if (
from == uniswapV2Pair &&
!_isExcludedMaxTransactionAmount[to]
) {
require(
amount <= maxTransactionAmount,
"Buy transfer amount exceeds the maxTransactionAmount."
);
require(
amount + balanceOf(to) <= maxWallet,
"Max wallet exceeded"
);
}
else if (!_isExcludedMaxTransactionAmount[to]) {
require(
amount + balanceOf(to) <= maxWallet,
"Max wallet exceeded"
);
}
}
}
uint256 contractTokenBalance = balanceOf(address(this));
bool canSwap = contractTokenBalance >= swapTokensAtAmount;
if (
canSwap &&
swapEnabled &&
!swapping &&
to == uniswapV2Pair &&
!_isExcludedFromFees[from] &&
!_isExcludedFromFees[to]
) {
swapping = true;
swapBack();
swapping = false;
}
bool takeFee = !swapping;
// if any account belongs to _isExcludedFromFee account then remove the fee
if (_isExcludedFromFees[from] || _isExcludedFromFees[to]) {
takeFee = false;
}
uint256 fees = 0;
uint256 tokensForLiquidity = 0;
uint256 tokensForDev = 0;
// only take fees on buys/sells, do not take on wallet transfers
if (takeFee) {
// on sell
if (to == uniswapV2Pair && sellTotalFees > 0) {
fees = amount.mul(sellTotalFees).div(100);
tokensForLiquidity = (fees * sellLiquidityFee) / sellTotalFees;
tokensForDev = (fees * sellDevFee) / sellTotalFees;
}
// on buy
else if (from == uniswapV2Pair && buyTotalFees > 0) {
fees = amount.mul(buyTotalFees).div(100);
tokensForLiquidity = (fees * buyLiquidityFee) / buyTotalFees;
tokensForDev = (fees * buyDevFee) / buyTotalFees;
}
if (fees> 0) {
super._transfer(from, address(this), fees);
}
if (tokensForLiquidity > 0) {
super._transfer(address(this), uniswapV2Pair, tokensForLiquidity);
}
amount -= fees;
}
super._transfer(from, to, amount);
}
function swapTokensForUSDC(uint256 tokenAmount) private {
// generate the uniswap pair path of token -> weth
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = USDC;
_approve(address(this), address(uniswapV2Router), tokenAmount);
// make the swap
uniswapV2Router.swapExactTokensForTokensSupportingFeeOnTransferTokens(
tokenAmount,
0, // accept any amount of USDC
path,
devWallet,
block.timestamp
);
}
function swapBack() private {
uint256 contractBalance = balanceOf(address(this));
if (contractBalance == 0) {
return;
}
if (contractBalance > swapTokensAtAmount * 20) {
contractBalance = swapTokensAtAmount * 20;
}
swapTokensForUSDC(contractBalance);
}
}
Read Contract
USDC 0x89a30271 → address
_isExcludedMaxTransactionAmount 0x10d5de53 → bool
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
buyDevFee 0x9c3b4fdc → uint256
buyLiquidityFee 0xf11a24d3 → uint256
buyTotalFees 0xd85ba063 → uint256
deadAddress 0x27c8f835 → address
decimals 0x313ce567 → uint8
devWallet 0x8ea5220f → address
isExcludedFromFees 0x4fbee193 → bool
limitsInEffect 0x4a62bb65 → bool
maxTransactionAmount 0xc8c8ebe4 → uint256
maxWallet 0xf8b45b05 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
sellDevFee 0xa0d82dc5 → uint256
sellLiquidityFee 0xf6374342 → uint256
sellTotalFees 0x6a486a8e → uint256
swapEnabled 0x6ddd1713 → bool
swapTokensAtAmount 0xe2f45605 → uint256
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
tradingActive 0xbbc0c742 → bool
uniswapV2Pair 0x49bd5a5e → address
uniswapV2Router 0x1694505e → address
Write Contract 16 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
enableTrading 0x8a8c523c
No parameters
excludeFromFees 0xc0246668
address account
bool excluded
excludeFromMaxTransaction 0x7571336a
address updAds
bool isEx
removeLimits 0x751039fc
No parameters
returns: bool
renounceOwnership 0x715018a6
No parameters
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
updateBuyFees 0x66ca9b83
uint256 _devFee
uint256 _liquidityFee
updateDevWallet 0x1816467f
address newDevWallet
updateMaxTxnAmount 0x203e727e
uint256 newNum
updateMaxWalletAmount 0xc18bc195
uint256 newNum
updateSellFees 0x02dbd8f8
uint256 _devFee
uint256 _liquidityFee
updateSwapEnabled 0x924de9b7
bool enabled
updateSwapTokensAtAmount 0xd257b34f
uint256 newAmount
returns: bool
Recent Transactions
No transactions found for this address