go to  ForumEasy.com   
JavaPro
Home » Archive » Message


[Email To Friend][View in Live Context][prev topic « prev post | next post » next topic]
  Step 3: Connect to Ethereum blockchain network
 
Subject: Step 3: Connect to Ethereum blockchain network
Author: WebSpider
In response to: Step 2: Create the .env File
Posted on: 06/07/2021 07:03:51 AM

	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);


 

> On 06/07/2021 07:02:17 AM WebSpider wrote:

PROJECT_ID=<Infura project id>
PROJECT_SECRET=<Infura project secret -- optional>
PRIVATE_KEY=<Ethereum account's private key>






References:

 


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