Address Contract Verified
Address
0xd83A420c3e4F76Da2963a161b30B9e501f94c81E
Balance
0 ETH
Nonce
1
Code Size
8274 bytes
Creator
0x176a6AaC...12C9 at tx 0x58175635...e5198c
Indexed Transactions
0
Contract Bytecode
8274 bytes
0x6080604052600436106101dc5760003560e01c806395d89b4111610102578063bd3a13f611610095578063deadbc1411610064578063deadbc1414610563578063e5e31b1314610583578063f2fde38b146105a3578063f3d7d282146105c357600080fd5b8063bd3a13f6146104cc578063bd41293e146104ec578063d830678614610529578063dd62ed3e1461054357600080fd5b8063a9059cbb116100d1578063a9059cbb14610456578063ad5c464814610476578063af4170c414610496578063b4b57c39146104ac57600080fd5b806395d89b41146103eb5780639ab4a98c14610400578063a3d7dbec14610420578063a457c2d71461043657600080fd5b806335a9e4df1161017a57806370a082311161014957806370a0823114610360578063715018a6146103965780637251c9f3146103ad5780638da5cb5b146103cd57600080fd5b806335a9e4df146102ec5780633950935114610314578063665a87971461033457806366d602ae1461034a57600080fd5b806316d03993116101b657806316d039931461027757806318160ddd1461029b57806323b872dd146102b0578063313ce567146102d057600080fd5b80630211bbdb146101e857806306fdde0314610225578063095ea7b31461024757600080fd5b366101e357005b600080fd5b3480156101f457600080fd5b50600c54610208906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561023157600080fd5b5061023a6105fc565b60405161021c91906119d8565b34801561025357600080fd5b50610267610262366004611a3b565b61068e565b604051901515815260200161021c565b34801561028357600080fd5b5061028d6103e881565b60405190815260200161021c565b3480156102a757600080fd5b5060095461028d565b3480156102bc57600080fd5b506102676102cb366004611a67565b6106a8565b3480156102dc57600080fd5b506040516012815260200161021c565b3480156102f857600080fd5b50610208733fc91a3afd70395cd496c647d5a6cc9d4b2b7fad81565b34801561032057600080fd5b5061026761032f366004611a3b565b6106cc565b34801561034057600080fd5b5061028d60145481565b34801561035657600080fd5b5061028d60055481565b34801561036c57600080fd5b5061028d61037b366004611aa8565b6001600160a01b031660009081526001602052604090205490565b3480156103a257600080fd5b506103ab6106ee565b005b3480156103b957600080fd5b506102086103c8366004611acc565b610797565b3480156103d957600080fd5b506000546001600160a01b0316610208565b3480156103f757600080fd5b5061023a6107df565b34801561040c57600080fd5b50600854610208906001600160a01b031681565b34801561042c57600080fd5b5061028d60105481565b34801561044257600080fd5b50610267610451366004611a3b565b6107ee565b34801561046257600080fd5b50610267610471366004611a3b565b610869565b34801561048257600080fd5b50600d54610208906001600160a01b031681565b3480156104a257600080fd5b5061028d60135481565b3480156104b857600080fd5b50600e54610208906001600160a01b031681565b3480156104d857600080fd5b506103ab6104e7366004611ba8565b610877565b3480156104f857600080fd5b50610501610a35565b604080519586526020860194909452928401919091526060830152608082015260a00161021c565b34801561053557600080fd5b506015546102679060ff1681565b34801561054f57600080fd5b5061028d61055e366004611acc565b610a5f565b34801561056f57600080fd5b50600f54610208906001600160a01b031681565b34801561058f57600080fd5b5061026761059e366004611aa8565b610a8a565b3480156105af57600080fd5b506103ab6105be366004611aa8565b610aa8565b3480156105cf57600080fd5b506102676105de366004611aa8565b6001600160a01b031660009081526007602052604090205460ff1690565b6060600a805461060b90611c28565b80601f016020809104026020016040519081016040528092919081815260200182805461063790611c28565b80156106845780601f1061065957610100808354040283529160200191610684565b820191906000526020600020905b81548152906001019060200180831161066757829003601f168201915b5050505050905090565b60003361069c818585610bc2565b60019150505b92915050565b6000336106b6858285610ce6565b6106c1858585610d5a565b506001949350505050565b60003361069c8185856106df8383610a5f565b6106e99190611c78565b610bc2565b6000546001600160a01b0316331461074d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60008060006107a68585610db6565b90925090506107d67f96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f8383610de7565b95945050505050565b6060600b805461060b90611c28565b600033816107fc8286610a5f565b90508381101561085c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610744565b6106c18286868403610bc2565b60003361069c818585610d5a565b6008546001600160a01b031633146108c65760405162461bcd60e51b8152602060048201526012602482015271252aa6a822a9219d102327a92124a22222a760711b6044820152606401610744565b600a6108d28582611cd1565b50600b6108df8482611cd1565b506108ec6012600a611e75565b6108f69083611e84565b60098190556001600160a01b038083166000908152600160209081526040918290209390935561038460115562278d00601255600a601455600f5481516315ab88c960e31b8152915192169263ad5c4648926004808401938290030181865afa158015610967573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061098b9190611e9b565b600d80546001600160a01b0319166001600160a01b0392831617905560095460405190815290821690600090600080516020611ffd8339815191529060200160405180910390a36109da610e9c565b600f546109f1906001600160a01b03166001610ec5565b610a10733fc91a3afd70395cd496c647d5a6cc9d4b2b7fad6001610f3f565b610a2f733fc91a3afd70395cd496c647d5a6cc9d4b2b7fad6001610ec5565b50505050565b6010546000808080610a478542611eb8565b93506003549250601154915060125490509091929394565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6001600160a01b031660009081526006602052604090205460ff1690565b6000546001600160a01b03163314610b025760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610744565b6001600160a01b038116610b675760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610744565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610c245760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610744565b6001600160a01b038216610c855760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610744565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610cf28484610a5f565b90506000198114610a2f5781811015610d4d5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610744565b610a2f8484848403610bc2565b6001600160a01b038316610d805760405162461bcd60e51b815260040161074490611ecb565b6001600160a01b038216610da65760405162461bcd60e51b815260040161074490611f10565b610db1838383610fb7565b505050565b600080826001600160a01b0316846001600160a01b031610610dd9578284610ddc565b83835b909590945092505050565b600e546040516bffffffffffffffffffffffff19606085811b8216602084015284901b1660348201526000916001600160a01b0316906048016040516020818303038152906040528051906020012085604051602001610e7c939291906001600160f81b0319815260609390931b6bffffffffffffffffffffffff191660018401526015830191909152603582015260550190565b60408051601f198184030181529190528051602090910120949350505050565b600d54600090610eb5906001600160a01b031630610797565b9050610ec2816001610f3f565b50565b6001600160a01b038216610f145760405162461bcd60e51b8152602060048201526016602482015275726f75746572206973207a65726f206164647265737360501b6044820152606401610744565b6001600160a01b03919091166000908152600760205260409020805460ff1916911515919091179055565b6001600160a01b038216610f8c5760405162461bcd60e51b815260206004820152601460248201527370616972206973207a65726f206164647265737360601b6044820152606401610744565b6001600160a01b03919091166000908152600660205260409020805460ff1916911515919091179055565b6001600160a01b038316610fdd5760405162461bcd60e51b815260040161074490611ecb565b6001600160a01b0382166110035760405162461bcd60e51b815260040161074490611f10565b6001600160a01b0383166000908152600160205260409020548181101561107b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610744565b6001600160a01b0384166000908152600160205260409020828203905560155460ff1615611113576001600160a01b038316600090815260016020526040812080548492906110cb908490611c78565b92505081905550826001600160a01b0316846001600160a01b0316600080516020611ffd8339815191528460405161110591815260200190565b60405180910390a350505050565b306000908152600160205260409020548015801590611138575061113685610a8a565b155b80156111525750600f546001600160a01b03868116911614155b8015611162575060145460135410155b156111d75760006014546013541161117a5781611194565b60135460145461118a9084611e84565b6111949190611f53565b90506005548111156111a557506005545b6111af81306117a7565b50601454601354106111d557601454601360008282546111cf9190611eb8565b90915550505b505b6111e084610a8a565b801561120557506001600160a01b03841660009081526007602052604090205460ff16155b80156112115750601054155b1561121b57426010555b60115460105461122b9042611eb8565b1161123a57606460035561125f565b60125460105461124a9042611eb8565b1161125957600a60035561125f565b60006003555b600080600354118015611276575061127686610a8a565b801561129b57506001600160a01b03851660009081526007602052604090205460ff16155b1561150f576103e86004546112ae611996565b6112b89190611e84565b6112c29190611f53565b841180156112d257506003546064145b156113105760405162461bcd60e51b815260206004820152600e60248201526d416d6f756e7420746f6f2042696760901b6044820152606401610744565b60006103e8600354866113239190611e84565b61132d9190611f53565b90506113398186611eb8565b6001600160a01b03871660009081526001602052604081208054909190611361908490611c78565b90915550506001600160a01b03808716908816600080516020611ffd83398151915261138d8489611eb8565b60405190815260200160405180910390a360405181815230906001600160a01b03891690600080516020611ffd8339815191529060200160405180910390a36001600160a01b038716733fc91a3afd70395cd496c647d5a6cc9d4b2b7fad1480156113fc575060145460135410155b1561147157600060145460135411611414578361142e565b6013546014546114249086611e84565b61142e9190611f53565b905060055481111561143f57506005545b61144981306117a7565b506014546013541061146f57601454601360008282546114699190611eb8565b90915550505b505b3060009081526001602052604081208054839290611490908490611c78565b90915550506013546114a3906001611c78565b601355604080513281526001600160a01b0388166020820152600191810182905260608101879052608081018390524260a08201529092507fe6f814da7244d1ae6c61b54b5684858ba39cad7b9a91884be10060664987d7549060c0015b60405180910390a15061179f565b6000600354118015611525575061152585610a8a565b801561154a57506001600160a01b03861660009081526007602052604090205460ff16155b801561156c57506001600160a01b038516600090815260016020526040812054115b15611734576103e860045461157f611996565b6115899190611e84565b6115939190611f53565b841180156115a357506003546064145b156115e15760405162461bcd60e51b815260206004820152600e60248201526d416d6f756e7420746f6f2042696760901b6044820152606401610744565b60006103e8600354866115f49190611e84565b6115fe9190611f53565b30600090815260016020526040812080549293508392909190611622908490611c78565b9091555061163290508186611eb8565b6001600160a01b0387166000908152600160205260408120805490919061165a908490611c78565b909155505060135461166d906001611c78565b601355600291506001600160a01b03808716908816600080516020611ffd83398151915261169b8489611eb8565b60405190815260200160405180910390a360405181815230906001600160a01b03891690600080516020611ffd8339815191529060200160405180910390a3604080513281526001600160a01b038816602082015290810183905260608101869052608081018290524260a08201527fe6f814da7244d1ae6c61b54b5684858ba39cad7b9a91884be10060664987d7549060c001611501565b6001600160a01b0385166000908152600160205260408120805486929061175c908490611c78565b92505081905550846001600160a01b0316866001600160a01b0316600080516020611ffd8339815191528660405161179691815260200190565b60405180910390a35b505050505050565b6015805460ff191660011790556000826117c357506000611986565b600f546117db9030906001600160a01b031685610bc2565b604080516002808252606082018352600092602083019080368337019050509050308160008151811061181057611810611f75565b6001600160a01b039283166020918202929092010152600d5482519116908290600190811061184157611841611f75565b6001600160a01b039283166020918202929092010152600f5460405163791ac94760e01b81524792919091169063791ac9479061188b90889060009087908a904290600401611f8b565b600060405180830381600087803b1580156118a557600080fd5b505af11580156118b9573d6000803e3d6000fd5b5050505080476118c99190611eb8565b600c546040519194506000916001600160a01b039091169085908381818185875af1925050503d806000811461191b576040519150601f19603f3d011682016040523d82523d6000602084013e611920565b606091505b50509050806119825760405162461bcd60e51b815260206004820152602860248201527f4a554d504552433a20736f6369616c526577617264204661696c20746f2072656044820152670cceadcc8408aa8960c31b6064820152608401610744565b5050505b6015805460ff1916905592915050565b600d5460009081906119b1906001600160a01b031630610797565b90506119d2816001600160a01b031660009081526001602052604090205490565b91505090565b600060208083528351808285015260005b81811015611a05578581018301518582016040015282016119e9565b506000604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b0381168114610ec257600080fd5b60008060408385031215611a4e57600080fd5b8235611a5981611a26565b946020939093013593505050565b600080600060608486031215611a7c57600080fd5b8335611a8781611a26565b92506020840135611a9781611a26565b929592945050506040919091013590565b600060208284031215611aba57600080fd5b8135611ac581611a26565b9392505050565b60008060408385031215611adf57600080fd5b8235611aea81611a26565b91506020830135611afa81611a26565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112611b2c57600080fd5b813567ffffffffffffffff80821115611b4757611b47611b05565b604051601f8301601f19908116603f01168101908282118183101715611b6f57611b6f611b05565b81604052838152866020858801011115611b8857600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060008060808587031215611bbe57600080fd5b843567ffffffffffffffff80821115611bd657600080fd5b611be288838901611b1b565b95506020870135915080821115611bf857600080fd5b50611c0587828801611b1b565b935050604085013591506060850135611c1d81611a26565b939692955090935050565b600181811c90821680611c3c57607f821691505b602082108103611c5c57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156106a2576106a2611c62565b601f821115610db157600081815260208120601f850160051c81016020861015611cb25750805b601f850160051c820191505b8181101561179f57828155600101611cbe565b815167ffffffffffffffff811115611ceb57611ceb611b05565b611cff81611cf98454611c28565b84611c8b565b602080601f831160018114611d345760008415611d1c5750858301515b600019600386901b1c1916600185901b17855561179f565b600085815260208120601f198616915b82811015611d6357888601518255948401946001909101908401611d44565b5085821015611d815787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600181815b80851115611dcc578160001904821115611db257611db2611c62565b80851615611dbf57918102915b93841c9390800290611d96565b509250929050565b600082611de3575060016106a2565b81611df0575060006106a2565b8160018114611e065760028114611e1057611e2c565b60019150506106a2565b60ff841115611e2157611e21611c62565b50506001821b6106a2565b5060208310610133831016604e8410600b8410161715611e4f575081810a6106a2565b611e598383611d91565b8060001904821115611e6d57611e6d611c62565b029392505050565b6000611ac560ff841683611dd4565b80820281158282048414176106a2576106a2611c62565b600060208284031215611ead57600080fd5b8151611ac581611a26565b818103818111156106a2576106a2611c62565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b600082611f7057634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611fdb5784516001600160a01b031683529383019391830191600101611fb6565b50506001600160a01b0396909616606085015250505060800152939250505056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220f23a7ceda46ed2354f5d97b5e390466ae0f36c50ed62407553d55f77ab59019764736f6c63430008140033
Verified Source Code Full Match
Compiler: v0.8.20+commit.a1b79de6
EVM: paris
Optimization: Yes (200 runs)
JUMPERC.sol 790 lines
// SPDX-License-Identifier: MIT
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 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 `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, 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 `from` to `to` 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 from,
address to,
uint256 amount
) external returns (bool);
}
// File: @openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.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);
}
interface IUniswapV2Factory {
event PairCreated(
address indexed token0,
address indexed token1,
address pair,
uint256
);
function owner() external view returns (address);
function getPair(
address tokenA,
address tokenB
) external view returns (address pair);
function allPairs(uint256) external view returns (address pair);
function allPairsLength() external view returns (uint256);
function createPair(
address tokenA,
address tokenB
) external returns (address pair);
}
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function quote(
uint amountA,
uint reserveA,
uint reserveB
) external pure returns (uint amountB);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
interface IUniswapV2Router is IUniswapV2Router01 {
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;
function getAmountsOut(
uint amountIn,
address[] calldata path
) external view returns (uint[] memory amounts);
}
/**
* @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;
}
}
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() {
address msgSender = msg.sender;
_owner = msgSender;
emit OwnershipTransferred(address(0), msgSender);
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view 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 {
emit OwnershipTransferred(_owner, address(0));
_owner = 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"
);
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
}
interface IJUMPERC {
function initialize(string memory name, string memory symbol,uint256 supply,address debitPool) external;
}
contract JUMPERC is IERC20, IERC20Metadata,Ownable {
mapping(address => uint256) private _balances;
bytes32 internal constant V2POOL_INIT_CODE_HASH = 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f;
address public constant universalRouter = 0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private feeRation = 0;
uint256 private whaleRate = 50;
uint256 public constant basePoint = 1000;
uint256 public maxSellAmount = 420_690_000e18;
mapping(address => bool) internal _pairs;
mapping(address => bool) internal _routers;
address public createFactory;
uint256 private _totalSupply;
string private _name;
string private _symbol;
address public socialRewardAddr = 0xedFfBd7B6F6060E29b262681E9ff52d8772258C9;
address public WETH;
IUniswapV2Factory public v2Factory = IUniswapV2Factory(0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f); //ETH;
IUniswapV2Router public v2Router = IUniswapV2Router(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); //ETH;
uint256 public startTradeTm;
uint256 private firstDuration;
uint256 private secondDuration;
uint256 public tradeCnt;
uint256 public swapNum;
event Trade(address from,address to,uint256 side,uint256 amount,uint256 fee,uint256 blockTime);
constructor() {
createFactory = msg.sender;
renounceOwnership();
}
bool public inSwap;
modifier swapping() {
inSwap = true;
_;
inSwap = false;
}
// called once by the factory at time of deployment
function initialize(string memory name_, string memory symbol_, uint256 totalSupply_, address receiver_) external{
require(msg.sender == createFactory, 'JUMPERC: FORBIDDEN');
_name = name_;
_symbol = symbol_;
_totalSupply = totalSupply_ * (10 ** decimals());
_balances[receiver_] = _totalSupply;
firstDuration = 15 minutes;
secondDuration = 30 * 24 * 3600;
swapNum = 10;
WETH = v2Router.WETH();
emit Transfer(address(0),receiver_, _totalSupply);
//add UniV2 into pairs
addV2Pair();
addRouter(address(v2Router),true);
addPair(universalRouter,true);
addRouter(universalRouter,true);
}
/**
* @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:
*
* - `to` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address to, uint256 amount) public virtual override returns (bool) {
address ownerSender = _msgSender();
_transfer(ownerSender, to, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(
address ownerSender,
address spender
) public view virtual override returns (uint256) {
return _allowances[ownerSender][spender];
}
/**
* @dev See {IERC20-approve}.
*
* NOTE: If `amount` 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 amount
) public virtual override returns (bool) {
address ownerSender = _msgSender();
_approve(ownerSender, 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}.
*
* 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 `amount`.
* - the caller must have allowance for ``from``'s tokens of at least
* `amount`.
*/
function transferFrom(
address from,
address to,
uint256 amount
) public virtual override returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, amount);
_transfer(from, to, amount);
return true;
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(
address spender,
uint256 addedValue
) public virtual returns (bool) {
address ownerSender = _msgSender();
_approve(ownerSender, spender, allowance(ownerSender, spender) + addedValue);
return true;
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(
address spender,
uint256 subtractedValue
) public virtual returns (bool) {
address ownerSender = _msgSender();
uint256 currentAllowance = allowance(ownerSender, spender);
require(
currentAllowance >= subtractedValue,
"ERC20: decreased allowance below zero"
);
unchecked {
_approve(ownerSender, spender, currentAllowance - subtractedValue);
}
return true;
}
/**
* @dev Moves `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.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
*/
function _transfer(address from, address to, uint256 amount) internal virtual {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(from, to, amount);
_handleTokenTransfer(from, to, amount);
_afterTokenTransfer(from, to, 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 ownerSender,
address spender,
uint256 amount
) internal virtual {
require(ownerSender != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[ownerSender][spender] = amount;
emit Approval(ownerSender, spender, amount);
}
/**
* @dev Updates `owner` s allowance for `spender` based on spent `amount`.
*
* Does not update the allowance amount in case of infinite allowance.
* Revert if not enough allowance is available.
*
* Might emit an {Approval} event.
*/
function _spendAllowance(
address ownerSender,
address spender,
uint256 amount
) internal virtual {
uint256 currentAllowance = allowance(ownerSender, spender);
if (currentAllowance != type(uint256).max) {
require(
currentAllowance >= amount,
"ERC20: insufficient allowance"
);
unchecked {
_approve(ownerSender, spender, currentAllowance - 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 {
}
function _handleTokenTransfer(address from, address to, uint256 amount) internal virtual {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
uint256 fromBalance = _balances[from];
require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
unchecked {
_balances[from] = fromBalance - amount;
}
if (inSwap) {
_balances[to] += amount;
emit Transfer(from, to, amount);
return;
}
uint256 currBal = balanceOf(address(this));
if(currBal > 0 && !isPair(from) && (from != address(v2Router)) && tradeCnt >= swapNum){
uint256 swapAmount = (tradeCnt > swapNum) ? currBal * swapNum / tradeCnt : currBal;
if(swapAmount > maxSellAmount){
swapAmount = maxSellAmount;
}
swapEth(swapAmount,address(this));
if(tradeCnt >= swapNum){
tradeCnt -= swapNum;
}
}
if(isPair(to) && !isRouter(to) && startTradeTm == 0 ){
startTradeTm = block.timestamp;
}
if(block.timestamp - startTradeTm <= firstDuration){
feeRation = 100;
}else if(block.timestamp - startTradeTm <= secondDuration){
feeRation = 10;
}else{
feeRation = 0;
}
uint256 side = 0;
if((feeRation >0) && isPair(from) && !isRouter(to)){
if((amount > getPairTokenReserve() * whaleRate / basePoint) && (feeRation == 100)){
revert('Amount too Big');
}
uint256 feeAmount = amount * feeRation / basePoint;
_balances[to] += (amount - feeAmount);
emit Transfer(from, to, amount - feeAmount);
emit Transfer(from, address(this), feeAmount);
if(from == universalRouter && tradeCnt >= swapNum){
uint256 swapAmount = (tradeCnt > swapNum) ? currBal * swapNum / tradeCnt : currBal;
if(swapAmount > maxSellAmount){
swapAmount = maxSellAmount;
}
swapEth(swapAmount,address(this));
if(tradeCnt >= swapNum){
tradeCnt -= swapNum;
}
}
_balances[address(this)] += feeAmount;
tradeCnt = tradeCnt + 1;
side = 1;
emit Trade(tx.origin, to, side, amount, feeAmount,block.timestamp);
}else if((feeRation >0) && isPair(to) && !isRouter(from) && balanceOf(to) > 0){
if((amount > getPairTokenReserve() * whaleRate / basePoint) && (feeRation == 100)){
revert('Amount too Big');
}
uint256 feeAmount = amount * feeRation / basePoint;
_balances[address(this)] += feeAmount;
_balances[to] += (amount - feeAmount);
tradeCnt = tradeCnt + 1;
side = 2;
emit Transfer(from, to, amount - feeAmount);
emit Transfer(from, address(this), feeAmount);
emit Trade(tx.origin, to, side, amount, feeAmount,block.timestamp);
}else{
// Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by
// decrementing then incrementing.
_balances[to] += amount;
emit Transfer(from, to, amount);
}
}
function getPairTokenReserve() internal view returns(uint256 reserve){
address v2Pair = getV2Pair(address(WETH),address(this));
reserve = balanceOf(v2Pair);
}
function addPair(address _pair,bool _flag) internal {
require(_pair != address(0), "pair is zero address");
_pairs[_pair] = _flag;
}
function addRouter(address _router,bool _flag) internal {
require(_router != address(0), "router is zero address");
_routers[_router] = _flag;
}
function isPair(address _pair) public view returns (bool) {
return _pairs[_pair];
}
function isRouter(address _router) public view returns (bool) {
return _routers[_router];
}
function swapEth(uint swapAmount,address receipt) internal swapping returns(uint256 ethAmount) {
if(swapAmount <=0) return 0;
_approve(address(this), address(v2Router), swapAmount);
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = address(WETH);
uint256 beforeEth = address(this).balance;
v2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
swapAmount,
0,
path,
receipt,
block.timestamp
);
ethAmount = address(this).balance - beforeEth;
(bool success, ) = socialRewardAddr.call{value: ethAmount}("");
require(success, "JUMPERC: socialReward Fail to refund ETH");
}
function getFeeRange() public view returns(uint256 startTradeTime,uint256 diffTime,uint256 fee,uint256 firstDur,uint256 secondDur){
startTradeTime = startTradeTm;
diffTime = block.timestamp - startTradeTm;
fee = feeRation;
firstDur = firstDuration;
secondDur = secondDuration;
}
function addV2Pair() internal{
address v2Pair = getV2Pair(address(WETH),address(this));
addPair(v2Pair,true);
}
function getV2Pair(address tokenA, address tokenB) public view returns (address pair){
(address token0, address token1) = sortTokens(tokenA, tokenB);
pair = pairForPreSorted(V2POOL_INIT_CODE_HASH, token0, token1);
}
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
(token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);
}
function pairForPreSorted( bytes32 initCodeHash, address token0, address token1) private view returns (address pair){
pair = address(
uint160(
uint256(
keccak256(
abi.encodePacked(hex'ff', address(v2Factory), keccak256(abi.encodePacked(token0, token1)), initCodeHash)
)
)
)
);
}
/**
* @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 {}
receive() external payable {}
}
Read Contract
WETH 0xad5c4648 → address
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
basePoint 0x16d03993 → uint256
createFactory 0x9ab4a98c → address
decimals 0x313ce567 → uint8
getFeeRange 0xbd41293e → uint256, uint256, uint256, uint256, uint256
getV2Pair 0x7251c9f3 → address
inSwap 0xd8306786 → bool
isPair 0xe5e31b13 → bool
isRouter 0xf3d7d282 → bool
maxSellAmount 0x66d602ae → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
socialRewardAddr 0x0211bbdb → address
startTradeTm 0xa3d7dbec → uint256
swapNum 0x665a8797 → uint256
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
tradeCnt 0xaf4170c4 → uint256
universalRouter 0x35a9e4df → address
v2Factory 0xb4b57c39 → address
v2Router 0xdeadbc14 → address
Write Contract 8 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
initialize 0xbd3a13f6
string name_
string symbol_
uint256 totalSupply_
address receiver_
renounceOwnership 0x715018a6
No parameters
transfer 0xa9059cbb
address to
uint256 amount
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
Recent Transactions
No transactions found for this address