Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
deleted 3 characters in body
Source Link

I am trying to deploy my contract to Rinkeby network via Infura. But it actually does not get deploy to network when i run node deploy.js terminal does not spit out the address at which it is deployed. On screen i see it stuck. Please have a look at below screenshot. almost i kept it for a hour, but still same state.

waiting

Upon disconnecting the internet i get the below error, from this i can assume something was going on. there is no feedback system which shows the progress.

err

is there any way to know what is going wrong?

below is my deploy.js code

const HDWalletProvider = require('truffle-hdwallet-provider');
const Web3 = require('web3');
const compiledFactory = require('./build/CampaignFactory.json');

const provider = new HDWalletProvider(
    secret_key,
    'https://rinkeby.infura.io/v3/<infura_key>'
    
);

const web3 = new Web3(provider);

const deploy = async () => {
    const accounts = await web3.eth.getAccounts();
    console.log('Deploying from account', accounts[0]);
    //console.log('Bytecode is 0x'+compiledFactory.bytecode);
    const result = await new web3.eth.Contract(JSON.parse(compiledFactory.interface))
        //.deploy({ data : '0x' + bytecode})
        .deploy({ data : '0x' + compiledFactory.bytecode})
        .send({gas : '1000000', from : accounts[0]}); 
   // console.log(interface);
   // console.log('Contract deployed to ', result.options.address);
};

deploy();

I am trying to deploy my contract to Rinkeby network via Infura. But it actually does not get deploy to network when i run node deploy.js terminal does not spit out the address at which it is deployed. On screen i see it stuck. Please have a look at below screenshot. almost i kept it for a hour, but still same state.

waiting

Upon disconnecting the internet i get the below error, from this i can assume something was going on. there is no feedback system which shows the progress.

err

is there any way to know what is going wrong?

below is my deploy.js code

const HDWalletProvider = require('truffle-hdwallet-provider');
const Web3 = require('web3');
const compiledFactory = require('./build/CampaignFactory.json');

const provider = new HDWalletProvider(
    secret_key,
    'https://rinkeby.infura.io/v3/<infura_key>'
    
);

const web3 = new Web3(provider);

const deploy = async () => {
    const accounts = await web3.eth.getAccounts();
    console.log('Deploying from account', accounts[0]);
    //console.log('Bytecode is 0x'+compiledFactory.bytecode);
    const result = await new web3.eth.Contract(JSON.parse(compiledFactory.interface))
        //.deploy({ data : '0x' + bytecode})
        .deploy({ data : '0x' + compiledFactory.bytecode})
        .send({gas : '1000000', from : accounts[0]}); 
   // console.log(interface);
   // console.log('Contract deployed to ', result.options.address);
};

deploy();

I am trying to deploy my contract to Rinkeby network via Infura. But it actually does not get deploy to network when i run node deploy.js terminal does not spit out the address at which it is deployed. On screen i see it stuck. Please have a look at below screenshot. almost i kept it for a hour, but still same state.

waiting

Upon disconnecting the internet i get the below error, from this i can assume something was going on. there is no feedback system which shows the progress.

err

is there any way to know what is going wrong?

below is my deploy.js code

const HDWalletProvider = require('truffle-hdwallet-provider');
const Web3 = require('web3');
const compiledFactory = require('./build/CampaignFactory.json');

const provider = new HDWalletProvider(
    secret_key,
    'https://rinkeby.infura.io/v3/<infura_key>'
    
);

const web3 = new Web3(provider);

const deploy = async () => {
    const accounts = await web3.eth.getAccounts();
    console.log('Deploying from account', accounts[0]);
    //console.log('Bytecode is 0x'+compiledFactory.bytecode);
    const result = await new web3.eth.Contract(JSON.parse(compiledFactory.interface))
        //.deploy({ data : '0x' + bytecode})
        .deploy({ data : '0x' + compiledFactory.bytecode})
        .send({gas : '1000000', from : accounts[0]}); 
   // console.log(interface);
   console.log('Contract deployed to ', result.options.address);
};

deploy();
Source Link

contract does not gets deploy to rinkeby via Infura

I am trying to deploy my contract to Rinkeby network via Infura. But it actually does not get deploy to network when i run node deploy.js terminal does not spit out the address at which it is deployed. On screen i see it stuck. Please have a look at below screenshot. almost i kept it for a hour, but still same state.

waiting

Upon disconnecting the internet i get the below error, from this i can assume something was going on. there is no feedback system which shows the progress.

err

is there any way to know what is going wrong?

below is my deploy.js code

const HDWalletProvider = require('truffle-hdwallet-provider');
const Web3 = require('web3');
const compiledFactory = require('./build/CampaignFactory.json');

const provider = new HDWalletProvider(
    secret_key,
    'https://rinkeby.infura.io/v3/<infura_key>'
    
);

const web3 = new Web3(provider);

const deploy = async () => {
    const accounts = await web3.eth.getAccounts();
    console.log('Deploying from account', accounts[0]);
    //console.log('Bytecode is 0x'+compiledFactory.bytecode);
    const result = await new web3.eth.Contract(JSON.parse(compiledFactory.interface))
        //.deploy({ data : '0x' + bytecode})
        .deploy({ data : '0x' + compiledFactory.bytecode})
        .send({gas : '1000000', from : accounts[0]}); 
   // console.log(interface);
   // console.log('Contract deployed to ', result.options.address);
};

deploy();