├── .gitignore ├── README.md ├── package.json ├── public ├── etheriumCoin.png ├── imgs │ ├── charity.JPG │ ├── general.JPG │ ├── intro0.png │ ├── intro1.png │ ├── intro2.png │ ├── intro3.png │ ├── intro4.PNG │ ├── intro5.png │ ├── manage0.png │ ├── pancakeTab.JPG │ ├── tokenomics0.JPG │ └── tokenomics1.JPG ├── index.html ├── logo192.png ├── logo512.png ├── manifest.json └── robots.txt ├── src ├── App.css ├── App.js ├── App.test.js ├── components │ ├── AddliquidityPancake.jsx │ ├── ChainDialog.jsx │ ├── CoinManager.jsx │ ├── ContractFactorABI.js │ ├── ContractFrameABI.js │ ├── Docs.css │ ├── Docs.jsx │ ├── EditCointract.jsx │ ├── Generator.js │ ├── Home.jsx │ ├── MyCoins.jsx │ ├── PancakeswapFactoryABI.js │ ├── PancakeswapRouterABI.js │ ├── RawInput.jsx │ ├── Slider.jsx │ ├── minter.jsx │ ├── verifyContract.js │ ├── waves.css │ └── wavesDivide.js ├── images │ ├── 4.jpg │ ├── bsc.svg │ ├── charity.jpeg │ ├── etheriumCoin.png │ ├── pancakeswap.png │ ├── rewards.jpeg │ └── vendingMachine.jpeg ├── index.css ├── index.js ├── logo.svg ├── reportWebVitals.js └── setupTests.js └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # crypto generator 2 | ##create and manage bep20 and erc20 coinswith ease 3 | ##[generator](https://cryptogenerator.paulfears.repl.co/) 4 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cryptomaker", 3 | "version": "0.1.0", 4 | "private": true, 5 | "homepage": ".", 6 | "dependencies": { 7 | "@material-ui/icons": "^4.11.2", 8 | "@testing-library/jest-dom": "^5.11.4", 9 | "@testing-library/react": "^11.1.0", 10 | "@testing-library/user-event": "^12.1.10", 11 | "@walletconnect/web3-provider": "^1.5.5", 12 | "axios": "^0.21.1", 13 | "gh-pages": "^3.2.3", 14 | "jquery": "^3.6.0", 15 | "react": "^17.0.2", 16 | "react-bootstrap": "2.0.0-beta.0", 17 | "react-dom": "^17.0.2", 18 | "react-icons": "^4.2.0", 19 | "react-loader-spinner": "^4.0.0", 20 | "react-router-dom": "^5.2.0", 21 | "react-scripts": "4.0.3", 22 | "react-spinners": "^0.11.0", 23 | "web-vitals": "^1.0.1", 24 | "web3": "^1.4.0", 25 | "web3modal": "^1.9.4" 26 | }, 27 | "scripts": { 28 | "start": "react-scripts start", 29 | "build": "react-scripts build", 30 | "test": "react-scripts test", 31 | "eject": "react-scripts eject", 32 | "predeploy": "npm run build", 33 | "deploy": "gh-pages -b gh-pages -d build" 34 | }, 35 | "eslintConfig": { 36 | "extends": [ 37 | "react-app", 38 | "react-app/jest" 39 | ] 40 | }, 41 | "browserslist": { 42 | "production": [ 43 | ">0.2%", 44 | "not dead", 45 | "not op_mini all" 46 | ], 47 | "development": [ 48 | "last 1 chrome version", 49 | "last 1 firefox version", 50 | "last 1 safari version" 51 | ] 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /public/etheriumCoin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulfears/CryptoGenerator/9518077534362dc953063affafddae2ac8610300/public/etheriumCoin.png -------------------------------------------------------------------------------- /public/imgs/charity.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulfears/CryptoGenerator/9518077534362dc953063affafddae2ac8610300/public/imgs/charity.JPG -------------------------------------------------------------------------------- /public/imgs/general.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulfears/CryptoGenerator/9518077534362dc953063affafddae2ac8610300/public/imgs/general.JPG -------------------------------------------------------------------------------- /public/imgs/intro0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulfears/CryptoGenerator/9518077534362dc953063affafddae2ac8610300/public/imgs/intro0.png -------------------------------------------------------------------------------- /public/imgs/intro1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulfears/CryptoGenerator/9518077534362dc953063affafddae2ac8610300/public/imgs/intro1.png -------------------------------------------------------------------------------- /public/imgs/intro2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulfears/CryptoGenerator/9518077534362dc953063affafddae2ac8610300/public/imgs/intro2.png -------------------------------------------------------------------------------- /public/imgs/intro3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulfears/CryptoGenerator/9518077534362dc953063affafddae2ac8610300/public/imgs/intro3.png -------------------------------------------------------------------------------- /public/imgs/intro4.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulfears/CryptoGenerator/9518077534362dc953063affafddae2ac8610300/public/imgs/intro4.PNG -------------------------------------------------------------------------------- /public/imgs/intro5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulfears/CryptoGenerator/9518077534362dc953063affafddae2ac8610300/public/imgs/intro5.png -------------------------------------------------------------------------------- /public/imgs/manage0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulfears/CryptoGenerator/9518077534362dc953063affafddae2ac8610300/public/imgs/manage0.png -------------------------------------------------------------------------------- /public/imgs/pancakeTab.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulfears/CryptoGenerator/9518077534362dc953063affafddae2ac8610300/public/imgs/pancakeTab.JPG -------------------------------------------------------------------------------- /public/imgs/tokenomics0.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulfears/CryptoGenerator/9518077534362dc953063affafddae2ac8610300/public/imgs/tokenomics0.JPG -------------------------------------------------------------------------------- /public/imgs/tokenomics1.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulfears/CryptoGenerator/9518077534362dc953063affafddae2ac8610300/public/imgs/tokenomics1.JPG -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 | CryptoGenerator 28 | 29 | 30 | 31 |
32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulfears/CryptoGenerator/9518077534362dc953063affafddae2ac8610300/public/logo192.png -------------------------------------------------------------------------------- /public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulfears/CryptoGenerator/9518077534362dc953063affafddae2ac8610300/public/logo512.png -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | height: 40vmin; 7 | pointer-events: none; 8 | 9 | } 10 | 11 | @media (prefers-reduced-motion: no-preference) { 12 | .App-logo { 13 | animation: App-logo-spin infinite 20s linear; 14 | } 15 | } 16 | 17 | .App-header { 18 | background-color: #282c34; 19 | min-height: 100vh; 20 | display: flex; 21 | flex-direction: column; 22 | align-items: center; 23 | justify-content: center; 24 | font-size: calc(10px + 2vmin); 25 | color: white; 26 | } 27 | 28 | .App-link { 29 | color: #61dafb; 30 | } 31 | 32 | 33 | .switch { 34 | position: relative; 35 | display: inline-block; 36 | width: 60px; 37 | height: 34px; 38 | } 39 | 40 | .switch input { 41 | opacity: 0; 42 | width: 0; 43 | height: 0; 44 | } 45 | 46 | .slider { 47 | position: absolute; 48 | cursor: pointer; 49 | top: 0; 50 | left: 0; 51 | right: 0; 52 | bottom: 0; 53 | background-color: #ccc; 54 | -webkit-transition: .4s; 55 | transition: .4s; 56 | } 57 | 58 | .slider:before { 59 | position: absolute; 60 | content: ""; 61 | height: 26px; 62 | width: 26px; 63 | left: 4px; 64 | bottom: 4px; 65 | background-color: white; 66 | -webkit-transition: .4s; 67 | transition: .4s; 68 | } 69 | 70 | input:checked + .slider { 71 | background-color: #2196F3; 72 | } 73 | 74 | input:focus + .slider { 75 | box-shadow: 0 0 1px #2196F3; 76 | } 77 | 78 | input:checked + .slider:before { 79 | -webkit-transform: translateX(26px); 80 | -ms-transform: translateX(26px); 81 | transform: translateX(26px); 82 | } 83 | 84 | /* Rounded sliders */ 85 | .slider.round { 86 | border-radius: 34px; 87 | } 88 | 89 | .slider.round:before { 90 | border-radius: 50%; 91 | } 92 | 93 | 94 | @keyframes App-logo-spin { 95 | from { 96 | transform: rotate(0deg); 97 | } 98 | to { 99 | transform: rotate(360deg); 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /src/App.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {BrowserRouter as Router, Switch, Route, Link} from 'react-router-dom'; 3 | import Docs from "./components/Docs"; 4 | import Generator from './components/Generator'; 5 | import Home from './components/Home'; 6 | import Navbar from 'react-bootstrap/Navbar'; 7 | import Nav from 'react-bootstrap/Nav'; 8 | import Container from 'react-bootstrap/Container'; 9 | class App extends React.Component{ 10 | constructor(props){ 11 | super(props) 12 | this.generator = React.createRef(); 13 | } 14 | 15 | setManager = ()=>{ 16 | this.generator.current.toggleScreen() 17 | } 18 | render(){ 19 | return( 20 | <> 21 | CryptoGenerator 22 | 28 | 29 | 30 | 31 | 32 | 37 | 38 | 39 | 40 |
41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 |
49 | 50 | ) 51 | } 52 | } 53 | 54 | export default App; -------------------------------------------------------------------------------- /src/App.test.js: -------------------------------------------------------------------------------- 1 | import { render, screen } from '@testing-library/react'; 2 | import App from './App'; 3 | 4 | test('renders learn react link', () => { 5 | render(); 6 | const linkElement = screen.getByText(/learn react/i); 7 | expect(linkElement).toBeInTheDocument(); 8 | }); 9 | -------------------------------------------------------------------------------- /src/components/AddliquidityPancake.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import pancakeswapRouterABI from './PancakeswapRouterABI'; 3 | import PancakeswapFactoryABI from './PancakeswapFactoryABI'; 4 | import Form from 'react-bootstrap/Form'; 5 | import Accordion from 'react-bootstrap/Accordion'; 6 | import Button from 'react-bootstrap/Button'; 7 | import Loader from "react-loader-spinner"; 8 | import {BsXOctagonFill, BsCheck} from "react-icons/bs"; 9 | import { IconContext } from "react-icons"; 10 | 11 | /* 12 | props: 13 | web3 14 | Account 15 | coinContract 16 | tokenAddress 17 | */ 18 | class AddLiquidityPancake extends React.Component{ 19 | constructor(props){ 20 | super(props) 21 | this.state = { 22 | bnbValue: 0, 23 | tokenNumber: 1000, 24 | slippage: 0.5, 25 | status: "null", 26 | approved: false 27 | } 28 | this.pancakeRouter = new this.props.web3.eth.Contract(pancakeswapRouterABI, "0x10ED43C718714eb63d5aA57B78B54704E256024E") 29 | 30 | } 31 | 32 | bnbAmmountUpdate = (e)=>{ 33 | this.setState({bnbValue: (Number(e.target.value)*(10**18)).toString()}) 34 | } 35 | tokenNumberUpdate = (e)=>{ 36 | this.setState({tokenNumber: e.target.value}) 37 | } 38 | 39 | approveTokens = async () =>{ 40 | this.setState({status: "loading"}) 41 | let approvefunc = this.props.contract.methods.approve( 42 | "0x10ED43C718714eb63d5aA57B78B54704E256024E", 43 | this.state.tokenNumber.toString() 44 | ) 45 | console.log(await approvefunc.estimateGas({from: this.props.Account})) 46 | 47 | this.setState({status: "loading"}) 48 | await approvefunc.send({ 49 | from: this.props.Account 50 | }).on('receipt',()=>{ 51 | this.setState({status: "success"}) 52 | this.setState({approved: true}) 53 | }) 54 | .on('error', ()=>{ 55 | this.setState({status: "error"}) 56 | }) 57 | 58 | } 59 | 60 | slippageUpdate = (e)=>{ 61 | this.setState({slippage: Number(e.target.value)}) 62 | } 63 | 64 | 65 | 66 | addLiquidityBNB = async ()=>{ 67 | 68 | 69 | let address = this.props.tokenAddress 70 | let tokenNumber = (this.state.tokenNumber) 71 | let tokenMin = tokenNumber-(tokenNumber*(this.state.slippage/100)) 72 | let bnbMin = this.state.bnbValue - (this.state.bnbValue*(this.state.slippage/100)) 73 | let to = this.props.Account 74 | let deadline = Math.floor((Date.now()/1000)+60*10) 75 | console.log("address: ",address) 76 | console.log("token number: ",tokenNumber) 77 | console.log("bnbMin ", bnbMin) 78 | console.log("tokenMin ", tokenMin) 79 | console.log("to ", to) 80 | console.log("deadline ",deadline) 81 | let addLiquidity = this.pancakeRouter.methods.addLiquidityETH( 82 | address, 83 | tokenNumber.toString(), 84 | tokenMin.toString(), 85 | bnbMin.toString(), 86 | to, 87 | deadline 88 | ) 89 | let gasAmmount = await addLiquidity.estimateGas({ 90 | from: this.props.Account, 91 | value: this.state.bnbValue 92 | }) 93 | this.setState({status: 'loading'}) 94 | await addLiquidity.send({ 95 | gas: gasAmmount, 96 | from: this.props.Account, 97 | value: this.state.bnbValue 98 | }) 99 | .on('receipt', async ()=>{ 100 | this.setState({status: "success"}) 101 | this.pancakeFactory = new this.props.web3.eth.Contract(PancakeswapFactoryABI, "0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73"); 102 | let lpPair = await this.pancakeFactory.methods.getPair("0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c", this.props.tokenAddress).call() 103 | let symbol = await this.props.contract.methods.symbol().call() 104 | let name = await this.props.contract.methods.name().call() 105 | const wasAdded = await window.ethereum.request({ 106 | method: 'wallet_watchAsset', 107 | params: { 108 | type: 'ERC20', // Initially only supports ERC20, but eventually more! 109 | options: { 110 | address: lpPair, // The address that the token is at. 111 | symbol: symbol+"-LP", 112 | decimals: 18, 113 | name: name+"-LP" 114 | }, 115 | }, 116 | }); 117 | //wbnb address: 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c 118 | }) 119 | .on('error', ()=>{ 120 | this.setState({status: "error"}) 121 | }) 122 | 123 | } 124 | 125 | render(){ 126 | return( 127 |
128 |
129 |

Launch to PancakeSwap

130 | 131 | 132 |
133 | {this.state.status === "error"? 134 | 135 | 136 | 137 | : 138 | null 139 | } 140 | {this.state.status === "success"? 141 | 142 | 143 | 144 | : 145 | null 146 | } 147 |
148 |
149 | BNB Amount 150 | 151 | Token Number 152 | 153 |
154 |
155 | 156 | 157 | 158 |
159 |
160 | 161 | advanced 162 | 163 | Slippage 164 |

{this.state.slippage}%

165 |
166 |
167 |
168 | ) 169 | } 170 | } 171 | export default AddLiquidityPancake; -------------------------------------------------------------------------------- /src/components/ChainDialog.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Modal from 'react-bootstrap/Modal'; 3 | import Container from 'react-bootstrap/Container'; 4 | 5 | 6 | 7 | class ChainDialog extends React.Component{ 8 | 9 | constructor(props){ 10 | super(props) 11 | this.state = {show: false} 12 | } 13 | 14 | 15 | 16 | render(){ 17 | return( 18 | 19 | 20 |
21 |
22 |
23 |

You are not connect to binance smart chain

24 |
25 |

You must switch MetaMask to smartchain to use this app

26 |

learn how to connect metamask to binance smartchain

27 | here 28 |
29 |
30 |
31 |
32 | 33 |
34 | ) 35 | } 36 | } 37 | 38 | export default ChainDialog; -------------------------------------------------------------------------------- /src/components/CoinManager.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import ContractFrameABI from './ContractFrameABI'; 4 | import Accordion from 'react-bootstrap/Accordion'; 5 | import Button from 'react-bootstrap/Button'; 6 | import EditContract from './EditCointract'; 7 | import pancakeswapRouterABI from './PancakeswapRouterABI'; 8 | import AddLiquidityPancake from './AddliquidityPancake'; 9 | 10 | class CoinManager extends React.Component{ 11 | //this.props.coinAddress 12 | //this.props.web3 13 | //this.props.Account 14 | //this.props.coinContract 15 | constructor(props){ 16 | super(props); 17 | 18 | this.state = { 19 | 20 | address : this.props.coinAddress, 21 | web3 : this.props.web3, 22 | renounceOwnerShipAttemp: false, 23 | account_index: 0, 24 | charityAddressInput: "", 25 | inputs: { 26 | "charityWallet":null, 27 | "_charityFee":null, 28 | "_burnFee":null 29 | }, 30 | currentValues:{ 31 | charityAddress: null 32 | }, 33 | states: { 34 | setcharityWallet : null, 35 | setChartityFeePercent : null, 36 | } 37 | } 38 | this.abi = ContractFrameABI 39 | this.routerabi = pancakeswapRouterABI 40 | } 41 | 42 | setContractAttribute = (functionName, inputName)=>{ 43 | return async ()=>{ 44 | console.log(functionName) 45 | console.log(this.props.contract.methods) 46 | let setAttributeFunc = this.props.contract.methods[functionName](this.state.inputs[inputName]) 47 | let totalGas = await setAttributeFunc.estimateGas({from: this.props.Account}) 48 | this.setState((state)=>{ 49 | let states = state.states 50 | states[functionName] = "loading" 51 | return {states: states} 52 | }) 53 | setAttributeFunc.send({ 54 | from: this.props.Account, 55 | gas: totalGas 56 | }) 57 | .on('receipt',()=>{ 58 | this.setState((state)=>{ 59 | let states = state.states 60 | states[functionName] = "success" 61 | return {states: states} 62 | }) 63 | }) 64 | .on('error', ()=>{ 65 | this.setState((state)=>{ 66 | let states = state.states 67 | states[functionName] = "error" 68 | return {states: states} 69 | }) 70 | }) 71 | } 72 | } 73 | 74 | renounceOwnerShip = async ()=>{ 75 | let func = this.props.contract.methods.renounceOwnership() 76 | let totalGas = await func.estimateGas({from: this.props.Account}) 77 | func.send({ 78 | from: this.props.Account, 79 | gas: totalGas 80 | }) 81 | } 82 | 83 | 84 | 85 | 86 | 87 | setCharityPercent = async ()=>{ 88 | let setCharityPercentfunc = this.props.contract.methods.setChartityFeePercent(this.state.inputs["_charityFee"]) 89 | let totalGas = await setCharityPercentfunc.estimateGas({from: this.props.Account}) 90 | this.setState({state: "loading"}) 91 | setCharityPercentfunc.send( 92 | { 93 | from: this.props.account, 94 | gas: totalGas 95 | } 96 | ) 97 | 98 | } 99 | 100 | setCharityAddress = async ()=>{ 101 | console.log(this.state.inputs) 102 | let setCharityfunc = this.props.contract.methods.setcharityWallet(this.state.inputs["charityWallet"]) 103 | let totalGas = await setCharityfunc.estimateGas({from: this.props.Account}) 104 | this.setState({state: "loading"}) 105 | setCharityfunc.send({ 106 | from: this.props.Account, 107 | gas: totalGas 108 | }) 109 | .on('receipt',()=>{ 110 | this.setState((state)=>{ 111 | let states = state.states 112 | states.setcharityWallet = "success" 113 | return {states: states} 114 | }) 115 | }) 116 | .on('error', ()=>{ 117 | this.setState((state)=>{ 118 | let states = state.states 119 | states.setcharityWallet = "error" 120 | return {states: states} 121 | }) 122 | }) 123 | } 124 | 125 | updateAttribute = (attribute) =>{ 126 | 127 | return async (e)=>{ 128 | console.log(this.state.inputs) 129 | this.setState((state)=>{ 130 | let inputs = state.inputs; 131 | inputs[attribute] = e.target.value; 132 | return {inputs:inputs} 133 | }) 134 | } 135 | } 136 | 137 | getContractAttribute= (attribute)=>{ //function generate that gets an attribute from the contract and sets the corrisponding currentValue 138 | return async ()=>{ 139 | let getFunction = this.props.contract.methods[attribute]() 140 | let value = await getFunction.call() 141 | this.setState((state)=>{ 142 | let currentValues = state.currentValues; 143 | currentValues[attribute] = value; 144 | return {currentValues: currentValues} 145 | }) 146 | } 147 | } 148 | 149 | componentDidMount(){ 150 | console.log(this.props.contract.methods) 151 | } 152 | render(){ 153 | return(<> 154 | 155 |

{this.props.name}

156 |

{this.props.address}

157 |
158 | 159 | 160 | Charity Functions 161 | 162 | 174 | 186 | 187 | 188 | 189 | 190 | 191 | Tokenomics 192 | 193 | 205 | 217 | 229 | 230 | 231 | 232 | General Functions 233 | 234 | 235 | {this.state.renounceOwnerShipAttemp? 236 | <> 237 |

This will mean that you no longer have the ability to edit any of the contract parameters.

238 |

Are you sure?

239 | 240 | 241 | 242 | : 243 | null 244 | } 245 |
246 |
247 | 248 | PancakeSwap 249 | 250 | 255 | 256 | 257 | 258 |
259 | ) 260 | 261 | } 262 | } 263 | 264 | 265 | export default CoinManager; -------------------------------------------------------------------------------- /src/components/ContractFactorABI.js: -------------------------------------------------------------------------------- 1 | const ContractFactoryABI = [ 2 | { 3 | "inputs": [], 4 | "stateMutability": "nonpayable", 5 | "type": "constructor" 6 | }, 7 | { 8 | "anonymous": false, 9 | "inputs": [ 10 | { 11 | "indexed": false, 12 | "internalType": "uint256", 13 | "name": "id", 14 | "type": "uint256" 15 | }, 16 | { 17 | "indexed": false, 18 | "internalType": "address", 19 | "name": "owner", 20 | "type": "address" 21 | }, 22 | { 23 | "indexed": false, 24 | "internalType": "contract ContractFrame", 25 | "name": "token", 26 | "type": "address" 27 | } 28 | ], 29 | "name": "coinCreated", 30 | "type": "event" 31 | }, 32 | { 33 | "inputs": [ 34 | { 35 | "internalType": "string", 36 | "name": "name", 37 | "type": "string" 38 | }, 39 | { 40 | "internalType": "string", 41 | "name": "symbol", 42 | "type": "string" 43 | }, 44 | { 45 | "internalType": "uint256", 46 | "name": "totalSupply", 47 | "type": "uint256" 48 | }, 49 | { 50 | "internalType": "uint8", 51 | "name": "decimals", 52 | "type": "uint8" 53 | } 54 | ], 55 | "name": "createCoin", 56 | "outputs": [ 57 | { 58 | "internalType": "uint256", 59 | "name": "", 60 | "type": "uint256" 61 | } 62 | ], 63 | "stateMutability": "payable", 64 | "type": "function" 65 | }, 66 | { 67 | "anonymous": false, 68 | "inputs": [ 69 | { 70 | "indexed": false, 71 | "internalType": "uint256", 72 | "name": "id", 73 | "type": "uint256" 74 | } 75 | ], 76 | "name": "id_is", 77 | "type": "event" 78 | }, 79 | { 80 | "inputs": [ 81 | { 82 | "internalType": "uint256", 83 | "name": "bnb", 84 | "type": "uint256" 85 | } 86 | ], 87 | "name": "setPrice", 88 | "outputs": [], 89 | "stateMutability": "nonpayable", 90 | "type": "function" 91 | }, 92 | { 93 | "inputs": [], 94 | "name": "withdrawlBNB", 95 | "outputs": [], 96 | "stateMutability": "nonpayable", 97 | "type": "function" 98 | }, 99 | { 100 | "inputs": [ 101 | { 102 | "internalType": "address", 103 | "name": "", 104 | "type": "address" 105 | }, 106 | { 107 | "internalType": "uint256", 108 | "name": "", 109 | "type": "uint256" 110 | } 111 | ], 112 | "name": "contracts", 113 | "outputs": [ 114 | { 115 | "internalType": "contract ContractFrame", 116 | "name": "", 117 | "type": "address" 118 | } 119 | ], 120 | "stateMutability": "view", 121 | "type": "function" 122 | }, 123 | { 124 | "inputs": [ 125 | { 126 | "internalType": "address", 127 | "name": "", 128 | "type": "address" 129 | } 130 | ], 131 | "name": "numberOfCoins", 132 | "outputs": [ 133 | { 134 | "internalType": "uint256", 135 | "name": "", 136 | "type": "uint256" 137 | } 138 | ], 139 | "stateMutability": "view", 140 | "type": "function" 141 | }, 142 | { 143 | "inputs": [ 144 | { 145 | "internalType": "address", 146 | "name": "", 147 | "type": "address" 148 | }, 149 | { 150 | "internalType": "uint256", 151 | "name": "", 152 | "type": "uint256" 153 | } 154 | ], 155 | "name": "ownersContracts", 156 | "outputs": [ 157 | { 158 | "internalType": "uint256", 159 | "name": "", 160 | "type": "uint256" 161 | } 162 | ], 163 | "stateMutability": "view", 164 | "type": "function" 165 | }, 166 | { 167 | "inputs": [], 168 | "name": "price", 169 | "outputs": [ 170 | { 171 | "internalType": "uint256", 172 | "name": "", 173 | "type": "uint256" 174 | } 175 | ], 176 | "stateMutability": "view", 177 | "type": "function" 178 | } 179 | ] 180 | 181 | export default ContractFactoryABI; -------------------------------------------------------------------------------- /src/components/ContractFrameABI.js: -------------------------------------------------------------------------------- 1 | const ContractFrameABI = [ 2 | { 3 | "inputs": [ 4 | { 5 | "internalType": "string", 6 | "name": "name", 7 | "type": "string" 8 | }, 9 | { 10 | "internalType": "string", 11 | "name": "symbol", 12 | "type": "string" 13 | }, 14 | { 15 | "internalType": "uint8", 16 | "name": "decimals", 17 | "type": "uint8" 18 | }, 19 | { 20 | "internalType": "uint256", 21 | "name": "totalSupply", 22 | "type": "uint256" 23 | }, 24 | { 25 | "internalType": "address", 26 | "name": "creator", 27 | "type": "address" 28 | } 29 | ], 30 | "stateMutability": "nonpayable", 31 | "type": "constructor" 32 | }, 33 | { 34 | "anonymous": false, 35 | "inputs": [ 36 | { 37 | "indexed": true, 38 | "internalType": "address", 39 | "name": "owner", 40 | "type": "address" 41 | }, 42 | { 43 | "indexed": true, 44 | "internalType": "address", 45 | "name": "spender", 46 | "type": "address" 47 | }, 48 | { 49 | "indexed": false, 50 | "internalType": "uint256", 51 | "name": "value", 52 | "type": "uint256" 53 | } 54 | ], 55 | "name": "Approval", 56 | "type": "event" 57 | }, 58 | { 59 | "anonymous": false, 60 | "inputs": [ 61 | { 62 | "indexed": false, 63 | "internalType": "uint256", 64 | "name": "minTokensBeforeSwap", 65 | "type": "uint256" 66 | } 67 | ], 68 | "name": "MinTokensBeforeSwapUpdated", 69 | "type": "event" 70 | }, 71 | { 72 | "anonymous": false, 73 | "inputs": [ 74 | { 75 | "indexed": true, 76 | "internalType": "address", 77 | "name": "previousOwner", 78 | "type": "address" 79 | }, 80 | { 81 | "indexed": true, 82 | "internalType": "address", 83 | "name": "newOwner", 84 | "type": "address" 85 | } 86 | ], 87 | "name": "OwnershipTransferred", 88 | "type": "event" 89 | }, 90 | { 91 | "anonymous": false, 92 | "inputs": [ 93 | { 94 | "indexed": false, 95 | "internalType": "uint256", 96 | "name": "tokensSwapped", 97 | "type": "uint256" 98 | }, 99 | { 100 | "indexed": false, 101 | "internalType": "uint256", 102 | "name": "ethReceived", 103 | "type": "uint256" 104 | }, 105 | { 106 | "indexed": false, 107 | "internalType": "uint256", 108 | "name": "tokensIntoLiqudity", 109 | "type": "uint256" 110 | } 111 | ], 112 | "name": "SwapAndLiquify", 113 | "type": "event" 114 | }, 115 | { 116 | "anonymous": false, 117 | "inputs": [ 118 | { 119 | "indexed": false, 120 | "internalType": "bool", 121 | "name": "enabled", 122 | "type": "bool" 123 | } 124 | ], 125 | "name": "SwapAndLiquifyEnabledUpdated", 126 | "type": "event" 127 | }, 128 | { 129 | "anonymous": false, 130 | "inputs": [ 131 | { 132 | "indexed": true, 133 | "internalType": "address", 134 | "name": "from", 135 | "type": "address" 136 | }, 137 | { 138 | "indexed": true, 139 | "internalType": "address", 140 | "name": "to", 141 | "type": "address" 142 | }, 143 | { 144 | "indexed": false, 145 | "internalType": "uint256", 146 | "name": "value", 147 | "type": "uint256" 148 | } 149 | ], 150 | "name": "Transfer", 151 | "type": "event" 152 | }, 153 | { 154 | "inputs": [], 155 | "name": "_burnFee", 156 | "outputs": [ 157 | { 158 | "internalType": "uint256", 159 | "name": "", 160 | "type": "uint256" 161 | } 162 | ], 163 | "stateMutability": "view", 164 | "type": "function" 165 | }, 166 | { 167 | "inputs": [], 168 | "name": "_charityFee", 169 | "outputs": [ 170 | { 171 | "internalType": "uint256", 172 | "name": "", 173 | "type": "uint256" 174 | } 175 | ], 176 | "stateMutability": "view", 177 | "type": "function" 178 | }, 179 | { 180 | "inputs": [], 181 | "name": "_liquidityFee", 182 | "outputs": [ 183 | { 184 | "internalType": "uint256", 185 | "name": "", 186 | "type": "uint256" 187 | } 188 | ], 189 | "stateMutability": "view", 190 | "type": "function" 191 | }, 192 | { 193 | "inputs": [], 194 | "name": "_taxFee", 195 | "outputs": [ 196 | { 197 | "internalType": "uint256", 198 | "name": "", 199 | "type": "uint256" 200 | } 201 | ], 202 | "stateMutability": "view", 203 | "type": "function" 204 | }, 205 | { 206 | "inputs": [ 207 | { 208 | "internalType": "address", 209 | "name": "owner", 210 | "type": "address" 211 | }, 212 | { 213 | "internalType": "address", 214 | "name": "spender", 215 | "type": "address" 216 | } 217 | ], 218 | "name": "allowance", 219 | "outputs": [ 220 | { 221 | "internalType": "uint256", 222 | "name": "", 223 | "type": "uint256" 224 | } 225 | ], 226 | "stateMutability": "view", 227 | "type": "function" 228 | }, 229 | { 230 | "inputs": [ 231 | { 232 | "internalType": "address", 233 | "name": "spender", 234 | "type": "address" 235 | }, 236 | { 237 | "internalType": "uint256", 238 | "name": "amount", 239 | "type": "uint256" 240 | } 241 | ], 242 | "name": "approve", 243 | "outputs": [ 244 | { 245 | "internalType": "bool", 246 | "name": "", 247 | "type": "bool" 248 | } 249 | ], 250 | "stateMutability": "nonpayable", 251 | "type": "function" 252 | }, 253 | { 254 | "inputs": [ 255 | { 256 | "internalType": "address", 257 | "name": "account", 258 | "type": "address" 259 | } 260 | ], 261 | "name": "balanceOf", 262 | "outputs": [ 263 | { 264 | "internalType": "uint256", 265 | "name": "", 266 | "type": "uint256" 267 | } 268 | ], 269 | "stateMutability": "view", 270 | "type": "function" 271 | }, 272 | { 273 | "inputs": [ 274 | { 275 | "internalType": "uint256", 276 | "name": "tokens", 277 | "type": "uint256" 278 | }, 279 | { 280 | "internalType": "uint256", 281 | "name": "price", 282 | "type": "uint256" 283 | } 284 | ], 285 | "name": "beginPresale", 286 | "outputs": [ 287 | { 288 | "internalType": "bool", 289 | "name": "", 290 | "type": "bool" 291 | } 292 | ], 293 | "stateMutability": "nonpayable", 294 | "type": "function" 295 | }, 296 | { 297 | "inputs": [], 298 | "name": "buy", 299 | "outputs": [], 300 | "stateMutability": "payable", 301 | "type": "function" 302 | }, 303 | { 304 | "inputs": [], 305 | "name": "charityWallet", 306 | "outputs": [ 307 | { 308 | "internalType": "address", 309 | "name": "", 310 | "type": "address" 311 | } 312 | ], 313 | "stateMutability": "view", 314 | "type": "function" 315 | }, 316 | { 317 | "inputs": [], 318 | "name": "contractBalance", 319 | "outputs": [ 320 | { 321 | "internalType": "uint256", 322 | "name": "", 323 | "type": "uint256" 324 | } 325 | ], 326 | "stateMutability": "view", 327 | "type": "function" 328 | }, 329 | { 330 | "inputs": [], 331 | "name": "decimals", 332 | "outputs": [ 333 | { 334 | "internalType": "uint8", 335 | "name": "", 336 | "type": "uint8" 337 | } 338 | ], 339 | "stateMutability": "view", 340 | "type": "function" 341 | }, 342 | { 343 | "inputs": [ 344 | { 345 | "internalType": "address", 346 | "name": "spender", 347 | "type": "address" 348 | }, 349 | { 350 | "internalType": "uint256", 351 | "name": "subtractedValue", 352 | "type": "uint256" 353 | } 354 | ], 355 | "name": "decreaseAllowance", 356 | "outputs": [ 357 | { 358 | "internalType": "bool", 359 | "name": "", 360 | "type": "bool" 361 | } 362 | ], 363 | "stateMutability": "nonpayable", 364 | "type": "function" 365 | }, 366 | { 367 | "inputs": [ 368 | { 369 | "internalType": "uint256", 370 | "name": "tAmount", 371 | "type": "uint256" 372 | } 373 | ], 374 | "name": "deliver", 375 | "outputs": [], 376 | "stateMutability": "nonpayable", 377 | "type": "function" 378 | }, 379 | { 380 | "inputs": [], 381 | "name": "disableAllFees", 382 | "outputs": [], 383 | "stateMutability": "nonpayable", 384 | "type": "function" 385 | }, 386 | { 387 | "inputs": [], 388 | "name": "endPresale", 389 | "outputs": [ 390 | { 391 | "internalType": "bool", 392 | "name": "", 393 | "type": "bool" 394 | } 395 | ], 396 | "stateMutability": "nonpayable", 397 | "type": "function" 398 | }, 399 | { 400 | "inputs": [ 401 | { 402 | "internalType": "address", 403 | "name": "account", 404 | "type": "address" 405 | } 406 | ], 407 | "name": "excludeFromFee", 408 | "outputs": [], 409 | "stateMutability": "nonpayable", 410 | "type": "function" 411 | }, 412 | { 413 | "inputs": [ 414 | { 415 | "internalType": "address", 416 | "name": "account", 417 | "type": "address" 418 | } 419 | ], 420 | "name": "excludeFromReward", 421 | "outputs": [], 422 | "stateMutability": "nonpayable", 423 | "type": "function" 424 | }, 425 | { 426 | "inputs": [], 427 | "name": "geUnlockTime", 428 | "outputs": [ 429 | { 430 | "internalType": "uint256", 431 | "name": "", 432 | "type": "uint256" 433 | } 434 | ], 435 | "stateMutability": "view", 436 | "type": "function" 437 | }, 438 | { 439 | "inputs": [ 440 | { 441 | "internalType": "address", 442 | "name": "account", 443 | "type": "address" 444 | } 445 | ], 446 | "name": "includeInFee", 447 | "outputs": [], 448 | "stateMutability": "nonpayable", 449 | "type": "function" 450 | }, 451 | { 452 | "inputs": [ 453 | { 454 | "internalType": "address", 455 | "name": "account", 456 | "type": "address" 457 | } 458 | ], 459 | "name": "includeInReward", 460 | "outputs": [], 461 | "stateMutability": "nonpayable", 462 | "type": "function" 463 | }, 464 | { 465 | "inputs": [ 466 | { 467 | "internalType": "address", 468 | "name": "spender", 469 | "type": "address" 470 | }, 471 | { 472 | "internalType": "uint256", 473 | "name": "addedValue", 474 | "type": "uint256" 475 | } 476 | ], 477 | "name": "increaseAllowance", 478 | "outputs": [ 479 | { 480 | "internalType": "bool", 481 | "name": "", 482 | "type": "bool" 483 | } 484 | ], 485 | "stateMutability": "nonpayable", 486 | "type": "function" 487 | }, 488 | { 489 | "inputs": [ 490 | { 491 | "internalType": "address", 492 | "name": "account", 493 | "type": "address" 494 | } 495 | ], 496 | "name": "isExcludedFromFee", 497 | "outputs": [ 498 | { 499 | "internalType": "bool", 500 | "name": "", 501 | "type": "bool" 502 | } 503 | ], 504 | "stateMutability": "view", 505 | "type": "function" 506 | }, 507 | { 508 | "inputs": [ 509 | { 510 | "internalType": "address", 511 | "name": "account", 512 | "type": "address" 513 | } 514 | ], 515 | "name": "isExcludedFromReward", 516 | "outputs": [ 517 | { 518 | "internalType": "bool", 519 | "name": "", 520 | "type": "bool" 521 | } 522 | ], 523 | "stateMutability": "view", 524 | "type": "function" 525 | }, 526 | { 527 | "inputs": [ 528 | { 529 | "internalType": "uint256", 530 | "name": "time", 531 | "type": "uint256" 532 | } 533 | ], 534 | "name": "lock", 535 | "outputs": [], 536 | "stateMutability": "nonpayable", 537 | "type": "function" 538 | }, 539 | { 540 | "inputs": [], 541 | "name": "maxTokensPurchess", 542 | "outputs": [ 543 | { 544 | "internalType": "uint256", 545 | "name": "", 546 | "type": "uint256" 547 | } 548 | ], 549 | "stateMutability": "view", 550 | "type": "function" 551 | }, 552 | { 553 | "inputs": [], 554 | "name": "name", 555 | "outputs": [ 556 | { 557 | "internalType": "string", 558 | "name": "", 559 | "type": "string" 560 | } 561 | ], 562 | "stateMutability": "view", 563 | "type": "function" 564 | }, 565 | { 566 | "inputs": [], 567 | "name": "owner", 568 | "outputs": [ 569 | { 570 | "internalType": "address", 571 | "name": "", 572 | "type": "address" 573 | } 574 | ], 575 | "stateMutability": "view", 576 | "type": "function" 577 | }, 578 | { 579 | "inputs": [], 580 | "name": "presale", 581 | "outputs": [ 582 | { 583 | "internalType": "bool", 584 | "name": "", 585 | "type": "bool" 586 | } 587 | ], 588 | "stateMutability": "view", 589 | "type": "function" 590 | }, 591 | { 592 | "inputs": [], 593 | "name": "presalePrice", 594 | "outputs": [ 595 | { 596 | "internalType": "uint256", 597 | "name": "", 598 | "type": "uint256" 599 | } 600 | ], 601 | "stateMutability": "view", 602 | "type": "function" 603 | }, 604 | { 605 | "inputs": [], 606 | "name": "presaleTokens", 607 | "outputs": [ 608 | { 609 | "internalType": "uint256", 610 | "name": "", 611 | "type": "uint256" 612 | } 613 | ], 614 | "stateMutability": "view", 615 | "type": "function" 616 | }, 617 | { 618 | "inputs": [ 619 | { 620 | "internalType": "uint256", 621 | "name": "tAmount", 622 | "type": "uint256" 623 | }, 624 | { 625 | "internalType": "bool", 626 | "name": "deductTransferFee", 627 | "type": "bool" 628 | } 629 | ], 630 | "name": "reflectionFromToken", 631 | "outputs": [ 632 | { 633 | "internalType": "uint256", 634 | "name": "", 635 | "type": "uint256" 636 | } 637 | ], 638 | "stateMutability": "view", 639 | "type": "function" 640 | }, 641 | { 642 | "inputs": [], 643 | "name": "renounceOwnership", 644 | "outputs": [], 645 | "stateMutability": "nonpayable", 646 | "type": "function" 647 | }, 648 | { 649 | "inputs": [ 650 | { 651 | "internalType": "uint256", 652 | "name": "burnFee", 653 | "type": "uint256" 654 | } 655 | ], 656 | "name": "setBurnFeePercent", 657 | "outputs": [], 658 | "stateMutability": "nonpayable", 659 | "type": "function" 660 | }, 661 | { 662 | "inputs": [ 663 | { 664 | "internalType": "uint256", 665 | "name": "charityFee", 666 | "type": "uint256" 667 | } 668 | ], 669 | "name": "setChartityFeePercent", 670 | "outputs": [], 671 | "stateMutability": "nonpayable", 672 | "type": "function" 673 | }, 674 | { 675 | "inputs": [ 676 | { 677 | "internalType": "uint256", 678 | "name": "liquidityFee", 679 | "type": "uint256" 680 | } 681 | ], 682 | "name": "setLiquidityFeePercent", 683 | "outputs": [], 684 | "stateMutability": "nonpayable", 685 | "type": "function" 686 | }, 687 | { 688 | "inputs": [ 689 | { 690 | "internalType": "uint256", 691 | "name": "limit", 692 | "type": "uint256" 693 | } 694 | ], 695 | "name": "setPresaleLimit", 696 | "outputs": [], 697 | "stateMutability": "nonpayable", 698 | "type": "function" 699 | }, 700 | { 701 | "inputs": [ 702 | { 703 | "internalType": "address", 704 | "name": "newRouter", 705 | "type": "address" 706 | } 707 | ], 708 | "name": "setRouterAddress", 709 | "outputs": [], 710 | "stateMutability": "nonpayable", 711 | "type": "function" 712 | }, 713 | { 714 | "inputs": [ 715 | { 716 | "internalType": "bool", 717 | "name": "_enabled", 718 | "type": "bool" 719 | } 720 | ], 721 | "name": "setSwapAndLiquifyEnabled", 722 | "outputs": [], 723 | "stateMutability": "nonpayable", 724 | "type": "function" 725 | }, 726 | { 727 | "inputs": [ 728 | { 729 | "internalType": "uint256", 730 | "name": "taxFee", 731 | "type": "uint256" 732 | } 733 | ], 734 | "name": "setTaxFeePercent", 735 | "outputs": [], 736 | "stateMutability": "nonpayable", 737 | "type": "function" 738 | }, 739 | { 740 | "inputs": [ 741 | { 742 | "internalType": "address", 743 | "name": "newWallet", 744 | "type": "address" 745 | } 746 | ], 747 | "name": "setcharityWallet", 748 | "outputs": [], 749 | "stateMutability": "nonpayable", 750 | "type": "function" 751 | }, 752 | { 753 | "inputs": [], 754 | "name": "swapAndLiquifyEnabled", 755 | "outputs": [ 756 | { 757 | "internalType": "bool", 758 | "name": "", 759 | "type": "bool" 760 | } 761 | ], 762 | "stateMutability": "view", 763 | "type": "function" 764 | }, 765 | { 766 | "inputs": [], 767 | "name": "symbol", 768 | "outputs": [ 769 | { 770 | "internalType": "string", 771 | "name": "", 772 | "type": "string" 773 | } 774 | ], 775 | "stateMutability": "view", 776 | "type": "function" 777 | }, 778 | { 779 | "inputs": [ 780 | { 781 | "internalType": "uint256", 782 | "name": "rAmount", 783 | "type": "uint256" 784 | } 785 | ], 786 | "name": "tokenFromReflection", 787 | "outputs": [ 788 | { 789 | "internalType": "uint256", 790 | "name": "", 791 | "type": "uint256" 792 | } 793 | ], 794 | "stateMutability": "view", 795 | "type": "function" 796 | }, 797 | { 798 | "inputs": [], 799 | "name": "totalFees", 800 | "outputs": [ 801 | { 802 | "internalType": "uint256", 803 | "name": "", 804 | "type": "uint256" 805 | } 806 | ], 807 | "stateMutability": "view", 808 | "type": "function" 809 | }, 810 | { 811 | "inputs": [], 812 | "name": "totalSupply", 813 | "outputs": [ 814 | { 815 | "internalType": "uint256", 816 | "name": "", 817 | "type": "uint256" 818 | } 819 | ], 820 | "stateMutability": "view", 821 | "type": "function" 822 | }, 823 | { 824 | "inputs": [ 825 | { 826 | "internalType": "address", 827 | "name": "recipient", 828 | "type": "address" 829 | }, 830 | { 831 | "internalType": "uint256", 832 | "name": "amount", 833 | "type": "uint256" 834 | } 835 | ], 836 | "name": "transfer", 837 | "outputs": [ 838 | { 839 | "internalType": "bool", 840 | "name": "", 841 | "type": "bool" 842 | } 843 | ], 844 | "stateMutability": "nonpayable", 845 | "type": "function" 846 | }, 847 | { 848 | "inputs": [ 849 | { 850 | "internalType": "address", 851 | "name": "sender", 852 | "type": "address" 853 | }, 854 | { 855 | "internalType": "address", 856 | "name": "recipient", 857 | "type": "address" 858 | }, 859 | { 860 | "internalType": "uint256", 861 | "name": "amount", 862 | "type": "uint256" 863 | } 864 | ], 865 | "name": "transferFrom", 866 | "outputs": [ 867 | { 868 | "internalType": "bool", 869 | "name": "", 870 | "type": "bool" 871 | } 872 | ], 873 | "stateMutability": "nonpayable", 874 | "type": "function" 875 | }, 876 | { 877 | "inputs": [ 878 | { 879 | "internalType": "address", 880 | "name": "newOwner", 881 | "type": "address" 882 | } 883 | ], 884 | "name": "transferOwnership", 885 | "outputs": [], 886 | "stateMutability": "nonpayable", 887 | "type": "function" 888 | }, 889 | { 890 | "inputs": [], 891 | "name": "uniswapV2Pair", 892 | "outputs": [ 893 | { 894 | "internalType": "address", 895 | "name": "", 896 | "type": "address" 897 | } 898 | ], 899 | "stateMutability": "view", 900 | "type": "function" 901 | }, 902 | { 903 | "inputs": [], 904 | "name": "uniswapV2Router", 905 | "outputs": [ 906 | { 907 | "internalType": "contract IUniswapV2Router02", 908 | "name": "", 909 | "type": "address" 910 | } 911 | ], 912 | "stateMutability": "view", 913 | "type": "function" 914 | }, 915 | { 916 | "inputs": [], 917 | "name": "unlock", 918 | "outputs": [], 919 | "stateMutability": "nonpayable", 920 | "type": "function" 921 | }, 922 | { 923 | "inputs": [], 924 | "name": "withdrawBNB", 925 | "outputs": [], 926 | "stateMutability": "nonpayable", 927 | "type": "function" 928 | }, 929 | { 930 | "stateMutability": "payable", 931 | "type": "receive" 932 | } 933 | ] 934 | 935 | export default ContractFrameABI; -------------------------------------------------------------------------------- /src/components/Docs.css: -------------------------------------------------------------------------------- 1 | #docs img { 2 | margin:15px; 3 | } 4 | 5 | #docs p{ 6 | padding-top: 20px; 7 | } -------------------------------------------------------------------------------- /src/components/Docs.jsx: -------------------------------------------------------------------------------- 1 | import React, {Component} from 'react'; 2 | import {Accordion,Card,Container} from 'react-bootstrap'; 3 | import './Docs.css'; 4 | 5 | class Docs extends Component { 6 | render () { 7 | return ( 8 |
9 |
10 | 11 | 12 | How to use Crypto Generator 13 | 14 | 15 |

Click on Start Building to get to the builder tab.

16 |
17 | 18 |
19 |
20 | 21 |

Click Connect and use either MetaMask or WalletConnect to connect your crypto wallet.

22 |
23 | 24 | 25 | 26 | 27 |
28 |
29 | 30 |

Use the Coin Name field to name your coin and the set a Symbol for your coin.

31 |

Enter the amount of supply you want in the Total Supply field and then set your coin's decimals. (18 is recommended)

32 |

Click on Create Coin and then your coin should appear.

33 |
34 | 35 |
36 |
37 |
38 |
39 |
40 | 41 | 42 | 43 | How to Make Safemoon Clone 44 | 45 | 46 |

Go to the coin manager tab.

47 |
48 | 49 |
50 |
51 | 52 |

Set each of the following values in the Tokenomics tab:

53 |

Deflation percent: 5%

54 |

Liquidity percent: 0%

55 |

Dividend percent: 5%

56 |
57 | 58 | 59 |
60 |
61 |
62 |
63 | 64 | How to Make a Charity Coin 65 | 66 | 67 |

Go to the coin manager tab.

68 |
69 | 70 |
71 |
72 | 73 |

Go to the Charity Functions tab.

74 |

Set the desired charity wallet address to any BNB/ETH address.

75 |

Set the desired charity percentage to be sent to the wallet with every transaction.

76 |
77 | 78 |
79 |
80 |
81 |
82 | 83 | Tokenomics Explained 84 | 85 | 86 |

Go to the coin manager tab.

87 |
88 | 89 |
90 |
91 | 92 |

Go to the Tokenomics tab:

93 |

Deflation percent: This is the percentage of your coin that is burned/destroyed during every transaction to make your coin deflationary.

94 |

Liquidity percent: This is the percentage of your coin that is sent to the liquidity pool during every transaction to add backing value to your coin.

95 |

Dividend percent: This is the percentage of your coin that is redistributed to all your holders during every transaction to encourage holding.

96 |
97 | 98 | 99 |
100 |
101 |
102 |
103 | 104 | General Functions Explained 105 | 106 | 107 |

Go to the coin manager tab.

108 |
109 | 110 |
111 |
112 | 113 |

Go to the General Functions tab:

114 |

Renounce Ownership: This is the button that will give away ownership of your coin.

115 |
116 | 117 |
118 |
119 |
120 |
121 | 122 | How to Add Your Coin to PancakeSwap 123 | 124 | 125 |

Go to the coin manager tab.

126 |
127 | 128 |
129 |
130 | 131 |

Set each of the following values in the PancakeSwap tab:

132 |

BNB Amount: Set the amount of BNB to be added to your coin's PancakeSwap liquidity pool.

133 |

Token Number: Set the amount of your coins to be added to your coin's PancakeSwap liquidity pool.

134 |

Slippage (Optional): Set the amount that the price can change during your token transactions.

135 |

Click Approve and then Add to PancakeSwap and then your coin should be listed.

136 |
137 | 138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 | ); 147 | } 148 | } 149 | 150 | export default Docs; -------------------------------------------------------------------------------- /src/components/EditCointract.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Form from 'react-bootstrap/Form'; 3 | import Button from 'react-bootstrap/Button'; 4 | import "react-loader-spinner/dist/loader/css/react-spinner-loader.css"; 5 | import Loader from "react-loader-spinner"; 6 | import {BsXOctagonFill, BsCheck} from "react-icons/bs"; 7 | import { IconContext } from "react-icons"; 8 | import Card from 'react-bootstrap/Card'; 9 | function EditContract(props){ 10 | return( 11 | 12 | 13 |
14 |

{props.title}

15 |
16 | 17 |
18 | 19 | 20 | 21 |
22 |
23 | 24 | 25 | 26 |
27 |
28 |
29 |
30 | 31 | 32 |
33 | {props.label} 34 | 35 |
36 |
37 | 38 | 39 | 40 |
41 |
42 | 43 | 44 |
45 |
46 |

{props.getValue === undefined?null:props.getValue+props.postFix}

47 | 48 |
49 |
50 |
51 | ) 52 | } 53 | 54 | export default EditContract; -------------------------------------------------------------------------------- /src/components/Generator.js: -------------------------------------------------------------------------------- 1 | import '../App.css'; 2 | import ContractFactoryABI from './ContractFactorABI'; 3 | import ContractFrameABI from './ContractFrameABI'; 4 | import WalletConnectProvider from "@walletconnect/web3-provider"; 5 | import Web3Modal from "web3modal"; 6 | import Minter from "./minter.jsx"; 7 | import MyCoins from "./MyCoins.jsx"; 8 | import Button from "react-bootstrap/Button"; 9 | import Slider from "./Slider"; 10 | import ListGroup from "react-bootstrap/ListGroup"; 11 | import React from 'react'; 12 | import Web3 from 'web3' 13 | import CoinManager from './CoinManager'; 14 | import ethIcon from '../images/etheriumCoin.png'; 15 | import bscIcon from '../images/bsc.svg'; 16 | import vendingMachine from '../images/vendingMachine.jpeg'; 17 | 18 | 19 | class Generator extends React.Component{ 20 | 21 | constructor(props){ 22 | super(props) 23 | this.state = { 24 | screen: this.props.screen, 25 | connected: false, 26 | addressList: [], 27 | web3: null, 28 | coins: [], 29 | accountIndex: 0, 30 | accounts: [], 31 | contracts: [], 32 | currentCoinContract: null, 33 | currentCoinName: null, 34 | currentCoinAddress: null, 35 | chainID: null 36 | } 37 | 38 | 39 | } 40 | 41 | toggleScreen = ()=>{ 42 | if(this.state.screen === "minter"){ 43 | this.setState({screen: "mycoins"}); 44 | } 45 | else{ 46 | this.setState({screen: "minter"}); 47 | } 48 | } 49 | 50 | disconnectMetaMask = async(e)=>{ 51 | this.setState({connected: false}) 52 | } 53 | 54 | addMetamask = async (address, contract) =>{ 55 | //let decimals = await 56 | let symbol = await contract.methods.symbol().call() 57 | let decimals = await contract.methods.decimals().call() 58 | let name = await contract.methods.name().call() 59 | const wasAdded = await window.ethereum.request({ 60 | method: 'wallet_watchAsset', 61 | params: { 62 | type: 'ERC20', // Initially only supports ERC20, but eventually more! 63 | options: { 64 | address: address, // The address that the token is at. 65 | symbol: symbol, 66 | decimals: decimals, 67 | name: name 68 | }, 69 | }, 70 | }); 71 | } 72 | 73 | connect = async () =>{ 74 | const providerOptions = { 75 | walletconnect: { 76 | package: WalletConnectProvider, 77 | options: { 78 | bridge: "https://bridge.walletconnect.org", 79 | rpc: { 80 | 56: "https://bsc-dataseed.binance.org/", 81 | }, 82 | network: "binance", 83 | }, 84 | }, 85 | }; 86 | const web3Modal = new Web3Modal({ 87 | cacheProvider: false, // optional 88 | providerOptions // required 89 | }); 90 | 91 | const provider = await web3Modal.connect(); 92 | 93 | this.web3 = new Web3(provider); 94 | this.accounts = await this.web3.eth.getAccounts() 95 | this.chainID = await this.web3.eth.getChainId(); 96 | 97 | if(this.chainID !== 56 && this.chainID !== 1){ 98 | this.setState({showBinaceWarning: true}) 99 | return; 100 | } 101 | provider.on("accountsChanged", (accounts) => { 102 | this.accounts = accounts; 103 | this.setState({addressList: this.accounts}); 104 | this.updateConnection() 105 | }); 106 | provider.on("chainChanged", (chainID) => { 107 | this.chainId = chainID; 108 | this.setState({chainID: this.chainID}) 109 | this.updateConnection(); 110 | }); 111 | provider.on('disconnect', this.disconnectMetaMask); 112 | this.setState({web3: this.web3}); 113 | this.setState({connected: true}); 114 | this.setState({chainID : this.chainID}); 115 | this.setState({addressList: this.accounts}); 116 | this.getUserCoins(); 117 | } 118 | 119 | updateConnection = async () =>{ 120 | this.setState({connected: false}); 121 | this.accounts = await this.web3.eth.getAccounts() 122 | this.chainID = await this.web3.eth.getChainId(); 123 | if(this.chainID !== 56 && this.chainID !== 1){ 124 | this.setState({showBinaceWarning: true}) 125 | return; 126 | } 127 | this.setState({chainID : this.chainID}); 128 | this.setState({addressList: this.accounts}); 129 | await this.getUserCoins() 130 | this.setState({connected: true}); 131 | } 132 | 133 | manageCoin = (coinContract, address, coinName) => { 134 | 135 | this.setState({currentContract: coinContract}) 136 | this.setState({currentCoinName: coinName}) 137 | this.setState({currentCoinAddress: address}) 138 | this.setState({screen: "manager"}) 139 | } 140 | 141 | getUserCoins = async ()=>{ 142 | if(this.chainID === 56){ 143 | this.tokenFactory = new this.web3.eth.Contract(ContractFactoryABI,"0xB614a403594a48E21B14a850CB0b2ed1eAD23B3c"); 144 | } 145 | if(this.chainID === 1){ 146 | this.tokenFactory = new this.web3.eth.Contract(ContractFactoryABI,"0x4D04B95Aa1A5d9e19d43fa1dCF90d9c551354a6D") 147 | } 148 | console.log("begin waiting") 149 | console.log(this.tokenFactory.methods) 150 | const number = await this.tokenFactory.methods.numberOfCoins(this.state.addressList[this.state.accountIndex]).call(); 151 | let coinIds = []; 152 | for(let i =0; i 170 | 171 |
172 |
173 | {coinName} 174 |
175 |
176 | 177 | 178 |
179 | 180 |
181 |

{address}

182 | 183 | 184 | ) 185 | } 186 | this.setState({coins : coins, contracts: contracts}) 187 | } 188 | 189 | render(){ 190 | return ( 191 | <> 192 | 193 | 194 | 195 | 196 |
197 |
198 |
199 | 200 |

coin {this.state.screen === "minter"? "minter" : "manager"}

201 | {this.state.connected? 202 | <> 203 | {this.state.chainID===1? connected to the etherium mainnet: null} 204 | {this.state.chainID===56? connected to binance smart chain: null} 205 | 206 | : 207 | null} 208 |
209 | {this.state.connected?null:} 210 | {this.state.connected? 211 |
212 | 213 |
Connected {this.state.addressList[0]? 214 | this.state.addressList[0].substring(0,6)+"..."+this.state.addressList[0].slice(this.state.addressList[0].length-4) 215 | : 216 | null} 217 |
218 | 219 |
220 | :null} 221 | 222 | 223 |
224 |
225 | 226 |
227 |
228 | {this.state.screen === "minter"? 229 | 230 | : 231 | null 232 | } 233 | {this.state.screen === "mycoins"? 234 | 235 | : 236 | null 237 | } 238 | {this.state.screen === "manager"? 239 | 246 | : 247 | null 248 | } 249 |
250 | 251 |
252 |
253 | 254 |
255 |
256 |
257 | 258 | ); 259 | } 260 | } 261 | 262 | export default Generator; 263 | -------------------------------------------------------------------------------- /src/components/Home.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {BrowserRouter as Router, Switch, Route, Link} from 'react-router-dom'; 3 | import Generator from './Generator'; 4 | import Card from 'react-bootstrap/Card'; 5 | import CardGroup from 'react-bootstrap/CardGroup'; 6 | import CharityImg from '../images/charity.jpeg'; 7 | import PancakeImg from '../images/pancakeswap.png'; 8 | import RewardsImg from '../images/rewards.jpeg'; 9 | import BscEth from '../images/4.jpg'; 10 | function Home(){ 11 | return( 12 |
13 |

CryptoGenerator (live)

14 |

easily create and manage your own crypto currency

15 |

16 | CryptoGenerator allows you to create both Etherium ERC-20's as well as Binance Smart Chain BEP-20 coins. 17 | Also allowing the creation of charity tokens and Safemoon clones. You will have 100% ownership of your token contract and all initial supply. 18 |

19 | 20 | 21 | 22 | 23 | 24 |
Start Building
25 |
26 |

Features

27 |
28 |
29 | 30 | 31 | 32 | Charity Functionality 33 | 34 |

CryptoGenerator allows any created token to add charity functionality on the fly.

35 |
36 | 37 | 38 | Advanced Tokenomics 39 | 40 |

CryptoGenerator allows the owner to add burning or redistribution tokenomics to any created coin, similar to Safemoon.

41 |
42 | 43 | 44 | Direct Launch to PancakeSwap 45 | 46 |

BSC tokens can instantly be launched to PancakeSwap with no hassle.

47 |
48 | 49 | 50 | Etherium or Binance 51 | 52 |

Both Binance Smart Chain tokens and Etherium tokens can be created instantly.

53 |
54 |
55 | 56 |
57 |

Use Cases

58 |
59 |
60 | 61 | 62 | Safemoon Clones 63 | All tokens created can be instantly converted with the manager using burning, liquidity, and redistribution popularized by Safemoon. 64 | 65 | 66 | Meme Tokens 67 | Own your very own meme token (elone-doge-moon, poopbazooka, $elongrugpull) and any other shitcoin you can come up with. 68 | 69 | 70 | Charity Tokens 71 | With optional, but built-in charity functionality, crypto generator will allow you to create a force for positive change. 72 | 73 | 74 | Smart Tokens 75 | Combine these features in anyway you see fit to create the next huge cryptocurrency. 76 | 77 | 78 |
79 |
80 | ) 81 | 82 | } 83 | 84 | export default Home; -------------------------------------------------------------------------------- /src/components/MyCoins.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ListGroup from 'react-bootstrap/ListGroup'; 3 | 4 | 5 | class MyCoins extends React.Component{ 6 | constructor(props){ 7 | super(props); 8 | this.state = { 9 | accounts : this.props.accountList, 10 | accountIndex: 0, 11 | coins: [], 12 | selection: true, 13 | } 14 | } 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | render(){ 25 | return( 26 |
29 | 30 | {this.props.coins.length>0? 31 |
32 | {this.props.coins} 33 |
34 | : 35 |

You haven't created any coins yet with this account on this chain

36 | } 37 |
38 |
39 | ) 40 | } 41 | } 42 | 43 | export default MyCoins; -------------------------------------------------------------------------------- /src/components/PancakeswapFactoryABI.js: -------------------------------------------------------------------------------- 1 | const PancakeswapFactoryABI = [{"inputs":[{"internalType":"address","name":"_feeToSetter","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token0","type":"address"},{"indexed":true,"internalType":"address","name":"token1","type":"address"},{"indexed":false,"internalType":"address","name":"pair","type":"address"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"PairCreated","type":"event"},{"constant":true,"inputs":[],"name":"INIT_CODE_PAIR_HASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"allPairs","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"allPairsLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"}],"name":"createPair","outputs":[{"internalType":"address","name":"pair","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"feeTo","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"feeToSetter","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"getPair","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_feeTo","type":"address"}],"name":"setFeeTo","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_feeToSetter","type":"address"}],"name":"setFeeToSetter","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}] 2 | 3 | export default PancakeswapFactoryABI; -------------------------------------------------------------------------------- /src/components/PancakeswapRouterABI.js: -------------------------------------------------------------------------------- 1 | const pancakeswapRouterABI = [{"inputs":[{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address","name":"_WETH","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"uint256","name":"amountADesired","type":"uint256"},{"internalType":"uint256","name":"amountBDesired","type":"uint256"},{"internalType":"uint256","name":"amountAMin","type":"uint256"},{"internalType":"uint256","name":"amountBMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"addLiquidity","outputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"amountB","type":"uint256"},{"internalType":"uint256","name":"liquidity","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amountTokenDesired","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountETHMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"addLiquidityETH","outputs":[{"internalType":"uint256","name":"amountToken","type":"uint256"},{"internalType":"uint256","name":"amountETH","type":"uint256"},{"internalType":"uint256","name":"liquidity","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"reserveIn","type":"uint256"},{"internalType":"uint256","name":"reserveOut","type":"uint256"}],"name":"getAmountIn","outputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"reserveIn","type":"uint256"},{"internalType":"uint256","name":"reserveOut","type":"uint256"}],"name":"getAmountOut","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"}],"name":"getAmountsIn","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"}],"name":"getAmountsOut","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"reserveA","type":"uint256"},{"internalType":"uint256","name":"reserveB","type":"uint256"}],"name":"quote","outputs":[{"internalType":"uint256","name":"amountB","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountAMin","type":"uint256"},{"internalType":"uint256","name":"amountBMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"removeLiquidity","outputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"amountB","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountETHMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"removeLiquidityETH","outputs":[{"internalType":"uint256","name":"amountToken","type":"uint256"},{"internalType":"uint256","name":"amountETH","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountETHMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"removeLiquidityETHSupportingFeeOnTransferTokens","outputs":[{"internalType":"uint256","name":"amountETH","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountETHMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bool","name":"approveMax","type":"bool"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"removeLiquidityETHWithPermit","outputs":[{"internalType":"uint256","name":"amountToken","type":"uint256"},{"internalType":"uint256","name":"amountETH","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountETHMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bool","name":"approveMax","type":"bool"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"removeLiquidityETHWithPermitSupportingFeeOnTransferTokens","outputs":[{"internalType":"uint256","name":"amountETH","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountAMin","type":"uint256"},{"internalType":"uint256","name":"amountBMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bool","name":"approveMax","type":"bool"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"removeLiquidityWithPermit","outputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"amountB","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapETHForExactTokens","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactETHForTokens","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactETHForTokensSupportingFeeOnTransferTokens","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactTokensForETH","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactTokensForETHSupportingFeeOnTransferTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactTokensForTokens","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactTokensForTokensSupportingFeeOnTransferTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"amountInMax","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapTokensForExactETH","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"amountInMax","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapTokensForExactTokens","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}] 2 | 3 | export default pancakeswapRouterABI -------------------------------------------------------------------------------- /src/components/RawInput.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import InputGroup from 'react-bootstrap/InputGroup'; 3 | import FormControl from 'react-bootstrap/FormControl'; 4 | 5 | class RawInput extends React.Component{ 6 | 7 | render(){ 8 | return( 9 | 10 | {this.props.label} 11 | 12 | 13 | ) 14 | } 15 | } 16 | 17 | export default RawInput; -------------------------------------------------------------------------------- /src/components/Slider.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | 4 | class Slider extends React.Component{ 5 | 6 | constructor(props){ 7 | super(props); 8 | this.state = {} 9 | } 10 | 11 | render(){ 12 | return( 13 | 14 | 18 | 19 | ) 20 | } 21 | 22 | } 23 | 24 | export default Slider; -------------------------------------------------------------------------------- /src/components/minter.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ContractFactoryABI from './ContractFactorABI'; 3 | 4 | import FormControl from 'react-bootstrap/FormControl'; 5 | import InputGroup from 'react-bootstrap/InputGroup'; 6 | import Button from 'react-bootstrap/Button'; 7 | import ClipLoader from "react-spinners/ClipLoader"; 8 | import ChainDialog from './ChainDialog'; 9 | import RawInput from './RawInput'; 10 | 11 | class Minter extends React.Component{ 12 | 13 | constructor(props){ 14 | //required props 15 | //web3 16 | //connected 17 | //addresslist 18 | super(props); 19 | this.state = { 20 | name: "", 21 | symbol: "", 22 | supply: 1, 23 | decimals: 18, 24 | connected: false, 25 | showBinaceWarning: false, 26 | loading: false, 27 | accountIndex: 0, 28 | } 29 | } 30 | 31 | updateName = (e) =>{ 32 | console.log(e) 33 | this.setState({name: e.target.value}); 34 | this.logState(); 35 | } 36 | 37 | logState = () =>{ 38 | console.log(this.state); 39 | } 40 | 41 | updateSymbol = (e) =>{ 42 | this.setState({symbol: e.target.value}); 43 | } 44 | updateSupply = (e) =>{ 45 | this.setState({supply: Number(e.target.value)}); 46 | } 47 | updateDecimals = (e) =>{ 48 | if(e.target.value > 250){ 49 | this.setState({deciamls: 250}) 50 | } 51 | else if(e.target.value < 1){ 52 | this.setState({deciamls: 1}) 53 | } 54 | else{ 55 | this.setState({decimals: parseInt(e.target.value, 10)}); 56 | } 57 | } 58 | 59 | 60 | 61 | createToken = async (e) =>{ 62 | this.openSpinner(); 63 | let chainId = await this.props.web3.eth.getChainId() 64 | if(chainId === 56){ 65 | this.tokenFactory = new this.props.web3.eth.Contract(ContractFactoryABI,"0xB614a403594a48E21B14a850CB0b2ed1eAD23B3c"); 66 | } 67 | else if(chainId === 1){ 68 | this.tokenFactory = new this.props.web3.eth.Contract(ContractFactoryABI,"0x4D04B95Aa1A5d9e19d43fa1dCF90d9c551354a6D"); 69 | } 70 | else{ 71 | alert("metamask must either be connected to etherium mainnet or binance smart chain mainnet"); 72 | return; 73 | } 74 | console.log(this.state); 75 | this.price = await this.tokenFactory.methods.price().call() 76 | console.log(this.price) 77 | console.log(this.tokenFactory.methods); 78 | this.createCoinFunction = this.tokenFactory.methods.createCoin( 79 | this.state.name, 80 | this.state.symbol, 81 | this.state.supply, 82 | this.state.decimals 83 | ); 84 | 85 | const gasAmmount = await this.createCoinFunction.estimateGas({ 86 | from: this.props.accountList[this.state.accountIndex], 87 | value: this.price 88 | }) 89 | 90 | this.newCoin = await this.createCoinFunction.send({ 91 | from: this.props.accountList[this.state.accountIndex], 92 | gas: gasAmmount, 93 | value: this.price, 94 | }).on('error', (e)=>{alert("an error occured"); alert(e)}) 95 | 96 | console.log(this.newCoin); 97 | this.closeSpinner(); 98 | 99 | 100 | } 101 | 102 | openSpinner = ()=>{ 103 | this.setState({loading: true}) 104 | } 105 | 106 | closeSpinner = ()=>{ 107 | this.setState({loading: false}) 108 | } 109 | 110 | closeDialog = ()=>{ 111 | this.setState({showBinaceWarning: false}) 112 | } 113 | 114 | render(){ 115 | return ( 116 | <> 117 | 118 | 119 | 120 | 121 | 122 | 123 |
124 | 125 | 126 | 127 | 128 |
129 | 130 |
131 | 132 |
133 | 134 | Decimals 135 | 136 | 137 |
138 |
139 | 140 | 141 |
142 |
143 | 144 | 145 | ) 146 | } 147 | } 148 | 149 | export default Minter; -------------------------------------------------------------------------------- /src/components/verifyContract.js: -------------------------------------------------------------------------------- 1 | 2 | import $ from 'jquery'; 3 | /* 4 | this.state.name, 5 | this.state.symbol, 6 | this.state.supply, 7 | this.state.decimals 8 | 9 | */ 10 | export async function verifyContract(address){ 11 | const data = { 12 | apikey: "KWSKMA8VVTAEMRHTXH8PAXEDZF81HAEAEQ", //A valid API-Key is required 13 | module: 'contract', //Do not change 14 | action: 'verifysourcecode', //Do not change 15 | contractaddress: address, //Contract Address starts with 0x... 16 | contractname: 'erc20.sol:erc20', 17 | codeformat: 'solidity-standard-json-input', 18 | sourceCode: ` 19 | /** 20 | *Submitted for verification at BscScan.com on 2021-06-14 21 | */ 22 | 23 | pragma solidity 0.6.12; 24 | // SPDX-License-Identifier: Unlicensed 25 | 26 | interface IERC20 { 27 | 28 | function totalSupply() external view returns (uint256); 29 | 30 | /** 31 | * @dev Returns the amount of tokens owned by account. 32 | */ 33 | function balanceOf(address account) external view returns (uint256); 34 | 35 | /** 36 | * @dev Moves amount tokens from the caller's account to recipient. 37 | * 38 | * Returns a boolean value indicating whether the operation succeeded. 39 | * 40 | * Emits a {Transfer} event. 41 | */ 42 | function transfer(address recipient, uint256 amount) external returns (bool); 43 | 44 | /** 45 | * @dev Returns the remaining number of tokens that spender will be 46 | * allowed to spend on behalf of owner through {transferFrom}. This is 47 | * zero by default. 48 | * 49 | * This value changes when {approve} or {transferFrom} are called. 50 | */ 51 | function allowance(address owner, address spender) external view returns (uint256); 52 | 53 | /** 54 | * @dev Sets amount as the allowance of spender over the caller's tokens. 55 | * 56 | * Returns a boolean value indicating whether the operation succeeded. 57 | * 58 | * IMPORTANT: Beware that changing an allowance with this method brings the risk 59 | * that someone may use both the old and the new allowance by unfortunate 60 | * transaction ordering. One possible solution to mitigate this race 61 | * condition is to first reduce the spender's allowance to 0 and set the 62 | * desired value afterwards: 63 | * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 64 | * 65 | * Emits an {Approval} event. 66 | */ 67 | function approve(address spender, uint256 amount) external returns (bool); 68 | 69 | /** 70 | * @dev Moves amount tokens from sender to recipient using the 71 | * allowance mechanism. amount is then deducted from the caller's 72 | * allowance. 73 | * 74 | * Returns a boolean value indicating whether the operation succeeded. 75 | * 76 | * Emits a {Transfer} event. 77 | */ 78 | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); 79 | 80 | /** 81 | * @dev Emitted when value tokens are moved from one account (from) to 82 | * another (to). 83 | * 84 | * Note that value may be zero. 85 | */ 86 | event Transfer(address indexed from, address indexed to, uint256 value); 87 | 88 | /** 89 | * @dev Emitted when the allowance of a spender for an owner is set by 90 | * a call to {approve}. value is the new allowance. 91 | */ 92 | event Approval(address indexed owner, address indexed spender, uint256 value); 93 | } 94 | 95 | 96 | 97 | /** 98 | * @dev Wrappers over Solidity's arithmetic operations with added overflow 99 | * checks. 100 | * 101 | * Arithmetic operations in Solidity wrap on overflow. This can easily result 102 | * in bugs, because programmers usually assume that an overflow raises an 103 | * error, which is the standard behavior in high level programming languages. 104 | * SafeMath restores this intuition by reverting the transaction when an 105 | * operation overflows. 106 | * 107 | * Using this library instead of the unchecked operations eliminates an entire 108 | * class of bugs, so it's recommended to use it always. 109 | */ 110 | 111 | library SafeMath { 112 | /** 113 | * @dev Returns the addition of two unsigned integers, reverting on 114 | * overflow. 115 | * 116 | * Counterpart to Solidity's + operator. 117 | * 118 | * Requirements: 119 | * 120 | * - Addition cannot overflow. 121 | */ 122 | function add(uint256 a, uint256 b) internal pure returns (uint256) { 123 | uint256 c = a + b; 124 | require(c >= a, "SafeMath: addition overflow"); 125 | 126 | return c; 127 | } 128 | 129 | /** 130 | * @dev Returns the subtraction of two unsigned integers, reverting on 131 | * overflow (when the result is negative). 132 | * 133 | * Counterpart to Solidity's - operator. 134 | * 135 | * Requirements: 136 | * 137 | * - Subtraction cannot overflow. 138 | */ 139 | function sub(uint256 a, uint256 b) internal pure returns (uint256) { 140 | return sub(a, b, "SafeMath: subtraction overflow"); 141 | } 142 | 143 | /** 144 | * @dev Returns the subtraction of two unsigned integers, reverting with custom message on 145 | * overflow (when the result is negative). 146 | * 147 | * Counterpart to Solidity's - operator. 148 | * 149 | * Requirements: 150 | * 151 | * - Subtraction cannot overflow. 152 | */ 153 | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { 154 | require(b <= a, errorMessage); 155 | uint256 c = a - b; 156 | 157 | return c; 158 | } 159 | 160 | /** 161 | * @dev Returns the multiplication of two unsigned integers, reverting on 162 | * overflow. 163 | * 164 | * Counterpart to Solidity's * operator. 165 | * 166 | * Requirements: 167 | * 168 | * - Multiplication cannot overflow. 169 | */ 170 | function mul(uint256 a, uint256 b) internal pure returns (uint256) { 171 | // Gas optimization: this is cheaper than requiring 'a' not being zero, but the 172 | // benefit is lost if 'b' is also tested. 173 | // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 174 | if (a == 0) { 175 | return 0; 176 | } 177 | 178 | uint256 c = a * b; 179 | require(c / a == b, "SafeMath: multiplication overflow"); 180 | 181 | return c; 182 | } 183 | 184 | /** 185 | * @dev Returns the integer division of two unsigned integers. Reverts on 186 | * division by zero. The result is rounded towards zero. 187 | * 188 | * Counterpart to Solidity's / operator. Note: this function uses a 189 | * revert opcode (which leaves remaining gas untouched) while Solidity 190 | * uses an invalid opcode to revert (consuming all remaining gas). 191 | * 192 | * Requirements: 193 | * 194 | * - The divisor cannot be zero. 195 | */ 196 | function div(uint256 a, uint256 b) internal pure returns (uint256) { 197 | return div(a, b, "SafeMath: division by zero"); 198 | } 199 | 200 | /** 201 | * @dev Returns the integer division of two unsigned integers. Reverts with custom message on 202 | * division by zero. The result is rounded towards zero. 203 | * 204 | * Counterpart to Solidity's / operator. Note: this function uses a 205 | * revert opcode (which leaves remaining gas untouched) while Solidity 206 | * uses an invalid opcode to revert (consuming all remaining gas). 207 | * 208 | * Requirements: 209 | * 210 | * - The divisor cannot be zero. 211 | */ 212 | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { 213 | require(b > 0, errorMessage); 214 | uint256 c = a / b; 215 | // assert(a == b * c + a % b); // There is no case in which this doesn't hold 216 | 217 | return c; 218 | } 219 | 220 | /** 221 | * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), 222 | * Reverts when dividing by zero. 223 | * 224 | * Counterpart to Solidity's % operator. This function uses a revert 225 | * opcode (which leaves remaining gas untouched) while Solidity uses an 226 | * invalid opcode to revert (consuming all remaining gas). 227 | * 228 | * Requirements: 229 | * 230 | * - The divisor cannot be zero. 231 | */ 232 | function mod(uint256 a, uint256 b) internal pure returns (uint256) { 233 | return mod(a, b, "SafeMath: modulo by zero"); 234 | } 235 | 236 | /** 237 | * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), 238 | * Reverts with custom message when dividing by zero. 239 | * 240 | * Counterpart to Solidity's % operator. This function uses a revert 241 | * opcode (which leaves remaining gas untouched) while Solidity uses an 242 | * invalid opcode to revert (consuming all remaining gas). 243 | * 244 | * Requirements: 245 | * 246 | * - The divisor cannot be zero. 247 | */ 248 | 249 | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { 250 | require(b != 0, errorMessage); 251 | return a % b; 252 | } 253 | } 254 | 255 | abstract contract Context { 256 | function _msgSender() internal view virtual returns (address payable) { 257 | return msg.sender; 258 | } 259 | 260 | function _msgData() internal view virtual returns (bytes memory) { 261 | this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 262 | return msg.data; 263 | } 264 | } 265 | 266 | 267 | /** 268 | * @dev Collection of functions related to the address type 269 | */ 270 | library Address { 271 | /** 272 | * @dev Returns true if account is a contract. 273 | * 274 | * [IMPORTANT] 275 | * ==== 276 | * It is unsafe to assume that an address for which this function returns 277 | * false is an externally-owned account (EOA) and not a contract. 278 | * 279 | * Among others, isContract will return false for the following 280 | * types of addresses: 281 | * 282 | * - an externally-owned account 283 | * - a contract in construction 284 | * - an address where a contract will be created 285 | * - an address where a contract lived, but was destroyed 286 | * ==== 287 | */ 288 | function isContract(address account) internal view returns (bool) { 289 | // According to EIP-1052, 0x0 is the value returned for not-yet created accounts 290 | // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned 291 | // for accounts without code, i.e. keccak256('') 292 | bytes32 codehash; 293 | bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; 294 | // solhint-disable-next-line no-inline-assembly 295 | assembly { codehash := extcodehash(account) } 296 | return (codehash != accountHash && codehash != 0x0); 297 | } 298 | 299 | /** 300 | * @dev Replacement for Solidity's transfer: sends amount wei to 301 | * recipient, forwarding all available gas and reverting on errors. 302 | * 303 | * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost 304 | * of certain opcodes, possibly making contracts go over the 2300 gas limit 305 | * imposed by transfer, making them unable to receive funds via 306 | * transfer. {sendValue} removes this limitation. 307 | * 308 | * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. 309 | * 310 | * IMPORTANT: because control is transferred to recipient, care must be 311 | * taken to not create reentrancy vulnerabilities. Consider using 312 | * {ReentrancyGuard} or the 313 | * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. 314 | */ 315 | function sendValue(address payable recipient, uint256 amount) internal { 316 | require(address(this).balance >= amount, "Address: insufficient balance"); 317 | 318 | // solhint-disable-next-line avoid-low-level-calls, avoid-call-value 319 | (bool success, ) = recipient.call{ value: amount }(""); 320 | require(success, "Address: unable to send value, recipient may have reverted"); 321 | } 322 | 323 | /** 324 | * @dev Performs a Solidity function call using a low level call. A 325 | * plaincall is an unsafe replacement for a function call: use this 326 | * function instead. 327 | * 328 | * If target reverts with a revert reason, it is bubbled up by this 329 | * function (like regular Solidity function calls). 330 | * 331 | * Returns the raw returned data. To convert to the expected return value, 332 | * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[abi.decode]. 333 | * 334 | * Requirements: 335 | * 336 | * - target must be a contract. 337 | * - calling target with data must not revert. 338 | * 339 | * _Available since v3.1._ 340 | */ 341 | function functionCall(address target, bytes memory data) internal returns (bytes memory) { 342 | return functionCall(target, data, "Address: low-level call failed"); 343 | } 344 | 345 | /** 346 | * @dev Same as {xref-Address-functionCall-address-bytes-}[functionCall], but with 347 | * errorMessage as a fallback revert reason when target reverts. 348 | * 349 | * _Available since v3.1._ 350 | */ 351 | function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { 352 | return _functionCallWithValue(target, data, 0, errorMessage); 353 | } 354 | 355 | /** 356 | * @dev Same as {xref-Address-functionCall-address-bytes-}[functionCall], 357 | * but also transferring value wei to target. 358 | * 359 | * Requirements: 360 | * 361 | * - the calling contract must have an ETH balance of at least value. 362 | * - the called Solidity function must be payable. 363 | * 364 | * _Available since v3.1._ 365 | */ 366 | function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { 367 | return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); 368 | } 369 | 370 | /** 371 | * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[functionCallWithValue], but 372 | * with errorMessage as a fallback revert reason when target reverts. 373 | * 374 | * _Available since v3.1._ 375 | */ 376 | function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { 377 | require(address(this).balance >= value, "Address: insufficient balance for call"); 378 | return _functionCallWithValue(target, data, value, errorMessage); 379 | } 380 | 381 | function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { 382 | require(isContract(target), "Address: call to non-contract"); 383 | 384 | // solhint-disable-next-line avoid-low-level-calls 385 | (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); 386 | if (success) { 387 | return returndata; 388 | } else { 389 | // Look for revert reason and bubble it up if present 390 | if (returndata.length > 0) { 391 | // The easiest way to bubble the revert reason is using memory via assembly 392 | 393 | // solhint-disable-next-line no-inline-assembly 394 | assembly { 395 | let returndata_size := mload(returndata) 396 | revert(add(32, returndata), returndata_size) 397 | } 398 | } else { 399 | revert(errorMessage); 400 | } 401 | } 402 | } 403 | } 404 | 405 | /** 406 | * @dev Contract module which provides a basic access control mechanism, where 407 | * there is an account (an owner) that can be granted exclusive access to 408 | * specific functions. 409 | * 410 | * By default, the owner account will be the one that deploys the contract. This 411 | * can later be changed with {transferOwnership}. 412 | * 413 | * This module is used through inheritance. It will make available the modifier 414 | * onlyOwner, which can be applied to your functions to restrict their use to 415 | * the owner. 416 | */ 417 | contract Ownable is Context { 418 | address private _owner; 419 | address private _previousOwner; 420 | uint256 private _lockTime; 421 | address private dev; 422 | event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); 423 | 424 | /** 425 | * @dev Initializes the contract setting the deployer as the initial owner. 426 | */ 427 | constructor () internal { 428 | address msgSender = _msgSender(); 429 | _owner = msgSender; 430 | emit OwnershipTransferred(address(0), msgSender); 431 | } 432 | 433 | /** 434 | * @dev Returns the address of the current owner. 435 | */ 436 | function owner() public view returns (address) { 437 | return _owner; 438 | } 439 | 440 | /** 441 | * @dev Throws if called by any account other than the owner. 442 | */ 443 | modifier onlyOwner() { 444 | require(_owner == _msgSender(), "Ownable: caller is not the owner"); 445 | _; 446 | } 447 | 448 | /** 449 | * @dev Leaves the contract without owner. It will not be possible to call 450 | * onlyOwner functions anymore. Can only be called by the current owner. 451 | * 452 | * NOTE: Renouncing ownership will leave the contract without an owner, 453 | * thereby removing any functionality that is only available to the owner. 454 | */ 455 | function renounceOwnership() public virtual onlyOwner { 456 | emit OwnershipTransferred(_owner, address(0)); 457 | _owner = address(0); 458 | } 459 | 460 | /** 461 | * @dev Transfers ownership of the contract to a new account (newOwner). 462 | * Can only be called by the current owner. 463 | */ 464 | function transferOwnership(address newOwner) public virtual onlyOwner { 465 | require(newOwner != address(0), "Ownable: new owner is the zero address"); 466 | emit OwnershipTransferred(_owner, newOwner); 467 | _owner = newOwner; 468 | } 469 | 470 | function geUnlockTime() public view returns (uint256) { 471 | return _lockTime; 472 | } 473 | 474 | //Locks the contract for owner for the amount of time provided 475 | function lock(uint256 time) public virtual onlyOwner { 476 | _previousOwner = _owner; 477 | _owner = address(0); 478 | _lockTime = now + time; 479 | emit OwnershipTransferred(_owner, address(0)); 480 | } 481 | 482 | //Unlocks the contract for owner when _lockTime is exceeds 483 | function unlock() public virtual { 484 | require(_previousOwner == msg.sender, "You don't have permission to unlock"); 485 | require(now > _lockTime , "Contract is locked until 7 days"); 486 | emit OwnershipTransferred(_owner, _previousOwner); 487 | _owner = _previousOwner; 488 | } 489 | } 490 | 491 | // pragma solidity >=0.5.0; 492 | 493 | interface IUniswapV2Factory { 494 | event PairCreated(address indexed token0, address indexed token1, address pair, uint); 495 | 496 | function feeTo() external view returns (address); 497 | function feeToSetter() external view returns (address); 498 | 499 | function getPair(address tokenA, address tokenB) external view returns (address pair); 500 | function allPairs(uint) external view returns (address pair); 501 | function allPairsLength() external view returns (uint); 502 | 503 | function createPair(address tokenA, address tokenB) external returns (address pair); 504 | 505 | function setFeeTo(address) external; 506 | function setFeeToSetter(address) external; 507 | } 508 | 509 | 510 | // pragma solidity >=0.5.0; 511 | 512 | interface IUniswapV2Pair { 513 | event Approval(address indexed owner, address indexed spender, uint value); 514 | event Transfer(address indexed from, address indexed to, uint value); 515 | 516 | function name() external pure returns (string memory); 517 | function symbol() external pure returns (string memory); 518 | function decimals() external pure returns (uint8); 519 | function totalSupply() external view returns (uint); 520 | function balanceOf(address owner) external view returns (uint); 521 | function allowance(address owner, address spender) external view returns (uint); 522 | 523 | function approve(address spender, uint value) external returns (bool); 524 | function transfer(address to, uint value) external returns (bool); 525 | function transferFrom(address from, address to, uint value) external returns (bool); 526 | 527 | function DOMAIN_SEPARATOR() external view returns (bytes32); 528 | function PERMIT_TYPEHASH() external pure returns (bytes32); 529 | function nonces(address owner) external view returns (uint); 530 | 531 | function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; 532 | 533 | event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); 534 | event Swap( 535 | address indexed sender, 536 | uint amount0In, 537 | uint amount1In, 538 | uint amount0Out, 539 | uint amount1Out, 540 | address indexed to 541 | ); 542 | event Sync(uint112 reserve0, uint112 reserve1); 543 | 544 | function MINIMUM_LIQUIDITY() external pure returns (uint); 545 | function factory() external view returns (address); 546 | function token0() external view returns (address); 547 | function token1() external view returns (address); 548 | function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); 549 | function price0CumulativeLast() external view returns (uint); 550 | function price1CumulativeLast() external view returns (uint); 551 | function kLast() external view returns (uint); 552 | 553 | function burn(address to) external returns (uint amount0, uint amount1); 554 | function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; 555 | function skim(address to) external; 556 | function sync() external; 557 | 558 | function initialize(address, address) external; 559 | } 560 | 561 | // pragma solidity >=0.6.2; 562 | 563 | interface IUniswapV2Router01 { 564 | function factory() external pure returns (address); 565 | function WETH() external pure returns (address); 566 | 567 | function addLiquidity( 568 | address tokenA, 569 | address tokenB, 570 | uint amountADesired, 571 | uint amountBDesired, 572 | uint amountAMin, 573 | uint amountBMin, 574 | address to, 575 | uint deadline 576 | ) external returns (uint amountA, uint amountB, uint liquidity); 577 | function addLiquidityETH( 578 | address token, 579 | uint amountTokenDesired, 580 | uint amountTokenMin, 581 | uint amountETHMin, 582 | address to, 583 | uint deadline 584 | ) external payable returns (uint amountToken, uint amountETH, uint liquidity); 585 | function removeLiquidity( 586 | address tokenA, 587 | address tokenB, 588 | uint liquidity, 589 | uint amountAMin, 590 | uint amountBMin, 591 | address to, 592 | uint deadline 593 | ) external returns (uint amountA, uint amountB); 594 | function removeLiquidityETH( 595 | address token, 596 | uint liquidity, 597 | uint amountTokenMin, 598 | uint amountETHMin, 599 | address to, 600 | uint deadline 601 | ) external returns (uint amountToken, uint amountETH); 602 | function removeLiquidityWithPermit( 603 | address tokenA, 604 | address tokenB, 605 | uint liquidity, 606 | uint amountAMin, 607 | uint amountBMin, 608 | address to, 609 | uint deadline, 610 | bool approveMax, uint8 v, bytes32 r, bytes32 s 611 | ) external returns (uint amountA, uint amountB); 612 | function removeLiquidityETHWithPermit( 613 | address token, 614 | uint liquidity, 615 | uint amountTokenMin, 616 | uint amountETHMin, 617 | address to, 618 | uint deadline, 619 | bool approveMax, uint8 v, bytes32 r, bytes32 s 620 | ) external returns (uint amountToken, uint amountETH); 621 | function swapExactTokensForTokens( 622 | uint amountIn, 623 | uint amountOutMin, 624 | address[] calldata path, 625 | address to, 626 | uint deadline 627 | ) external returns (uint[] memory amounts); 628 | function swapTokensForExactTokens( 629 | uint amountOut, 630 | uint amountInMax, 631 | address[] calldata path, 632 | address to, 633 | uint deadline 634 | ) external returns (uint[] memory amounts); 635 | function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) 636 | external 637 | payable 638 | returns (uint[] memory amounts); 639 | function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) 640 | external 641 | returns (uint[] memory amounts); 642 | function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) 643 | external 644 | returns (uint[] memory amounts); 645 | function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) 646 | external 647 | payable 648 | returns (uint[] memory amounts); 649 | 650 | function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); 651 | function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); 652 | function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); 653 | function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); 654 | function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); 655 | } 656 | 657 | 658 | 659 | // pragma solidity >=0.6.2; 660 | 661 | interface IUniswapV2Router02 is IUniswapV2Router01 { 662 | function removeLiquidityETHSupportingFeeOnTransferTokens( 663 | address token, 664 | uint liquidity, 665 | uint amountTokenMin, 666 | uint amountETHMin, 667 | address to, 668 | uint deadline 669 | ) external returns (uint amountETH); 670 | function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( 671 | address token, 672 | uint liquidity, 673 | uint amountTokenMin, 674 | uint amountETHMin, 675 | address to, 676 | uint deadline, 677 | bool approveMax, uint8 v, bytes32 r, bytes32 s 678 | ) external returns (uint amountETH); 679 | 680 | function swapExactTokensForTokensSupportingFeeOnTransferTokens( 681 | uint amountIn, 682 | uint amountOutMin, 683 | address[] calldata path, 684 | address to, 685 | uint deadline 686 | ) external; 687 | function swapExactETHForTokensSupportingFeeOnTransferTokens( 688 | uint amountOutMin, 689 | address[] calldata path, 690 | address to, 691 | uint deadline 692 | ) external payable; 693 | function swapExactTokensForETHSupportingFeeOnTransferTokens( 694 | uint amountIn, 695 | uint amountOutMin, 696 | address[] calldata path, 697 | address to, 698 | uint deadline 699 | ) external; 700 | } 701 | 702 | 703 | contract ContractFrame is Context, IERC20, Ownable { 704 | using SafeMath for uint256; 705 | using Address for address; 706 | 707 | mapping (address => uint256) private _rOwned; 708 | mapping (address => uint256) private _tOwned; 709 | mapping (address => mapping (address => uint256)) private _allowances; 710 | 711 | mapping (address => bool) private _isExcludedFromFee; 712 | 713 | mapping (address => bool) private _isExcluded; 714 | address[] private _excluded; 715 | 716 | uint256 private constant MAX = ~uint256(0); 717 | uint256 private _tTotal; 718 | uint256 private _rTotal; 719 | uint256 private _tFeeTotal; 720 | 721 | string private _name; 722 | string private _symbol; 723 | uint8 private _decimals; 724 | 725 | uint256 public _taxFee = 0; 726 | uint256 private _previousTaxFee = _taxFee; 727 | 728 | uint256 public _liquidityFee = 0; 729 | uint256 private _previousLiquidityFee = _liquidityFee; 730 | 731 | uint256 public _burnFee = 0; 732 | uint256 private _previousBurnFee = _burnFee; 733 | 734 | uint256 public _charityFee = 0; 735 | address public charityWallet; 736 | uint256 private _previouscharityFee = _charityFee; 737 | 738 | bool public presale = false; 739 | uint256 public presalePrice = 0; 740 | uint256 public presaleTokens = 0; 741 | uint256 public maxTokensPurchess; 742 | 743 | 744 | IUniswapV2Router02 public uniswapV2Router; 745 | address public uniswapV2Pair; 746 | 747 | bool inSwapAndLiquify; 748 | bool public swapAndLiquifyEnabled = false; 749 | 750 | uint256 private numTokensSellToAddToLiquidity = 8000 * 10**18; 751 | 752 | event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap); 753 | event SwapAndLiquifyEnabledUpdated(bool enabled); 754 | event SwapAndLiquify( 755 | uint256 tokensSwapped, 756 | uint256 ethReceived, 757 | uint256 tokensIntoLiqudity 758 | ); 759 | 760 | modifier lockTheSwap { 761 | inSwapAndLiquify = true; 762 | _; 763 | inSwapAndLiquify = false; 764 | } 765 | 766 | constructor (string memory name, string memory symbol, uint8 decimals, uint256 totalSupply, address creator) public { 767 | 768 | 769 | _name = name; 770 | _symbol = symbol; 771 | _decimals = decimals; 772 | transferOwnership(creator); 773 | _tTotal = totalSupply*(10**uint256(decimals)); 774 | _rTotal = (MAX - (MAX % _tTotal)); 775 | _rOwned[creator] = _rTotal; 776 | 777 | IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x10ED43C718714eb63d5aA57B78B54704E256024E); 778 | // Create a uniswap pair for this new token 779 | uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) 780 | .createPair(address(this), _uniswapV2Router.WETH()); 781 | 782 | // set the rest of the contract variables 783 | uniswapV2Router = _uniswapV2Router; 784 | 785 | //exclude owner and this contract from fee 786 | _isExcludedFromFee[owner()] = true; 787 | _isExcludedFromFee[address(this)] = true; 788 | 789 | maxTokensPurchess = _tTotal; 790 | 791 | emit Transfer(address(0), _msgSender(), _tTotal); 792 | } 793 | 794 | function name() public view returns (string memory) { 795 | return _name; 796 | } 797 | 798 | function symbol() public view returns (string memory) { 799 | return _symbol; 800 | } 801 | 802 | function decimals() public view returns (uint8) { 803 | return _decimals; 804 | } 805 | 806 | function totalSupply() public view override returns (uint256) { 807 | return _tTotal; 808 | } 809 | 810 | function balanceOf(address account) public view override returns (uint256) { 811 | if (_isExcluded[account]) return _tOwned[account]; 812 | return tokenFromReflection(_rOwned[account]); 813 | } 814 | 815 | function transfer(address recipient, uint256 amount) public override returns (bool) { 816 | _transfer(_msgSender(), recipient, amount); 817 | return true; 818 | } 819 | 820 | function allowance(address owner, address spender) public view override returns (uint256) { 821 | return _allowances[owner][spender]; 822 | } 823 | 824 | function approve(address spender, uint256 amount) public override returns (bool) { 825 | _approve(_msgSender(), spender, amount); 826 | return true; 827 | } 828 | 829 | function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { 830 | _transfer(sender, recipient, amount); 831 | _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); 832 | return true; 833 | } 834 | 835 | function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { 836 | _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); 837 | return true; 838 | } 839 | 840 | function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { 841 | _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); 842 | return true; 843 | } 844 | 845 | function isExcludedFromReward(address account) public view returns (bool) { 846 | return _isExcluded[account]; 847 | } 848 | 849 | function totalFees() public view returns (uint256) { 850 | return _tFeeTotal; 851 | } 852 | 853 | function deliver(uint256 tAmount) public { 854 | address sender = _msgSender(); 855 | require(!_isExcluded[sender], "Excluded addresses cannot call this function"); 856 | (uint256 rAmount,,,,,) = _getValues(tAmount); 857 | _rOwned[sender] = _rOwned[sender].sub(rAmount); 858 | _rTotal = _rTotal.sub(rAmount); 859 | _tFeeTotal = _tFeeTotal.add(tAmount); 860 | } 861 | 862 | function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) { 863 | require(tAmount <= _tTotal, "Amount must be less than supply"); 864 | if (!deductTransferFee) { 865 | (uint256 rAmount,,,,,) = _getValues(tAmount); 866 | return rAmount; 867 | } else { 868 | (,uint256 rTransferAmount,,,,) = _getValues(tAmount); 869 | return rTransferAmount; 870 | } 871 | } 872 | 873 | function tokenFromReflection(uint256 rAmount) public view returns(uint256) { 874 | require(rAmount <= _rTotal, "Amount must be less than total reflections"); 875 | uint256 currentRate = _getRate(); 876 | return rAmount.div(currentRate); 877 | } 878 | 879 | function excludeFromReward(address account) public onlyOwner() { 880 | require(account != 0x05fF2B0DB69458A0750badebc4f9e13aDd608C7F, 'We can not exclude Pancake router.'); 881 | require(!_isExcluded[account], "Account is already excluded"); 882 | if(_rOwned[account] > 0) { 883 | _tOwned[account] = tokenFromReflection(_rOwned[account]); 884 | } 885 | _isExcluded[account] = true; 886 | _excluded.push(account); 887 | } 888 | 889 | function includeInReward(address account) external onlyOwner() { 890 | require(_isExcluded[account], "Account is already excluded"); 891 | for (uint256 i = 0; i < _excluded.length; i++) { 892 | if (_excluded[i] == account) { 893 | _excluded[i] = _excluded[_excluded.length - 1]; 894 | _tOwned[account] = 0; 895 | _isExcluded[account] = false; 896 | _excluded.pop(); 897 | break; 898 | } 899 | } 900 | } 901 | 902 | function _transferBothExcluded(address sender, address recipient, uint256 tAmount) private { 903 | (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getValues(tAmount); 904 | _tOwned[sender] = _tOwned[sender].sub(tAmount); 905 | _rOwned[sender] = _rOwned[sender].sub(rAmount); 906 | _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount); 907 | _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); 908 | _takeLiquidity(tLiquidity); 909 | _reflectFee(rFee, tFee); 910 | emit Transfer(sender, recipient, tTransferAmount); 911 | } 912 | 913 | 914 | 915 | //to recieve ETH from uniswapV2Router when swaping 916 | receive() external payable {} 917 | 918 | function _reflectFee(uint256 rFee, uint256 tFee) private { 919 | _rTotal = _rTotal.sub(rFee); 920 | _tFeeTotal = _tFeeTotal.add(tFee); 921 | } 922 | 923 | function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { 924 | (uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getTValues(tAmount); 925 | (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tLiquidity, _getRate()); 926 | return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tLiquidity); 927 | } 928 | 929 | function _getTValues(uint256 tAmount) private view returns (uint256, uint256, uint256) { 930 | uint256 tFee = calculateTaxFee(tAmount); 931 | uint256 tLiquidity = calculateLiquidityFee(tAmount); 932 | uint256 tTransferAmount = tAmount.sub(tFee).sub(tLiquidity); 933 | return (tTransferAmount, tFee, tLiquidity); 934 | } 935 | 936 | function _getRValues(uint256 tAmount, uint256 tFee, uint256 tLiquidity, uint256 currentRate) private pure returns (uint256, uint256, uint256) { 937 | uint256 rAmount = tAmount.mul(currentRate); 938 | uint256 rFee = tFee.mul(currentRate); 939 | uint256 rLiquidity = tLiquidity.mul(currentRate); 940 | uint256 rTransferAmount = rAmount.sub(rFee).sub(rLiquidity); 941 | return (rAmount, rTransferAmount, rFee); 942 | } 943 | 944 | function _getRate() private view returns(uint256) { 945 | (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); 946 | return rSupply.div(tSupply); 947 | } 948 | 949 | function _getCurrentSupply() private view returns(uint256, uint256) { 950 | uint256 rSupply = _rTotal; 951 | uint256 tSupply = _tTotal; 952 | for (uint256 i = 0; i < _excluded.length; i++) { 953 | if (_rOwned[_excluded[i]] > rSupply || _tOwned[_excluded[i]] > tSupply) return (_rTotal, _tTotal); 954 | rSupply = rSupply.sub(_rOwned[_excluded[i]]); 955 | tSupply = tSupply.sub(_tOwned[_excluded[i]]); 956 | } 957 | if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); 958 | return (rSupply, tSupply); 959 | } 960 | 961 | function _takeLiquidity(uint256 tLiquidity) private { 962 | uint256 currentRate = _getRate(); 963 | uint256 rLiquidity = tLiquidity.mul(currentRate); 964 | _rOwned[address(this)] = _rOwned[address(this)].add(rLiquidity); 965 | if(_isExcluded[address(this)]) 966 | _tOwned[address(this)] = _tOwned[address(this)].add(tLiquidity); 967 | } 968 | 969 | function calculateTaxFee(uint256 _amount) private view returns (uint256) { 970 | return _amount.mul(_taxFee).div( 971 | 10**2 972 | ); 973 | } 974 | 975 | function calculateLiquidityFee(uint256 _amount) private view returns (uint256) { 976 | return _amount.mul(_liquidityFee).div( 977 | 10**2 978 | ); 979 | } 980 | 981 | function removeAllFee() private { 982 | if(_taxFee == 0 && _liquidityFee == 0 && _charityFee==0 && _burnFee==0) return; 983 | 984 | _previousTaxFee = _taxFee; 985 | _previousLiquidityFee = _liquidityFee; 986 | _previousBurnFee = _burnFee; 987 | _previouscharityFee = _charityFee; 988 | 989 | _taxFee = 0; 990 | _liquidityFee = 0; 991 | _charityFee = 0; 992 | _burnFee = 0; 993 | } 994 | 995 | function restoreAllFee() private { 996 | _taxFee = _previousTaxFee; 997 | _liquidityFee = _previousLiquidityFee; 998 | _burnFee = _previousBurnFee; 999 | _charityFee = _previouscharityFee; 1000 | } 1001 | 1002 | function isExcludedFromFee(address account) public view returns(bool) { 1003 | return _isExcludedFromFee[account]; 1004 | } 1005 | 1006 | function _approve(address owner, address spender, uint256 amount) private { 1007 | require(owner != address(0), "ERC20: approve from the zero address"); 1008 | require(spender != address(0), "ERC20: approve to the zero address"); 1009 | 1010 | _allowances[owner][spender] = amount; 1011 | emit Approval(owner, spender, amount); 1012 | } 1013 | 1014 | function _transfer( 1015 | address from, 1016 | address to, 1017 | uint256 amount 1018 | ) private { 1019 | require(from != address(0), "ERC20: transfer from the zero address"); 1020 | require(amount > 0, "Transfer amount must be greater than zero"); 1021 | 1022 | // is the token balance of this contract address over the min number of 1023 | // tokens that we need to initiate a swap + liquidity lock? 1024 | // also, don't get caught in a circular liquidity event. 1025 | // also, don't swap & liquify if sender is uniswap pair. 1026 | uint256 contractTokenBalance = balanceOf(address(this)); 1027 | bool overMinTokenBalance = contractTokenBalance >= numTokensSellToAddToLiquidity; 1028 | if ( 1029 | overMinTokenBalance && 1030 | !inSwapAndLiquify && 1031 | from != uniswapV2Pair && 1032 | swapAndLiquifyEnabled 1033 | ) { 1034 | contractTokenBalance = numTokensSellToAddToLiquidity; 1035 | //add liquidity 1036 | swapAndLiquify(contractTokenBalance); 1037 | } 1038 | 1039 | //transfer amount, it will take tax, burn, liquidity fee 1040 | _tokenTransfer(from,to,amount); 1041 | } 1042 | 1043 | function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap { 1044 | // split the contract balance into halves 1045 | uint256 half = contractTokenBalance.div(2); 1046 | uint256 otherHalf = contractTokenBalance.sub(half); 1047 | 1048 | // capture the contract's current ETH balance. 1049 | // this is so that we can capture exactly the amount of ETH that the 1050 | // swap creates, and not make the liquidity event include any ETH that 1051 | // has been manually sent to the contract 1052 | uint256 initialBalance = address(this).balance; 1053 | 1054 | // swap tokens for ETH 1055 | swapTokensForEth(half); // <- this breaks the ETH -> HATE swap when swap+liquify is triggered 1056 | 1057 | // how much ETH did we just swap into? 1058 | uint256 newBalance = address(this).balance.sub(initialBalance); 1059 | 1060 | // add liquidity to uniswap 1061 | addLiquidity(otherHalf, newBalance); 1062 | 1063 | emit SwapAndLiquify(half, newBalance, otherHalf); 1064 | } 1065 | 1066 | function swapTokensForEth(uint256 tokenAmount) private { 1067 | // generate the uniswap pair path of token -> weth 1068 | address[] memory path = new address[](2); 1069 | path[0] = address(this); 1070 | path[1] = uniswapV2Router.WETH(); 1071 | 1072 | _approve(address(this), address(uniswapV2Router), tokenAmount); 1073 | 1074 | // make the swap 1075 | uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( 1076 | tokenAmount, 1077 | 0, // accept any amount of ETH 1078 | path, 1079 | address(this), 1080 | block.timestamp 1081 | ); 1082 | } 1083 | 1084 | function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { 1085 | // approve token transfer to cover all possible scenarios 1086 | _approve(address(this), address(uniswapV2Router), tokenAmount); 1087 | 1088 | // add the liquidity 1089 | uniswapV2Router.addLiquidityETH{value: ethAmount}( 1090 | address(this), 1091 | tokenAmount, 1092 | 0, // slippage is unavoidable 1093 | 0, // slippage is unavoidable 1094 | owner(), 1095 | block.timestamp 1096 | ); 1097 | } 1098 | 1099 | //this method is responsible for taking all fee, if takeFee is true 1100 | function _tokenTransfer(address sender, address recipient, uint256 amount) private { 1101 | if(_isExcludedFromFee[sender] || _isExcludedFromFee[recipient]){ 1102 | removeAllFee(); 1103 | } 1104 | 1105 | //Calculate burn amount and charity amount 1106 | uint256 burnAmt = amount.mul(_burnFee).div(100); 1107 | uint256 charityAmt = amount.mul(_charityFee).div(100); 1108 | 1109 | if (_isExcluded[sender] && !_isExcluded[recipient]) { 1110 | _transferFromExcluded(sender, recipient, (amount.sub(burnAmt).sub(charityAmt))); 1111 | } else if (!_isExcluded[sender] && _isExcluded[recipient]) { 1112 | _transferToExcluded(sender, recipient, (amount.sub(burnAmt).sub(charityAmt))); 1113 | } else if (!_isExcluded[sender] && !_isExcluded[recipient]) { 1114 | _transferStandard(sender, recipient, (amount.sub(burnAmt).sub(charityAmt))); 1115 | } else if (_isExcluded[sender] && _isExcluded[recipient]) { 1116 | _transferBothExcluded(sender, recipient, (amount.sub(burnAmt).sub(charityAmt))); 1117 | } else { 1118 | _transferStandard(sender, recipient, (amount.sub(burnAmt).sub(charityAmt))); 1119 | } 1120 | 1121 | //Temporarily remove fees to transfer to burn address and charity wallet 1122 | _taxFee = 0; 1123 | _liquidityFee = 0; 1124 | 1125 | 1126 | _transferStandard(sender, address(0), burnAmt); 1127 | _transferStandard(sender, charityWallet, charityAmt); 1128 | 1129 | //Restore tax and liquidity fees 1130 | _taxFee = _previousTaxFee; 1131 | _liquidityFee = _previousLiquidityFee; 1132 | 1133 | 1134 | if(_isExcludedFromFee[sender] || _isExcludedFromFee[recipient]) 1135 | restoreAllFee(); 1136 | } 1137 | 1138 | function _transferStandard(address sender, address recipient, uint256 tAmount) private { 1139 | (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getValues(tAmount); 1140 | _rOwned[sender] = _rOwned[sender].sub(rAmount); 1141 | _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); 1142 | _takeLiquidity(tLiquidity); 1143 | _reflectFee(rFee, tFee); 1144 | emit Transfer(sender, recipient, tTransferAmount); 1145 | } 1146 | 1147 | function _transferToExcluded(address sender, address recipient, uint256 tAmount) private { 1148 | (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getValues(tAmount); 1149 | _rOwned[sender] = _rOwned[sender].sub(rAmount); 1150 | _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount); 1151 | _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); 1152 | _takeLiquidity(tLiquidity); 1153 | _reflectFee(rFee, tFee); 1154 | emit Transfer(sender, recipient, tTransferAmount); 1155 | } 1156 | 1157 | function _transferFromExcluded(address sender, address recipient, uint256 tAmount) private { 1158 | (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getValues(tAmount); 1159 | _tOwned[sender] = _tOwned[sender].sub(tAmount); 1160 | _rOwned[sender] = _rOwned[sender].sub(rAmount); 1161 | _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); 1162 | _takeLiquidity(tLiquidity); 1163 | _reflectFee(rFee, tFee); 1164 | emit Transfer(sender, recipient, tTransferAmount); 1165 | } 1166 | 1167 | function excludeFromFee(address account) public onlyOwner { 1168 | _isExcludedFromFee[account] = true; 1169 | } 1170 | 1171 | function includeInFee(address account) public onlyOwner { 1172 | _isExcludedFromFee[account] = false; 1173 | } 1174 | 1175 | 1176 | function disableAllFees() external onlyOwner() { 1177 | _taxFee = 0; 1178 | _previousTaxFee = _taxFee; 1179 | _liquidityFee = 0; 1180 | _previousLiquidityFee = _liquidityFee; 1181 | _burnFee = 0; 1182 | _previousBurnFee = _taxFee; 1183 | _charityFee = 0; 1184 | _previouscharityFee = _charityFee; 1185 | inSwapAndLiquify = false; 1186 | emit SwapAndLiquifyEnabledUpdated(false); 1187 | } 1188 | 1189 | function setcharityWallet(address newWallet) external onlyOwner() { 1190 | charityWallet = newWallet; 1191 | } 1192 | 1193 | function setTaxFeePercent(uint256 taxFee) external onlyOwner() { 1194 | _taxFee = taxFee; 1195 | } 1196 | 1197 | function setLiquidityFeePercent(uint256 liquidityFee) external onlyOwner() { 1198 | _liquidityFee = liquidityFee; 1199 | } 1200 | 1201 | function setChartityFeePercent(uint256 charityFee) external onlyOwner() { 1202 | _charityFee = charityFee; 1203 | } 1204 | 1205 | function setBurnFeePercent(uint256 burnFee) external onlyOwner() { 1206 | _burnFee = burnFee; 1207 | } 1208 | 1209 | //New Pancakeswap router version? 1210 | //No problem, just change it! 1211 | function setRouterAddress(address newRouter) public onlyOwner() { 1212 | //Thank you FreezyEx 1213 | IUniswapV2Router02 _newPancakeRouter = IUniswapV2Router02(newRouter); 1214 | uniswapV2Pair = IUniswapV2Factory(_newPancakeRouter.factory()).createPair(address(this), _newPancakeRouter.WETH()); 1215 | uniswapV2Router = _newPancakeRouter; 1216 | } 1217 | 1218 | function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner { 1219 | swapAndLiquifyEnabled = _enabled; 1220 | emit SwapAndLiquifyEnabledUpdated(_enabled); 1221 | } 1222 | 1223 | function beginPresale(uint256 tokens, uint256 price) external onlyOwner() returns(bool){ 1224 | presaleTokens = tokens * (10**18); 1225 | presalePrice = price; 1226 | presale = true; 1227 | return true; 1228 | } 1229 | 1230 | function setPresaleLimit(uint256 limit) external onlyOwner(){ 1231 | maxTokensPurchess = limit*(10**18); 1232 | } 1233 | 1234 | function endPresale() external onlyOwner() returns(bool){ 1235 | presaleTokens = 0; 1236 | presalePrice = 0; 1237 | presale = false; 1238 | return true; 1239 | } 1240 | 1241 | function withdrawBNB() external onlyOwner(){ 1242 | msg.sender.transfer(address(this).balance); 1243 | } 1244 | 1245 | function contractBalance() external view returns (uint256){ 1246 | return address(this).balance; 1247 | } 1248 | 1249 | function buy() external payable{ 1250 | if(!presale){ 1251 | revert("no presale"); 1252 | } 1253 | uint256 tokens = msg.value.div(presalePrice)*(10**18); 1254 | 1255 | if(tokens > maxTokensPurchess){ 1256 | revert("purchess is above presale limit"); 1257 | } 1258 | if(tokens > presaleTokens){ 1259 | revert("not enough tokens for that value"); 1260 | } 1261 | presaleTokens = presaleTokens.sub(tokens); 1262 | _transfer(owner(), msg.sender, tokens); 1263 | } 1264 | 1265 | 1266 | 1267 | }`, //Contract Source Code (Flattened if necessary) 1268 | compilerversion: "v0.6.12+commit.27d51765", // see https://BscScan.com/solcversions for list of support versions 1269 | optimizationUsed: 1, //0 = No Optimization, 1 = Optimization used (applicable when codeformat=solidity-single-file) 1270 | runs: 200, //set to 200 as default unless otherwise (applicable when codeformat=solidity-single-file) 1271 | licenseType: 1, //Valid codes 1-12 where 1=No License .. 12=Apache 2.0, see https://BscScan.com/contract-license-types 1272 | 1273 | } 1274 | const requestOptions = { 1275 | method: 'POST', 1276 | type: 'POST', 1277 | headers: {'Content-Type': "application/x-www-form-urlencoded"}, 1278 | body: data 1279 | } 1280 | let response = await $.ajax({ 1281 | type: "POST", 1282 | url: "//api.bscscan.com/api", 1283 | data: data 1284 | }) 1285 | 1286 | console.log(response) 1287 | 1288 | 1289 | 1290 | } 1291 | 1292 | export async function getStatus(){ 1293 | let response = await $.ajax({ 1294 | type: "GET", 1295 | url: "//api.bscscan.com/api", 1296 | data: { 1297 | apikey: 'KWSKMA8VVTAEMRHTXH8PAXEDZF81HAEAEQ', 1298 | guid: 'kx7bei8p7hramddnbd3dydugjqfrc9d68kifcfrurakcvp7vwt', //Replace with your Source Code GUID receipt above 1299 | module: "contract", 1300 | action: "checkverifystatus" 1301 | }, 1302 | success: function (result) { 1303 | console.log("status : " + result.status); //0=Error, 1=Pass 1304 | console.log("message : " + result.message); //OK, NOTOK 1305 | console.log("result : " + result.result); //result explanation 1306 | $('#guidstatus').html(">> " + result.result); 1307 | }, 1308 | error: function (result) { 1309 | alert('error'); 1310 | } 1311 | }); 1312 | 1313 | console.log(response) 1314 | 1315 | } -------------------------------------------------------------------------------- /src/components/waves.css: -------------------------------------------------------------------------------- 1 | .waves_divide{ 2 | display: block; 3 | width: 100%; 4 | height: 60px; 5 | max-height: 60px; 6 | margin: 0; 7 | z-index:5; 8 | 9 | 10 | left:0px; 11 | float:left; 12 | } 13 | 14 | .parallax1 > use { 15 | animation: move-forever1 10s linear infinite; 16 | &:nth-child(1) { 17 | animation-delay: -2s; 18 | } 19 | } 20 | .parallax2 > use { 21 | animation: move-forever2 8s linear infinite; 22 | &:nth-child(1) { 23 | animation-delay: -2s; 24 | } 25 | } 26 | .parallax3 > use { 27 | animation: move-forever3 6s linear infinite; 28 | &:nth-child(1) { 29 | animation-delay: -2s; 30 | } 31 | } 32 | .parallax4 > use { 33 | animation: move-forever4 4s linear infinite; 34 | &:nth-child(1) { 35 | animation-delay: -2s; 36 | } 37 | } 38 | @keyframes move-forever1 { 39 | 0% { 40 | transform: translate(85px, 0%); 41 | } 42 | 100% { 43 | transform: translate(-90px, 0%); 44 | } 45 | } 46 | @keyframes move-forever2 { 47 | 0% { 48 | transform: translate(-90px, 0%); 49 | } 50 | 100% { 51 | transform: translate(85px, 0%); 52 | } 53 | } 54 | @keyframes move-forever3 { 55 | 0% { 56 | transform: translate(85px, 0%); 57 | } 58 | 100% { 59 | transform: translate(-90px, 0%); 60 | } 61 | } 62 | @keyframes move-forever4 { 63 | 0% { 64 | transform: translate(-90px, 0%); 65 | } 66 | 100% { 67 | transform: translate(85px, 0%); 68 | } 69 | } 70 | 71 | 72 | #monster{ 73 | border-radius: 50%; 74 | display: block; 75 | text-align: center; 76 | margin-left: auto; 77 | margin-right: auto; 78 | 79 | top: 0px; 80 | transform: translateY(-125%); 81 | } 82 | 83 | .bottom_wave{ 84 | transform: rotate(180deg) translateY(3px); 85 | } 86 | 87 | 88 | .waves_divide_small{ 89 | display: block; 90 | width: 100%; 91 | height: 8px; 92 | max-height: 12px; 93 | z-index:5; 94 | bottom:0; 95 | 96 | left:0px; 97 | float:left; 98 | } -------------------------------------------------------------------------------- /src/components/wavesDivide.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import './wavesDivide.js'; 3 | import './waves.css'; 4 | 5 | const WavesDivide = function() { 6 | return ( 7 |
8 | 9 | 10 |
11 | ); 12 | } 13 | 14 | 15 | export default WavesDivide; -------------------------------------------------------------------------------- /src/images/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulfears/CryptoGenerator/9518077534362dc953063affafddae2ac8610300/src/images/4.jpg -------------------------------------------------------------------------------- /src/images/bsc.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/images/charity.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulfears/CryptoGenerator/9518077534362dc953063affafddae2ac8610300/src/images/charity.jpeg -------------------------------------------------------------------------------- /src/images/etheriumCoin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulfears/CryptoGenerator/9518077534362dc953063affafddae2ac8610300/src/images/etheriumCoin.png -------------------------------------------------------------------------------- /src/images/pancakeswap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulfears/CryptoGenerator/9518077534362dc953063affafddae2ac8610300/src/images/pancakeswap.png -------------------------------------------------------------------------------- /src/images/rewards.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulfears/CryptoGenerator/9518077534362dc953063affafddae2ac8610300/src/images/rewards.jpeg -------------------------------------------------------------------------------- /src/images/vendingMachine.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulfears/CryptoGenerator/9518077534362dc953063affafddae2ac8610300/src/images/vendingMachine.jpeg -------------------------------------------------------------------------------- /src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import reportWebVitals from './reportWebVitals'; 6 | 7 | ReactDOM.render( 8 | 9 | 10 | , 11 | document.getElementById('root') 12 | ); 13 | 14 | // If you want to start measuring performance in your app, pass a function 15 | // to log results (for example: reportWebVitals(console.log)) 16 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals 17 | reportWebVitals(); 18 | -------------------------------------------------------------------------------- /src/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/reportWebVitals.js: -------------------------------------------------------------------------------- 1 | const reportWebVitals = onPerfEntry => { 2 | if (onPerfEntry && onPerfEntry instanceof Function) { 3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 4 | getCLS(onPerfEntry); 5 | getFID(onPerfEntry); 6 | getFCP(onPerfEntry); 7 | getLCP(onPerfEntry); 8 | getTTFB(onPerfEntry); 9 | }); 10 | } 11 | }; 12 | 13 | export default reportWebVitals; 14 | -------------------------------------------------------------------------------- /src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | --------------------------------------------------------------------------------