Address Contract Verified
Address
0x7d0fe0DB46ec0017A89478E98C9FF86109aD4673
Balance
0 ETH
Nonce
1
Code Size
9383 bytes
Creator
0x2599843e...9f2f at tx 0xd803be59...e49bed
Indexed Transactions
0
Contract Bytecode
9383 bytes
0x6080604052600436106101445760003560e01c8063751039fc116100b6578063a9059cbb1161006f578063a9059cbb14610435578063b3c5630f14610472578063c9567bf91461049d578063dd62ed3e146104b4578063e530a7d0146104f1578063f2fde38b1461051c5761014b565b8063751039fc14610349578063864b3167146103605780638da5cb5b1461038957806395d89b41146103b4578063a4d66daf146103df578063a8aa1b311461040a5761014b565b806342966c681161010857806342966c681461024b578063653bce3114610274578063661e7ac41461029f57806370a08231146102ca578063715018a61461030757806373bc5a361461031e5761014b565b806306fdde0314610150578063095ea7b31461017b57806318160ddd146101b857806323b872dd146101e3578063313ce567146102205761014b565b3661014b57005b600080fd5b34801561015c57600080fd5b50610165610545565b6040516101729190611b2b565b60405180910390f35b34801561018757600080fd5b506101a2600480360381019061019d9190611be6565b6105d7565b6040516101af9190611c41565b60405180910390f35b3480156101c457600080fd5b506101cd6105fa565b6040516101da9190611c6b565b60405180910390f35b3480156101ef57600080fd5b5061020a60048036038101906102059190611c86565b610604565b6040516102179190611c41565b60405180910390f35b34801561022c57600080fd5b50610235610633565b6040516102429190611cf5565b60405180910390f35b34801561025757600080fd5b50610272600480360381019061026d9190611d10565b61063c565b005b34801561028057600080fd5b50610289610650565b6040516102969190611c6b565b60405180910390f35b3480156102ab57600080fd5b506102b4610656565b6040516102c19190611d4c565b60405180910390f35b3480156102d657600080fd5b506102f160048036038101906102ec9190611d67565b61067a565b6040516102fe9190611c6b565b60405180910390f35b34801561031357600080fd5b5061031c6106c2565b005b34801561032a57600080fd5b506103336106d6565b6040516103409190611c6b565b60405180910390f35b34801561035557600080fd5b5061035e6106dc565b005b34801561036c57600080fd5b5061038760048036038101906103829190611d10565b610759565b005b34801561039557600080fd5b5061039e6107bc565b6040516103ab9190611d4c565b60405180910390f35b3480156103c057600080fd5b506103c96107e6565b6040516103d69190611b2b565b60405180910390f35b3480156103eb57600080fd5b506103f4610878565b6040516104019190611c41565b60405180910390f35b34801561041657600080fd5b5061041f61088b565b60405161042c9190611d4c565b60405180910390f35b34801561044157600080fd5b5061045c60048036038101906104579190611be6565b6108b1565b6040516104699190611c41565b60405180910390f35b34801561047e57600080fd5b506104876108d4565b6040516104949190611c41565b60405180910390f35b3480156104a957600080fd5b506104b2610904565b005b3480156104c057600080fd5b506104db60048036038101906104d69190611d94565b6109a5565b6040516104e89190611c6b565b60405180910390f35b3480156104fd57600080fd5b50610506610a2c565b6040516105139190611d4c565b60405180910390f35b34801561052857600080fd5b50610543600480360381019061053e9190611d67565b610a50565b005b60606003805461055490611e03565b80601f016020809104026020016040519081016040528092919081815260200182805461058090611e03565b80156105cd5780601f106105a2576101008083540402835291602001916105cd565b820191906000526020600020905b8154815290600101906020018083116105b057829003601f168201915b5050505050905090565b6000806105e2610ad6565b90506105ef818585610ade565b600191505092915050565b6000600254905090565b60008061060f610ad6565b905061061c858285610af0565b610627858585610b84565b60019150509392505050565b60006012905090565b61064d610647610ad6565b82610c78565b50565b600f5481565b7f000000000000000000000000a87cb6c448d63c304f8838f38d6b7596c9d9f92481565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6106ca610cfa565b6106d46000610d81565b565b60105481565b6106e4610cfa565b600e60009054906101000a900460ff16610733576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161072a90611e80565b60405180910390fd5b6000600e60006101000a81548160ff021916908315150217905550600654600881905550565b610761610cfa565b60326006546107709190611efe565b8111156107b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107a990611fa1565b60405180910390fd5b8060108190555050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600480546107f590611e03565b80601f016020809104026020016040519081016040528092919081815260200182805461082190611e03565b801561086e5780601f106108435761010080835404028352916020019161086e565b820191906000526020600020905b81548152906001019060200180831161085157829003601f168201915b5050505050905090565b600e60009054906101000a900460ff1681565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806108bc610ad6565b90506108c9818585610b84565b600191505092915050565b60006010546108e23061067a565b101580156108ff5750601154600f54436108fc9190611fc1565b10155b905090565b61090c610cfa565b600960009054906101000a900460ff161561095c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161095390612041565b60405180910390fd5b6001600960006101000a81548160ff0219169083151502179055507f51cd7cc33235a1c89f708fecec535bf7cca0f94ed05216751befb052ca83e67960405160405180910390a1565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b7f0000000000000000000000002599843ecde0c7df32ec42bf4c7925f4bee29f2f81565b610a58610cfa565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610aca5760006040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401610ac19190611d4c565b60405180910390fd5b610ad381610d81565b50565b600033905090565b610aeb8383836001610e47565b505050565b6000610afc84846109a5565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610b7e5781811015610b6e578281836040517ffb8f41b2000000000000000000000000000000000000000000000000000000008152600401610b6593929190612061565b60405180910390fd5b610b7d84848484036000610e47565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610bf65760006040517f96c6fd1e000000000000000000000000000000000000000000000000000000008152600401610bed9190611d4c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610c685760006040517fec442f05000000000000000000000000000000000000000000000000000000008152600401610c5f9190611d4c565b60405180910390fd5b610c7383838361101e565b505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610cea5760006040517f96c6fd1e000000000000000000000000000000000000000000000000000000008152600401610ce19190611d4c565b60405180910390fd5b610cf68260008361101e565b5050565b610d02610ad6565b73ffffffffffffffffffffffffffffffffffffffff16610d206107bc565b73ffffffffffffffffffffffffffffffffffffffff1614610d7f57610d43610ad6565b6040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401610d769190611d4c565b60405180910390fd5b565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610eb95760006040517fe602df05000000000000000000000000000000000000000000000000000000008152600401610eb09190611d4c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610f2b5760006040517f94280d62000000000000000000000000000000000000000000000000000000008152600401610f229190611d4c565b60405180910390fd5b81600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508015611018578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161100f9190611c6b565b60405180910390a35b50505050565b601260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806110bf5750601260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b806111725750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141580156111715750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b5b806111895750601360009054906101000a900460ff165b1561119e5761119983838361149d565b611498565b600960009054906101000a900460ff166111ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111e4906120e4565b60405180910390fd5b600e60009054906101000a900460ff16156112ac57600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141580156112745750600854816112688461067a565b6112729190612104565b115b156112ab576040517fa9a44dff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614801561130d575061130c6108d4565b5b1561131b5761131a6116c2565b5b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036113be57600a600081548092919061138590612138565b91905055506064600d54600a541161139f57600c546113a2565b60055b836113ad9190612180565b6113b79190611efe565b9050611468565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361146757600b600081548092919061142690612138565b919050555060646002600d5461143c9190611efe565b600b541161144c57600c5461144f565b60055b8361145a9190612180565b6114649190611efe565b90505b5b600081111561148b5761147c84308361149d565b80826114889190611fc1565b91505b61149684848461149d565b505b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036114ef5780600260008282546114e39190612104565b925050819055506115c2565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508181101561157b578381836040517fe450d38c00000000000000000000000000000000000000000000000000000000815260040161157293929190612061565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361160b5780600260008282540392505081905550611658565b806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055505b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516116b59190611c6b565b60405180910390a3505050565b6001601360006101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156116fa576116f96121c2565b5b6040519080825280602002602001820160405280156117285781602001602082028036833780820191505090505b50905030816000815181106117405761173f6121f1565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118099190612235565b8160018151811061181d5761181c6121f1565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611884307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d601054610ade565b7f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff1663791ac94760105460008430426040518663ffffffff1660e01b81526004016118e8959493929190612365565b600060405180830381600087803b15801561190257600080fd5b505af1158015611916573d6000803e3d6000fd5b505050506000606460464761192b9190612180565b6119359190611efe565b90506119617f000000000000000000000000a87cb6c448d63c304f8838f38d6b7596c9d9f924826119ea565b61198b7f0000000000000000000000002599843ecde0c7df32ec42bf4c7925f4bee29f2f476119ea565b43600f819055507fd851aeb8e2074b285cc12da5e2fbf79e642e38f62ef8e59590790c157491ee056010546040516119c39190611c6b565b60405180910390a150506000601360006101000a81548160ff021916908315150217905550565b60008273ffffffffffffffffffffffffffffffffffffffff1682604051611a10906123f0565b60006040518083038185875af1925050503d8060008114611a4d576040519150601f19603f3d011682016040523d82523d6000602084013e611a52565b606091505b5050905080611a96576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a8d90612451565b60405180910390fd5b505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611ad5578082015181840152602081019050611aba565b60008484015250505050565b6000601f19601f8301169050919050565b6000611afd82611a9b565b611b078185611aa6565b9350611b17818560208601611ab7565b611b2081611ae1565b840191505092915050565b60006020820190508181036000830152611b458184611af2565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611b7d82611b52565b9050919050565b611b8d81611b72565b8114611b9857600080fd5b50565b600081359050611baa81611b84565b92915050565b6000819050919050565b611bc381611bb0565b8114611bce57600080fd5b50565b600081359050611be081611bba565b92915050565b60008060408385031215611bfd57611bfc611b4d565b5b6000611c0b85828601611b9b565b9250506020611c1c85828601611bd1565b9150509250929050565b60008115159050919050565b611c3b81611c26565b82525050565b6000602082019050611c566000830184611c32565b92915050565b611c6581611bb0565b82525050565b6000602082019050611c806000830184611c5c565b92915050565b600080600060608486031215611c9f57611c9e611b4d565b5b6000611cad86828701611b9b565b9350506020611cbe86828701611b9b565b9250506040611ccf86828701611bd1565b9150509250925092565b600060ff82169050919050565b611cef81611cd9565b82525050565b6000602082019050611d0a6000830184611ce6565b92915050565b600060208284031215611d2657611d25611b4d565b5b6000611d3484828501611bd1565b91505092915050565b611d4681611b72565b82525050565b6000602082019050611d616000830184611d3d565b92915050565b600060208284031215611d7d57611d7c611b4d565b5b6000611d8b84828501611b9b565b91505092915050565b60008060408385031215611dab57611daa611b4d565b5b6000611db985828601611b9b565b9250506020611dca85828601611b9b565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680611e1b57607f821691505b602082108103611e2e57611e2d611dd4565b5b50919050565b7f4c696d69747320616c72656164792072656d6f76656400000000000000000000600082015250565b6000611e6a601683611aa6565b9150611e7582611e34565b602082019050919050565b60006020820190508181036000830152611e9981611e5d565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000611f0982611bb0565b9150611f1483611bb0565b925082611f2457611f23611ea0565b5b828204905092915050565b7f56616c7565206d757374206265206c657373207468616e206f7220657175616c60008201527f20746f20737570706c79202f2035300000000000000000000000000000000000602082015250565b6000611f8b602f83611aa6565b9150611f9682611f2f565b604082019050919050565b60006020820190508181036000830152611fba81611f7e565b9050919050565b6000611fcc82611bb0565b9150611fd783611bb0565b9250828203905081811115611fef57611fee611ecf565b5b92915050565b7f656e61626c656421000000000000000000000000000000000000000000000000600082015250565b600061202b600883611aa6565b915061203682611ff5565b602082019050919050565b6000602082019050818103600083015261205a8161201e565b9050919050565b60006060820190506120766000830186611d3d565b6120836020830185611c5c565b6120906040830184611c5c565b949350505050565b7f54726164696e67206973206e6f74206f70656e00000000000000000000000000600082015250565b60006120ce601383611aa6565b91506120d982612098565b602082019050919050565b600060208201905081810360008301526120fd816120c1565b9050919050565b600061210f82611bb0565b915061211a83611bb0565b925082820190508082111561213257612131611ecf565b5b92915050565b600061214382611bb0565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361217557612174611ecf565b5b600182019050919050565b600061218b82611bb0565b915061219683611bb0565b92508282026121a481611bb0565b915082820484148315176121bb576121ba611ecf565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008151905061222f81611b84565b92915050565b60006020828403121561224b5761224a611b4d565b5b600061225984828501612220565b91505092915050565b6000819050919050565b6000819050919050565b600061229161228c61228784612262565b61226c565b611bb0565b9050919050565b6122a181612276565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6122dc81611b72565b82525050565b60006122ee83836122d3565b60208301905092915050565b6000602082019050919050565b6000612312826122a7565b61231c81856122b2565b9350612327836122c3565b8060005b8381101561235857815161233f88826122e2565b975061234a836122fa565b92505060018101905061232b565b5085935050505092915050565b600060a08201905061237a6000830188611c5c565b6123876020830187612298565b81810360408301526123998186612307565b90506123a86060830185611d3d565b6123b56080830184611c5c565b9695505050505050565b600081905092915050565b50565b60006123da6000836123bf565b91506123e5826123ca565b600082019050919050565b60006123fb826123cd565b9150819050919050565b7f73656e6420455448206661696c65640000000000000000000000000000000000600082015250565b600061243b600f83611aa6565b915061244682612405565b602082019050919050565b6000602082019050818103600083015261246a8161242e565b905091905056fea2646970667358221220cfdc6dc076f167a7be4c591186d9409f19c568518404bfd351b68527594b59aa64736f6c63430008170033
Verified Source Code Full Match
Compiler: v0.8.23+commit.f704f362
EVM: paris
Optimization: No
RuneStoneBot.sol 177 lines
// RuneStone Bot stands at the forefront of revolutionizing the integration of bots across popular social media platforms such as Telegram
// Website: https://runestone.bot
// Docs: https://docs.runestone.bot
// Telegram: https://t.me/RuneStoneRSB
// Twitter: https://twitter.com/RuneStoneRSB
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {IUniswapV2Router02} from "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import {IUniswapV2Factory} from "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
contract RuneStoneBot is ERC20, Ownable {
event SwapBack(uint256 amount);
event OpenTrading();
error MaxWalletAmountExceeded();
IUniswapV2Router02 immutable router =
IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
uint256 _totalSupply = 1_000_000 * 10 ** 18;
address public pair;
uint256 private _maxWallet = _totalSupply / 200;
bool private _trandingEnable;
uint256 private _buy;
uint256 private _sell;
uint256 private _initial = 25;
uint256 private _reduce = 25;
address public immutable MARKETING;
address public immutable DEVELOPMENT;
bool public limit = true;
uint256 public latestSwapback;
uint256 public swapTokenAt = 250 * 10 ** 18;
uint256 private delayBlock = 1;
mapping(address => bool) private _isExcludedFromFees;
modifier onSwap() {
_swaping = true;
_;
_swaping = false;
}
bool private _swaping = false;
constructor() ERC20("RuneStone Bot", "RSB") Ownable(_msgSender()) {
DEVELOPMENT = 0xA87cB6c448d63C304f8838F38D6B7596c9d9F924;
MARKETING = _msgSender();
pair = IUniswapV2Factory(router.factory()).createPair(
address(this),
router.WETH()
);
_isExcludedFromFees[_msgSender()] = true;
_isExcludedFromFees[address(this)] = true;
_isExcludedFromFees[address(router)] = true;
_mint(_msgSender(), _totalSupply);
_approve(_msgSender(), address(router), type(uint256).max);
}
receive() external payable {}
function burn(uint256 value) external {
_burn(_msgSender(), value);
}
function setSwapTokenAt(uint256 value) external onlyOwner {
require(
value <= _totalSupply / 50,
"Value must be less than or equal to supply / 50"
);
swapTokenAt = value;
}
function openTrading() external onlyOwner {
require(!_trandingEnable, "enabled!");
_trandingEnable = true;
emit OpenTrading();
}
function removeLimits() external onlyOwner {
require(limit, "Limits already removed");
limit = false;
_maxWallet = _totalSupply;
}
function _update(
address from,
address to,
uint256 amount
) internal override {
if (
_isExcludedFromFees[from] ||
_isExcludedFromFees[to] ||
(to != pair && from != pair) ||
_swaping
) {
super._update(from, to, amount);
return;
}
require(_trandingEnable, "Trading is not open");
if (limit) {
if (to != pair && balanceOf(to) + amount > _maxWallet) {
revert MaxWalletAmountExceeded();
}
}
if (to == pair && canSwapBack()) {
swapBack();
}
uint256 _fees;
if (from == pair) {
_buy++;
_fees = (amount * (_buy > _reduce ? 5 : _initial)) / 100;
} else if (to == pair) {
_sell++;
_fees = (amount * (_sell > _reduce / 2 ? 5 : _initial)) / 100;
}
if (_fees > 0) {
super._update(from, address(this), _fees);
amount = amount - _fees;
}
super._update(from, to, amount);
}
function canSwapBack() public view returns (bool) {
return
balanceOf(address(this)) >= swapTokenAt &&
block.number - latestSwapback >= delayBlock;
}
function swapBack() private onSwap {
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = router.WETH();
_approve(address(this), address(router), swapTokenAt);
router.swapExactTokensForETHSupportingFeeOnTransferTokens(
swapTokenAt,
0,
path,
address(this),
block.timestamp
);
uint256 amountToDEV = (address(this).balance * 70) / 100;
_safeTransferETH(DEVELOPMENT, amountToDEV);
_safeTransferETH(MARKETING, address(this).balance);
latestSwapback = block.number;
emit SwapBack(swapTokenAt);
}
function _safeTransferETH(address to, uint256 amount) private {
(bool _sent, ) = payable(to).call{value: amount}("");
require(_sent, "send ETH failed");
}
}
Context.sol 28 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}
Ownable.sol 100 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {Context} from "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* The initial owner is set to the address provided by the deployer. This can
* later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
/**
* @dev The caller account is not authorized to perform an operation.
*/
error OwnableUnauthorizedAccount(address account);
/**
* @dev The owner is not a valid owner account. (eg. `address(0)`)
*/
error OwnableInvalidOwner(address owner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the address provided by the deployer as the initial owner.
*/
constructor(address initialOwner) {
if (initialOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(initialOwner);
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
if (owner() != _msgSender()) {
revert OwnableUnauthorizedAccount(_msgSender());
}
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling 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 {
if (newOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_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);
}
}
ERC20.sol 316 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)
pragma solidity ^0.8.20;
import {IERC20} from "./IERC20.sol";
import {IERC20Metadata} from "./extensions/IERC20Metadata.sol";
import {Context} from "../../utils/Context.sol";
import {IERC20Errors} from "../../interfaces/draft-IERC6093.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}.
*
* TIP: For a detailed writeup see our guide
* https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* The default value of {decimals} is 18. To change this, you should override
* this function so it returns a different value.
*
* 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.
*/
abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
mapping(address account => uint256) private _balances;
mapping(address account => mapping(address spender => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* 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 returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual 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 default value returned by this function, unless
* it's 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 returns (uint8) {
return 18;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - the caller must have a balance of at least `value`.
*/
function transfer(address to, uint256 value) public virtual returns (bool) {
address owner = _msgSender();
_transfer(owner, to, value);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* NOTE: If `value` is the maximum `uint256`, the allowance is not updated on
* `transferFrom`. This is semantically equivalent to an infinite approval.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 value) public virtual returns (bool) {
address owner = _msgSender();
_approve(owner, spender, value);
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}.
*
* NOTE: Does not update the allowance if the current allowance
* is the maximum `uint256`.
*
* Requirements:
*
* - `from` and `to` cannot be the zero address.
* - `from` must have a balance of at least `value`.
* - the caller must have allowance for ``from``'s tokens of at least
* `value`.
*/
function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, value);
_transfer(from, to, value);
return true;
}
/**
* @dev Moves a `value` amount of tokens from `from` to `to`.
*
* 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.
*
* NOTE: This function is not virtual, {_update} should be overridden instead.
*/
function _transfer(address from, address to, uint256 value) internal {
if (from == address(0)) {
revert ERC20InvalidSender(address(0));
}
if (to == address(0)) {
revert ERC20InvalidReceiver(address(0));
}
_update(from, to, value);
}
/**
* @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`
* (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding
* this function.
*
* Emits a {Transfer} event.
*/
function _update(address from, address to, uint256 value) internal virtual {
if (from == address(0)) {
// Overflow check required: The rest of the code assumes that totalSupply never overflows
_totalSupply += value;
} else {
uint256 fromBalance = _balances[from];
if (fromBalance < value) {
revert ERC20InsufficientBalance(from, fromBalance, value);
}
unchecked {
// Overflow not possible: value <= fromBalance <= totalSupply.
_balances[from] = fromBalance - value;
}
}
if (to == address(0)) {
unchecked {
// Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.
_totalSupply -= value;
}
} else {
unchecked {
// Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.
_balances[to] += value;
}
}
emit Transfer(from, to, value);
}
/**
* @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).
* Relies on the `_update` mechanism
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* NOTE: This function is not virtual, {_update} should be overridden instead.
*/
function _mint(address account, uint256 value) internal {
if (account == address(0)) {
revert ERC20InvalidReceiver(address(0));
}
_update(address(0), account, value);
}
/**
* @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.
* Relies on the `_update` mechanism.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* NOTE: This function is not virtual, {_update} should be overridden instead
*/
function _burn(address account, uint256 value) internal {
if (account == address(0)) {
revert ERC20InvalidSender(address(0));
}
_update(account, address(0), value);
}
/**
* @dev Sets `value` 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.
*
* Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.
*/
function _approve(address owner, address spender, uint256 value) internal {
_approve(owner, spender, value, true);
}
/**
* @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.
*
* By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by
* `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any
* `Approval` event during `transferFrom` operations.
*
* Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to
* true using the following override:
* ```
* function _approve(address owner, address spender, uint256 value, bool) internal virtual override {
* super._approve(owner, spender, value, true);
* }
* ```
*
* Requirements are the same as {_approve}.
*/
function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {
if (owner == address(0)) {
revert ERC20InvalidApprover(address(0));
}
if (spender == address(0)) {
revert ERC20InvalidSpender(address(0));
}
_allowances[owner][spender] = value;
if (emitEvent) {
emit Approval(owner, spender, value);
}
}
/**
* @dev Updates `owner` s allowance for `spender` based on spent `value`.
*
* Does not update the allowance value in case of infinite allowance.
* Revert if not enough allowance is available.
*
* Does not emit an {Approval} event.
*/
function _spendAllowance(address owner, address spender, uint256 value) internal virtual {
uint256 currentAllowance = allowance(owner, spender);
if (currentAllowance != type(uint256).max) {
if (currentAllowance < value) {
revert ERC20InsufficientAllowance(spender, currentAllowance, value);
}
unchecked {
_approve(owner, spender, currentAllowance - value, false);
}
}
}
}
IERC20.sol 79 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @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);
/**
* @dev Returns the value of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the value of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 value) 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 a `value` amount of tokens 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 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the
* allowance mechanism. `value` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 value) external returns (bool);
}
draft-IERC6093.sol 161 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)
pragma solidity ^0.8.20;
/**
* @dev Standard ERC20 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.
*/
interface IERC20Errors {
/**
* @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param balance Current balance for the interacting account.
* @param needed Minimum amount required to perform a transfer.
*/
error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC20InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC20InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.
* @param spender Address that may be allowed to operate on tokens without being their owner.
* @param allowance Amount of tokens a `spender` is allowed to operate with.
* @param needed Minimum amount required to perform a transfer.
*/
error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC20InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `spender` to be approved. Used in approvals.
* @param spender Address that may be allowed to operate on tokens without being their owner.
*/
error ERC20InvalidSpender(address spender);
}
/**
* @dev Standard ERC721 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.
*/
interface IERC721Errors {
/**
* @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.
* Used in balance queries.
* @param owner Address of the current owner of a token.
*/
error ERC721InvalidOwner(address owner);
/**
* @dev Indicates a `tokenId` whose `owner` is the zero address.
* @param tokenId Identifier number of a token.
*/
error ERC721NonexistentToken(uint256 tokenId);
/**
* @dev Indicates an error related to the ownership over a particular token. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param tokenId Identifier number of a token.
* @param owner Address of the current owner of a token.
*/
error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC721InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC721InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `operator`’s approval. Used in transfers.
* @param operator Address that may be allowed to operate on tokens without being their owner.
* @param tokenId Identifier number of a token.
*/
error ERC721InsufficientApproval(address operator, uint256 tokenId);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC721InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `operator` to be approved. Used in approvals.
* @param operator Address that may be allowed to operate on tokens without being their owner.
*/
error ERC721InvalidOperator(address operator);
}
/**
* @dev Standard ERC1155 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.
*/
interface IERC1155Errors {
/**
* @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param balance Current balance for the interacting account.
* @param needed Minimum amount required to perform a transfer.
* @param tokenId Identifier number of a token.
*/
error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC1155InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC1155InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `operator`’s approval. Used in transfers.
* @param operator Address that may be allowed to operate on tokens without being their owner.
* @param owner Address of the current owner of a token.
*/
error ERC1155MissingApprovalForAll(address operator, address owner);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC1155InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `operator` to be approved. Used in approvals.
* @param operator Address that may be allowed to operate on tokens without being their owner.
*/
error ERC1155InvalidOperator(address operator);
/**
* @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.
* Used in batch transfers.
* @param idsLength Length of the array of token identifiers
* @param valuesLength Length of the array of token amounts
*/
error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);
}
IUniswapV2Factory.sol 17 lines
pragma solidity >=0.5.0;
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address pair, uint);
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function getPair(address tokenA, address tokenB) external view returns (address pair);
function allPairs(uint) external view returns (address pair);
function allPairsLength() external view returns (uint);
function createPair(address tokenA, address tokenB) external returns (address pair);
function setFeeTo(address) external;
function setFeeToSetter(address) external;
}
IERC20Metadata.sol 26 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)
pragma solidity ^0.8.20;
import {IERC20} from "../IERC20.sol";
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*/
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);
}
IUniswapV2Router01.sol 95 lines
pragma solidity >=0.6.2;
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB);
function removeLiquidityETH(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountToken, uint amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountA, uint amountB);
function removeLiquidityETHWithPermit(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountToken, uint amountETH);
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapTokensForExactTokens(
uint amountOut,
uint amountInMax,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}
IUniswapV2Router02.sol 44 lines
pragma solidity >=0.6.2;
import './IUniswapV2Router01.sol';
interface IUniswapV2Router02 is IUniswapV2Router01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
Read Contract
DEVELOPMENT 0x661e7ac4 → address
MARKETING 0xe530a7d0 → address
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
canSwapBack 0xb3c5630f → bool
decimals 0x313ce567 → uint8
latestSwapback 0x653bce31 → uint256
limit 0xa4d66daf → bool
name 0x06fdde03 → string
owner 0x8da5cb5b → address
pair 0xa8aa1b31 → address
swapTokenAt 0x73bc5a36 → uint256
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
Write Contract 9 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address spender
uint256 value
returns: bool
burn 0x42966c68
uint256 value
openTrading 0xc9567bf9
No parameters
removeLimits 0x751039fc
No parameters
renounceOwnership 0x715018a6
No parameters
setSwapTokenAt 0x864b3167
uint256 value
transfer 0xa9059cbb
address to
uint256 value
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 value
returns: bool
transferOwnership 0xf2fde38b
address newOwner
Recent Transactions
No transactions found for this address