How to Connect to Cronos with Magic

How to Connect to Cronos with Magic

#Resources

#Installation

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

#Configure Cronos

#Mainnet

Mainnet Block Explorer: https://cronoscan.com/

const customNodeOptions = {
  rpcUrl: 'https://evm.cronos.org/', // Cronos mainnet URL
  chainId: 25, // Your own node's chainId
}

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

#Testnet

Testnet Block Explorer: https://testnet.cronoscan.com/

const customNodeOptions = {
  rpcUrl: 'https://evm-t3.cronos.org/', // Cronos testnet URL
  chainId: 338, // Cronos testnet chainId
}

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

Did you find what you were looking for?

How to Connect to Cronos with Magic

Did you find what you were looking for?