How to do an ICO on XinFin Network in less than 20 minutes.

  1. With great powers come great responsibilities. I’m not responsible for you not being cautious with your XDC, or using these powers for the evil side of the force. I truly hope you do good and feel empowered by the potential that this technology puts in the hands of people.
  2. THIS CONTRACT HAS NOT BEEN AUDITED. It means that it is experimental code, has not been verified, and can be broken, if you intend to do a REAL ICO, you HAVE to Audit the code and do a proper contract tailored to your specs.
  3. I have absolutely no responsibility for you, your dog, your money, or your life. Be big boys and girls and own it.
  1. XinFin Address (Apothem Network)
  2. Some XDC (Apothem Network)
  3. A text editor (I.e. Sublime / Atom)
  4. Solidity contract
  5. Be able to cross your fingers twice during the process
  • Sublime Text
  • Atom
  • Open the contract you downloaded in your Text Editor.
  • Go to Line 3–15 and look at the comment section. Although this is a comment section, this will help you down the track. The name of the template ICO is XinFam CROWDSALE token contract.
  • Change Line 4 to the title of your crowdsale.
  • You will just change Line 6 after you deploy the contract on the XibFi Network.
  • Change Line 7’s Symbol to your respective coin name (Keep it short)
  • Change Line 8 to the name of your token
  • Go to Line 102 and change “XinFam” to “(YourCrowdsaleName). DON’T USE SPACE OR IT WON’T WORK.
  • Do the same for Line 118
  • Go to Line 119 and change the symbol name, the same as the ones you did in the comment section
  • Do the same for Line 120
  • Leave Decimals at 18.
  • On line 122 you will have to define your first ICO parameter, when does the bonus ends?
  • And on line 123, you will define when does the Crowdsale ends.
  • Now, go to line 212. On that comment, write what is the amount of your tokens you will be giving away for XDC.
  • On line 218, define how much people will get within the BONUS.
  • On line 220, define how much people will get without the BONUS (the same ratio that you put on line 212).
  • Go to https://remix.xinfin.network/
  • In the Contract create a new file ICO.sol, paste the code you just edited! If something red comes up, there is something wrong with the code. If there are any yellow warnings it’s alright, let’s hope for the best
  • After compiling the code you will have to deploy it on the apothem network change the environment to injected web3 and click on deploy
  • After that, you will see the pop-up from XDCPay you will have to submit the transaction, and after that contract has been deployed.
  • In the Overview Tab → Click on the Contract Address
  • Go to the Contract Code Tab → Click Verify and Publish
  1. Be sure that the contract address field corresponds to the contract address that you have just deployed. Remember contract address is different from the XDCPay address you created so make sure not to get them confused
  2. The contract name has to match the one in the code, in my case is: XinFamToken. This was on Line 102 in your code
  3. To check which version of the compiler, go back to the remix page where you will get their compiler version will be there. In most cases, it should be: v0.4.19+commit.c4cbbb05.js
  4. On Optimisation, choose No (We haven’t enabled it before).
  5. On ENTER THE SOLIDITY CONTRACT CODE BELOW, copy the whole code from Remix, and paste it in that area. NOT THE BYTECODE, but the code itself. Can also be copied from your text editor.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store