Web3js for Blockchains

Introduction

Web3.js is a collection of libraries that allow you to interact with a local or remote Ethereum node using HTTP, IPC, or WebSocket. This plugin enables easily interact with Web3.js library.
It comes with two elements: the first one is -web3.utils which converts various encoding types (Wei. hex, decimal etc), and the second one is web3.eth which contains actions o interact with Ethereum nodes

How to setup

The web3 plugin contains two elements (so far). Web3.eth and web3.utils.
Place the web.eth element on the page, and paste the URL received from the provider (eg Alchemy, Infura, Quicknode, etc.) into the property filed - "Provider URL" . 
Image without caption
In the two other fields, you should enter the actions from this plugin that was created only for parsing the response and for easy use it.
Image without caption
Then use its actions to interact with Ethereum nodes.
Place the web.utils element on the page and use its actions to convert various encoding types (wei. hex, decimal etc)

Element fields

Web3.ETH

  1. Provider URL - URL received from the provider.  -= Five popular node providers that offer access to the nodes of the most popular cryptocurrencies: Infura - https://infura.io  GetBlock - https://getblock.io  Alchemy - https://www.alchemy.com  QuikNode - https://www.quicknode.com  Blockdaemon - https://blockdaemon.com  =-
  1. Block info parser - An App type field for sorting the response and output as an object. 
Please use the "Block info parser" action in this field.
  1. Transaction info parser - An App type field for sorting the response and output as an object
Please use the "Transaction info parser" action in this field.

Web3.Utils

No fields

Actions

Web3.eth:

  1. Web3.ETH: Create Wallet - Generates one or more accounts in the wallet. If wallets already exist they will not be overridden Params: Number of Accounts- Number of accounts to create. Leave empty to create an empty wallet.
Image without caption
  1. Web3.ETH: Balance - Get Ethereum balance for any address. (Take any account address from the top of accounts for example: https://etherscan.io/accounts) Params: Account address- The address to get the balance.
Image without caption
  1. Web3.ETH: Get Encoded ABI Transaction - Encodes the ABI for transaction method Params: Token contract address - The contact address of the token you want to use Receiver Address - Valid recipient address value Value - Amount value in number
Image without caption
  1. Web3.ETH: Get Block Number - Returns the current block number Params: -
Image without caption
  1. Web3.ETH: Get Block info by ID - Get all info about a block by ID Params: Block number - The block number or block hash. Or the string "earliest"
Image without caption
  1. Web3.ETH: Get transaction - Returns a transaction matching the given transaction hash Params: Transaction Hash - The transaction hash
Image without caption
  1. Web3.ETH: Get Chain ID - Returns the chain ID of the currently connected node as described in the EIP-695 Params: -
Image without caption
  1. Web3.ETH: Send Transaction - Sends a transaction to the network Params: From - The address for the sending account. Uses the web3.eth.default Account property, if not specified. Or an address or index of a local wallet in web3.eth.accounts.wallet To - (optional) The destination address of the message, left undefined for a contract-creation transaction Data - (optional) Either a ABI byte string containing the data of the function call on a contract, or in the case of a contract-creation transaction the initialization code Value - (optional) The value transferred for the transaction in wei, also the endowment if it’s a contract-creation transactions Gas - (optional) The amount of gas to use for the transactions Gas price - (optional) The price of gas for this transaction in Wei, defaults to web3.eth.gasPrice Max Fee Per Gas - (optional) The maximum fee per gas that the transaction is willing to pay in total Type - (optional) A positive unsigned 8-bit number between 0 and 0x7f that represents the type of the transaction Chain - (optional) Chain ID. Defaults to mainnet
Image without caption
  1. Web3.ETH: Create New Account - Creates a new account Params: New password - The password to encrypt this account with
This action works only when accessing through the go-ethereum node.
Image without caption
  1. Web3.ETH: Check address - Check if the entered address is a smart contract Params: Address - Valid address to check
Image without caption

Web3.utils:

  1. Web3: Random Hex - To generate cryptographically strong pseudo-random HEX strings from a given byte size Params: Size - The byte size for the HEX string, e.g. 32 will result in a 32 bytes HEX string with 64 characters prefixed with “0x”
Image without caption
  1. Web3: sha3 - Will calculate the sha3 of the input Params: Data to convert - A string to hash
Image without caption
  1. Web3: Is Ethereum address? - Checks if a given string is a valid Ethereum address Params: Address - An address string
Image without caption
  1. Web3: Convert to Hex - Convert any data to Hex Params: Data - Any data to convert
Image without caption
  1. Web3: Hex To Number - Returns the number representation of a given HEX value Params: HEX - HEX to convert
Image without caption
  1. Web3: Hex To Utf8 - Returns the UTF-8 string representation of a given HEX value Params: HEX - HEX to convert
Image without caption
  1. Web3: Hex To ASCII - Returns the ASCII string representation of a given HEX value Params: HEX - HEX to convert
Image without caption
  1. Web3: Number To Wei - Converts any ether value into Wei Params: Number - The number value Unit - (optional)The ether to convert from. (defaults to "ether")
Image without caption
  1. Web3: Padding - Adds padding on the left or right of a string, Useful for adding paddings to HEX strings Params: String - The string to add padding on the left Number - The number of characters the total string should have. Direction - paddings direction. Dropdown (left, right)
Image without caption
  1. Web3: Utf8 To HEX - Returns the HEX representation of a given UTF-8 string Params: UTF8 string - Any string in the UTF8 format
Image without caption

Exposed states

Web3.ETH

  1. Balance -  Data from the "Balance" action
  1. Encoded ABI - Data from the "Get Encoded ABI Transaction" action
  1. New wallet address - Data from the "Create Wallet" action
  1. New wallet privateKey - Data from the "Create Wallet" action
  1. Block info - Data from the "Get Block Info" action
  1. Transaction info - Data from the "Get Transaction Info" action
  1. Block number - Data from the "Get Block Number" action
  1. Send Transaction Hash - Data from the "Send Transaction" action
  1. Receipt - Data from the "Send Transaction" action
  1. Confirmation Number - Data from the "Send Transaction" action
  1. New Account Address - Data from the "Create new Account" action
  1. Is This Smart Contract? - Data from the "Check Address" action
  1. Chain ID - Data from the "Get Chain ID" action

Web3.utils

  1. Web3 Version - Data about Web3 version
  1. Random HEX - Data from the "Random HEX" action
  1. sha3 - Data from the "sha3" action
  1. isAddress - Data from the "Is Ethereum Address?" action
  1. String to HEX - Data from the "Convert to HEX" action
  1. HEX to Number - Data from the "HEX to Number" action
  1. HEX to UTF8 - Data from the "HEX to Utf8" action
  1. HEX to Ascii - Data from the "HEX to Aschii" action
  1. Number to Wei - Data from the "Number to WEI" action
  1. Padding left - Data from the "Padding" action
  1. UTF8 to HEX - Data from the "Utf8 to HEX" action

Changelogs


Helpful?