VinuChain
  • VinuChain | VC
  • 📃Whitepaper
    • Whitepaper
      • Disclaimer
      • Abstract
      • Introduction
      • Background
      • VinuChain Protocol
      • Consensus Mechanism
      • Quota System
      • Network Architecture
      • VinuChain Coin (VC)
      • Conclusion
      • References
    • Tokenomics
    • Launchpads
    • Roadmap
  • 🧑‍💻Technical Docs
    • VinuChain Mainnet
      • Connect to Mainnet
      • Install Read-Only Node
      • Install Validator Node
      • Install API Node
    • VinuChain Testnet
      • Connect to Testnet
      • Install Read-Only Node
      • Install Validator Node
      • Private Network (Fakenet)
    • Nodes & Validators
      • Read-Only Node
      • Become a Validator
      • Update Validator Info
      • API Node
      • Delegation Calls
      • Lockup Calls
      • Reward Calls
      • Validator Calls
      • Troubleshooting
      • FAQ
    • Staking
      • Overview
      • Stake VC on VinuChain
      • FAQ - Staking
    • Smart Contracts
      • Deploy a Smart Contract
    • API
      • Public API Endpoints
      • GraphQL
      • REST API
    • Web3 Methods
      • gasprice.js
      • transfer.js
      • web3.eth.abi.js
      • web3.eth.accounts.js
      • web3.eth.contract.js
      • web3.eth.iban.js
      • web3.eth.js
      • web3.eth.net.js
      • web3.eth.subscribe.js
      • web3.eth.utils.js
      • .gitignore
      • LICENSE
      • app.js
      • common.js
      • constants.js
      • package-lock.json
      • package.json
      • yarn.lock
    • Cross-chain Bridging
      • Native $VC vs Wrapped $VC
      • Wanbridge
      • Add bep20 VC to Trust Wallet
Powered by GitBook
On this page
  • Build
  • Run
  • node app.js
  1. Technical Docs

Web3 Methods

README.md

PreviousREST APINextgasprice.js

Last updated 1 year ago

This repository contains examples of web3 methods that can be used on VinuChain. VinuChain is an EVM-compatible chain secured by the Lachesis consensus algorithm.

The methods can be categorised into:

  • ABI

  • Accounts

  • Common Methods

  • Contract

  • IBAN

  • Subscribe

  • Utils

The web3.eth.abi functions let you encode and decode parameters to ABI.

The web3.eth.accounts package contains functions to generate wallet accounts and sign transactions and data.

The main package web3.eth contains simple API references that can help get certain information about the connected blockchain.

The web3.eth.contract package makes it easy to interact with smart contracts on the blockchain. When you create a new contract object you give it the json interface of the respective smart contract and web3 will auto convert all calls into low level ABI calls over RPC for you. This allows you to interact with smart contracts as if they were JavaScript objects.

The web3.eth.Iban function converts wallet addresses from and to IBAN and BBAN.

The web3.eth.subscribe function lets you subscribe to specific events in the blockchain.

Utility functions for Blockchain dapps and other web3.js packages.

Build

Add .env file

FROM_ADDRESS=
PRIVATE_KEY = 
TO_ADDRESS=
IBAN=
npm install

Run

node app.js

🧑‍💻
ABI
Accounts
Common Methods
Contract
IBAN
Subscribe
Utils