Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to access DappTokenCrowdsale in truffle console #3

Open
dbrowne24 opened this issue Oct 11, 2018 · 3 comments · May be fixed by #4
Open

Unable to access DappTokenCrowdsale in truffle console #3

dbrowne24 opened this issue Oct 11, 2018 · 3 comments · May be fixed by #4

Comments

@dbrowne24
Copy link

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
dbrowne24 added a commit to dbrowne24/ico_irl that referenced this issue Oct 11, 2018
…g migrations.

This resolves: dappuniversity#3

This bug was caused by the way in which the migrations steps are added to the promise chain. More can be read about this issue here: trufflesuite/truffle#501
@michealzorn
Copy link

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

@dbrowne24
Copy link
Author

@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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants