How to Integrate Magic with the Fantom Blockchain

How to Integrate Magic with the Fantom Blockchain

#Installation

Via Magic SDK, you can connect to the Fantom blockchain. Fantom is EVM compatible so you can directly follow the Ethereum installation.

note

You can skip straight to our Fantom Demo directly:

šŸ‘‰ Fantom Demo

#Configure Fantom

#Mainnet

Mainnet Block Explorer URL: https://ftmscan.com/

const customNodeOptions = {
  rpcUrl: 'https://rpc.ftm.tools/',
  chainId: 250,
}

// Setting network to Fantom
const magic = new Magic('YOUR_PUBLISHABLE_API_KEY', { network: customNodeOptions });

#Testnet

Testnet Block Explorer URL: https://testnet.ftmscan.com/

const customNodeOptions = {
  rpcUrl: 'https://rpc.testnet.fantom.network',
  chainId: 4002,
}

// Setting network to Fantom - Testnet
const magic = new Magic('YOUR_PUBLISHABLE_API_KEY', { network: customNodeOptions });

Did you find what you were looking for?

How to Integrate Magic with the Fantom Blockchain

Did you find what you were looking for?