New answers tagged

0

This is because your constructor does not accept any parameters. Change your contract.js file to this: var KJToken = artifacts.require("KJToken.sol"); module.exports = function (deployer) { deployer.deploy(KJToken); };


0

Here's the fix. I just ran into this issue today. // truffle-config.js const regeneratorRuntime = require("regenerator-runtime"); Then install the NPM package: npm install regenerator-runtime


1

As @Ismael pointed out, some of my lines of code in the config file were in the wrong sections. Once I edited it to get the sections right, it worked fine. Here is the corrected code: require('babel-register'); require('babel-polyfill'); const Web3 = require("web3"); const { projectUrl, mnemonicPhrase } = require('./secrets.json'); const ...


0

Please check your compiler version. Then make contract and compiler version the same. If you are working with react follow these steps: Check solidity smart contract version from top of your contract (eg. pragma solidity ^0.5.16) Check compiler version if it is greater or less than the contract version change the version of the compiler (from VS code, right ...


0

Here is how it worked out. In the crowdsale migration.js, I've deployed token contract first, fetched the address through async. Assigned it to a const. This const thereafter acted as a pointer to the token contract. Migration code below const Crowdsale = artifacts.require("contracts/Crowdsale.sol"); const Token = artifacts.require("contracts/...


Top 50 recent answers are included