dappuniversity / ico_irl

Real World ICO Ethereum Smart Contracts
89 stars 77 forks source link

Unable to access DappTokenCrowdsale in truffle console #3

Open dbrowne24 opened 5 years ago

dbrowne24 commented 5 years ago

I have run:

npm install
truffle compile
ganache-cli
truffle deploy

Then when I run:

truffle console
DappToken.deployed().then((instance) => {token=instance})
token.address

This works fine. I get the address. But when I run:

truffle console
DappTokenCrowdsale.deployed().then((instance) => {crowdsale=instance})

I get the following error:

Error: DappTokenCrowdsale has not been deployed to detected network (network/artifact mismatch)
    at /usr/lib/node_modules/truffle/build/webpack:/packages/truffle-contract/contract.js:454:1
michealzorn commented 5 years ago

This guy did replay you question he want only follower by youtube.

dbrowne24 commented 5 years ago

@michealzorn I don't think that's the case. His videos are very helpful. I would imagine he is a busy guy. I figured out what was wrong and fixed it in a pull request. Hopefully the pull request will get accepted when he has a chance. At the moment the crowdsale is not actually being deployed to the blockchain when you run truffle deploy

It was an easy mistake to make to be honest. Had me scratching my head for a while lol.

jamesjara commented 5 years ago

@michealzorn you are a troll, @admin please remove @michealzorn , more than 6 posts opened without anything useful.