Installation
To interact with the Polygon network, you will need to use a web3 provider library, such asethers.js
, with Magic. For a more in-depth guide on available functions provided, refer to the EVM documentation.
To get started, install the following dependencies for your project:
Ethers.js
Initialization
The Magic class is the entry-point to the Magic SDK. It must be instantiated with a Magic publishable key.ImportantEthereum provider is only supported in [email protected] or later versions.
Mainnet
Mainnet Block Explorer URL: https://polygonscan.com/JavaScript
Testnet
Mumbai Block Explorer: https://www.oklink.com/amoy Mumbai Testnet Faucet: https://faucet.polygon.technology/JavaScript