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

Error in documentation Performing-a-flash-loan/...-with-truffle #9

Open
AtticusLScott opened this issue Aug 10, 2020 · 0 comments
Open

Comments

@AtticusLScott
Copy link

AtticusLScott commented Aug 10, 2020

Hi.

I am reviewing the documentation about Flash Loans in Truffle and I notice the following.

You need to add in the truffle-config.js a "from" field because if if you do not do it, you get the following error:

Compiling your contracts...

Everything is up to date, there is nothing to compile.

Error: Expected parameter 'from' not passed to function.
at expected_keys.forEach.key (/usr/local/lib/node_modules/truffle/build/webpack:/packages/expect/index.js:5:1)
at Array.forEach ()
at Object.options (/usr/local/lib/node_modules/truffle/build/webpack:/packages/expect/index.js:3:1)
at Object.run (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/index.js:65:1)
at runMigrations (/usr/local/lib/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:269:1)
truffle(ropsten)>
(To exit, press ^C again or type .exit)
truffle(ropsten)>

I am deploying using the Ropster network and changed the file to:

// const path = require("path");
const HDWalletProvider = require("@truffle/hdwallet-provider")
require("dotenv").config()

module.exports = {
// See http://truffleframework.com/docs/advanced/configuration to customize your Truffle configuration!
// contracts_build_directory: path.join(__dirname, "client/src/contracts"),
networks: {
development: {
host: "127.0.0.1",
port: 8545,
// gas: 20000000,
network_id: "*",
skipDryRun: true
},
ropsten: {
provider: new HDWalletProvider(process.env.DEPLOYMENT_ACCOUNT_KEY, "https://ropsten.infura.io/v3/" + process.env.INFURA_API_KEY),
network_id: 3,
from:0xCAFE......
gas: 5000000,
gasPrice: 5000000000, // 5 Gwei
skipDryRun: true
},

Please, Can you review or update the documentation mentioning explicitly that you need the "from" field?

Thank you.

Regards.

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

No branches or pull requests

1 participant