×

Help for a ERC20 Project by Phil_Flipz in cryptodevs

[–]mcc011ins 2 points3 points  (0 children)

Code as less as possible yourself and use as much as possible from openzeppelin which are vetted contracts for all kinds of Usecases.

How to create your own cryptocurrency? by abhisthebest in cryptodevs

[–]osoese 4 points5 points  (0 children)

depends on the type of crypto you want to make. most of the coins out there are a "clone" of a stable codebase. This is basic copy paste of the code base and find/replace key params like the name and repo links. It's not too complex, but you do have to know what to change. Bitcoin clones have to change the wallet logos and stuff for the QT wallet. Ethereum clones normally just use metamask and change the chainId. Astute cloners will change the ports on the node. After you have your codebase you have to launch the crypto with some seed nodes or boot nodes or what have you. If its a POW coin you have to run a miner on one of the nodes to propagate the chain. masternode type chains might be a hybrid mine and then switch to staking only after a block height - you need to know that stuff. Some coins can be mined by CPU at first, but others are more difficult and its best to just use a GPU (or suffer long block times in the beginning OR learn difficulty adjustment which is another level). I think you can google how to clone litecoin and doge and maybe find some directions. Sometimes cloning is incorrectly called a fork - because the process of code adjustment is similar, but forks are of a moving chain.

If cloning ethereum - I would suggest three things. 1) figure out how to not accidentally leave in the genesis block premine or you are giving the original ethereum owners a large chunk of coins (like 90 million). Not that they care - they will never touch it on your shitcoin, but its just something you don't want to do. 2) Don't just make a ethereum chain inside the current base - but actually clone it. 3) maybe play around with the besu node code on hyperledger to get an idea of what a copy of the chain inside the current base means vs making your own. Once you have a clone up and operational it is then easy to clone all the contracts for pancake swap and stuff like that to your own chain. The dynamics are very similar and you can launch your own tokens.

If cloning a bitcoin fork I might recommend litecoin or doge and I think you can copy the changes code on their github or find some easy directions.

If you are an expert and want to do something good for the market... make a copy of bitcoin cash and smartBCH ecosystem. That is the true cross chain platform from a transaction based coin (unspents) to an account based EVM protocol with defi. Your new shitcoin will have the best of both worlds and you will pave the way for a number of johnny come lately's to copy your hard work after you are done. This will make you a hero in the coin dev community and provide you a steady income of fork assistance.

after you have your clone up then you have to get some trading going on and list on an exchange. The most easily accessible exchange for you to pay for right now might be xeggex, however i am not sure where they report to. You will want to find on that reports to CMC and I find it easy to get my coins registered on coincodex once they are trading somewhere. You should have registered your chain id and name at satoshilabs, but it is not 100% necessary. If you do EVM chain you should figure out how to get some kind of a bridge open to pancakeswap - then repeat the process to smartBCH (benswap and mistswap and I like tangoswap) and other defi chains - its all prettty standard at this point with minor adjustments for each.

getting your coin workable on something like ledger for hardware wallet compatibility takes other interactions with those entities. you will figure out if those are necessary based on your initiaal success.

Good luck and happy shitcoining. Now that you see how much work goes into the average shitcoin clone - maybe just join a community that has already done this and help their devs out? you can always stop by egem.io (discord.egem.io) and reach out. Note in advance - there are so many people that stop by and claim "I am a professional block chain develop and for hire" - this type of post will get ignored. Crypto is open source and you should expect to make your own stuff in some capacity before you are invited to work with the other devs. The community will probably point you in a direction or talk about things but most of them are kind of to themselves. You can learn solidity and make NFT projects on a shitcoin like egem for almost no cost and learn a lot in the process. Egem is trading at about half a penny and is on many exchanges plus dex bridges to Avalanche, BSC, smartBCH, and possibly more. We even have TUSD/WBNB from binance smart chain to EGEM chain. Fees are non existent and you can buy egem very quicky on graviex or weggex mercatox or stex - or just on pancake swap avalanche or smartBCH and bridge over using bridge.egem.io. You can use egem in metamask following quick directions and be up and running in seconds. fees on egem are non existant (i.e. so small you won't notice them). There are multiple NFT projects on EGEM and one pancake swap clone called RUBYSWAP already. More is to come. EGEM is also POW ethash with a node system overlay (node holders get paid to run a node) with scripts and you can to run a node on a precanned cloud service for $1.50 a month. This is a very good platform to learn about crypto and crypto trading.

Hope my response and shill helps you on your journey.

Gold award to the person who can solve my dumb newbie problem by [deleted] in cryptodevs

[–]busymichael 3 points4 points  (0 children)

Just to concur with u/XJahdai -- you didn't call _tokenTransfer, you called the uniswap router to do the exchange and the uniswap router bypasses your 'takeFee' entirely.

Gold award to the person who can solve my dumb newbie problem by [deleted] in cryptodevs

[–]XJahdai 3 points4 points  (0 children)

Some clarifiactions: I'm relatively new to solidity too and I just checked this in a 10 minute break I took from work so this might not make sense, here I go:

In the contract I see the only executed transaction was an "approve" which moves tokens from address A to address B

Function: approve(address spender, uint256 amount)

However, the function that gives the % to the marketing address is "swapTokens" specifically in line 681. Nowhere else there's a transfer to the contract's marketing address so I think the problem is you are invoking the wrong function