GithubHelp home page GithubHelp logo

defi_tutorial's Issues

Error: Returned values aren't valid, did it run Out of Gas?

let daiTokenBalance = await daiToken.methods.balanceOf(this.state.account).call()
let dappTokenBalance = await dappToken.methods.balanceOf(this.state.account).call()
let stakingBalance = await tokenFarm.methods.stakingBalance(this.state.account).call()

It appears like these 3 lines cause the error. I have looked it up but I can't seem to find a solution that fixes the error. I have the exact same code as the tutorial and I am using ganache with metamask.
Capture

Issue in testing

the truffle test is failing on line 66 of the test.js file, even though I am typing the exact line.

truffle exec scripts/issue-tokens.js not working after migrate --reset

truffle exec scripts/issue-token.js gives on colsole the "Tokens issued!"
like this:

$ truffle exec scripts/issue-tokens.js
Using network 'development'.

Tokens issued!

But after the:

truffle migrate --reset
truffle exec scripts/issue-tokens.js doesn't gives the "Tokens issued!"
like this:

$ truffle exec scripts/issue-token.js
Using network 'development'.

acoounts is not defined

ReferenceError: acoounts is not defined
at module.exports (C:\Users\Kamvret\defi_tutorial\migrations\2_deploy_contracts.js:22:27)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at Migration._deploy (C:\Users\Kamvret\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\migrate\Migration.js:73:1)
at Migration._load (C:\Users\Kamvret\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\migrate\Migration.js:55:1)
at Migration.run (C:\Users\Kamvret\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\migrate\Migration.js:171:1)
at Object.runMigrations (C:\Users\Kamvret\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\migrate\index.js:150:1)
at Object.runFrom (C:\Users\Kamvret\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\migrate\index.js:110:1)
at Object.runAll (C:\Users\Kamvret\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\migrate\index.js:114:1)
at Object.run (C:\Users\Kamvret\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\migrate\index.js:79:1)
at runMigrations (C:\Users\Kamvret\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\core\lib\commands\migrate.js:269:1)
Truffle v5.1.39 (core: 5.1.39)
Node v12.16.2

any solution?

MetaMask - RPC Error

Hey Gregory,

I'm running to an issue in 2:23:30 of this tutorial, when it comes to test staking.
After I approve spending token, metamask shows me an error:

image

And after I confirm that in MetaMask console displays me this error:

image

I was writing all the contract code on my own (TokenFarm.sol), but then I just copied this from repository, compiled it, and still running to the same issue.

Any idea about how to fix this error?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.