go to  ForumEasy.com   
JavaPro
Home » Archive » Message


[Email To Friend][View in Live Context][prev topic « prev post | next post » next topic]
  Step 4: Prepare the contract for deployment
 
Subject: Step 4: Prepare the contract for deployment
Author: WebSpider
In response to: Step 3: Connect to Ethereum blockchain network
Posted on: 06/07/2021 07:05:27 AM

	var CONTRACT = require("./CONTRACT");
	const ABI = CONTRACT.ABI;              // from complied contract's "abi"
	const BYTECODE = CONTRACT.BYTECODE;    // from complied contract's "data.bytecode.object"
        const CONTRACTOR_ARGS = []; 

        let contract = new web3_conn.eth.Contract(ABI);  
    
        contract = contract.deploy({
            data: BYTECODE,
            arguments: CONTRACTOR_ARGS
        });


 

> On 06/07/2021 07:03:51 AM WebSpider wrote:

	const HDWalletProvider = require("truffle-hdwallet-provider");
	const provider = new HDWalletProvider(process.env.PRIVATE_KEY, 
                        "https://ropdten.infura.io/v3/"+process.env.PROJECT_ID);
	const web3_conn = new Web3(provider);





References:

 


 
Powered by ForumEasy © 2002-2022, All Rights Reserved. | Privacy Policy | Terms of Use
 
Get your own forum today. It's easy and free.