I am running a private permissioned network and would like to use Truffle v5.0.1 for deployment. I use it according to the documentation:

  1. Compile my project with truffle compile so that the ./build folder with the appropriate json files appears.

  2. Deploy my project with truffle migrate --network private, BUT:

I get an error:

Error: Number can only safely store up to 53 bits.

Here is my deployment script:

My 1_initial_migration.js looks as follows:

var Migrations = artifacts.require("Migrations");
var MyTokenContract = artifacts.require("MyTokenContract");

module.exports = function(deployer, network, accounts) {
    deployer.deploy(Migrations, {from:accounts[0], gas: 4500000, gasPrice:0});
    deployer.deploy(MyTokenContract, "arg1", "arg2", {from:accounts[0], gas: 4500000, gasPrice:0});

I have set up a network object whithin the truffle-config file named private:

private: {
  provider: () => new HDWalletProvider(myPrivateKey, `http://ip_address_to_network:22000`),
  port: 22000,
  network_id: "*",
  from: "0x....", 
  production: true

EDIT: If I use HDWalletProvider(myPrivateKey, http://ip_address_to_network:22000) without the port specification 22000 in the URL, then I don't get the above error! Then it seems that everything works fine, but I get NO return or confirmation at all on the console. How do I find out whether the migration worked?

  • What version of truffle are you using? What's the exact output from the command truffle migrate? I've tried with truffle v5 and metacoin box and migration works fine. – Ismael Jan 5 at 1:04
  • @Ismael have updated the question – saitam Jan 5 at 10:44
  • Can you check if your node is mining transactions? I tried deploying to ganache and geth private and when deploy is complete it will show info about the transactions and the contract addresses created. – Ismael Jan 6 at 2:30
  • eth.blockNumber= didn't increase after my deployment attempt. But truffle is also NOT showing any errors. Thats not very handy to find out whats wring... – saitam Jan 7 at 0:01
  • If you get no output then the transactions generated by truffle are not being mined. Check if a miner is running and accepts transaction with 0 gas price. – Ismael Jan 7 at 2:11

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.