kleros / openiico-contract

Contract of Interactive Coin Offering
MIT License
11 stars 5 forks source link

How to deploy your own IICO to test the front end #25

Closed stefek99 closed 6 years ago

epiqueras commented 6 years ago

Check out: https://github.com/kleros/openiico/blob/develop/src/scripts/set-up-sale.js

yarn run deploy

stefek99 commented 6 years ago

WOW

I thought the readme is copy-paste auto-generated default...

That script is epic!

1 command as opposed to manually setting everything from scratch...

It's good to know what you do thought - script kitties :)

epiqueras commented 6 years ago

I think this unnecessarily long and complex for just saying:

  1. Deploy a token and IICO contract. Note that you can use the same token contract with multiple IICO contracts.
  2. Use Token.mint(IICOContractAddress) to mint tokens for the IICO contract on the token contract.
  3. Use IICO.setToken(tokenContractAddress) to set the token on the IICO contract.
  4. If you are using the IICO contract with whitelist functionality, you'll also need to call IICO.setWhitelister(whitelisterAddress) so the whitelister can add addresses to the whitelist.
stefek99 commented 6 years ago

TLDR: upated PR to include both high level (yours) as well as step by step (mine) instructions.


unnecessarily long and complex

Depends who you ask.

If I was to see the 4 steps instruction process:

Deploy a token and IICO contract.

How? How do I get the code? How do I pass constuctor parameters? JavaScript timestamp? Synchronising full node? Parity warp? Mnemonic provider? Infura? Metamask? Remix? Imports in the code? Testnet? Test Ether?

I would probably give up already... To complete step 1 would take me a week or more... Ask on StackOverflow, get an answer, then run into another problem.

To get to a certain level of proficiency took me about 6 months of commitment, diligent effort. Running into obsure problems but being persistent, knowing that blockchain is here to stay.

Remember - I'm definitely not the smartest guy in the room. Quite the opposite - I'm choosing my rooms wisely.

Random - https://github.com/ethereum/mist/issues/52 - 15 Oct 2015 - I didn't even know that wallet is a wallet contract and you need to have ETH to deploy it! 💌

stefek99 commented 6 years ago

Another update.

Tutorial landed in a separate place.

Updated readme visible here: https://github.com/stefek99/openiico-contract/tree/run-your-own

Squash my commits:

clesaege commented 6 years ago

Thanks. I merge.