New answers tagged truffle-migration
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
Related Tags
truffle-migration × 367truffle × 262
solidity × 94
truffle-deployment × 59
contract-deployment × 52
truffle-contract × 49
go-ethereum × 31
ropsten × 24
ganache × 23
truffle-compile × 20
truffle-test × 19
web3js × 15
migration × 14
testrpc × 13
infura × 13
contract-development × 12
private-blockchain × 10
dapps × 9
dapp-development × 9
testing × 9
quorum × 8
rinkeby × 8
openethereum × 8
ethereum-wallet-dapp × 7
ethereumjs × 7