📖
Bepro.Network
  • Welcome!
  • bepro-js
    • About BEPRO.JS
    • Start building
      • Installation
      • How To Guides
        • Create a Web3Connection
        • Create an ERC-20 Token
        • Create your NFT Art Gallery
        • Create other Project
    • Use Cases
    • How to Contribute
      • Create an Object
    • External Links
      • SDK Documentation
      • GitHub
  • BEPRO.Network
    • Why The Bepro.Network?
    • Protocol Workflow
    • The Bepro.Network
    • $BEPRO
    • Bug Bounty
  • Community
    • BEPRO Tokenomics
    • Discord Server
    • Support
Powered by GitBook
On this page

Was this helpful?

  1. bepro-js
  2. Start building
  3. How To Guides

Create a Web3Connection

Create a Simple Web3 Connection

A very simple way to connect your app to the web3 Environment

The use for other objects as StakingContract of ERC20Contract are similar to options structure A & B, either if you want to connect to a backend system and provide all variables (Option A) connect directly to an injected wallet (Option B)

const { Web3Connection } = require("bepro-js");

/* Options */

/* a) Create Instance without Injected Web3 (without Metamask) */
let web3 = new Web3Connection({ 
opt : { web3Connection : 'https://kovan.infura.io/v3' } });

await web3.start();

/* b) Create Instance with Injected Web3 (Metamask For Example) */
let web3 = new Web3Connection({});

await web3.login();

/* After A) or B) access methods easily */
let transactionData = await web3.getWeb3().eth.getTransactionReceipt(tx);

Looking for more functions?

PreviousHow To GuidesNextCreate an ERC-20 Token

Last updated 3 years ago

Was this helpful?

See all available functions

here