Celo in react-native/expo

Hello , I’m having this error while implementing celo in react native with expo:

Unable to resolve "@celo/abis/web3/Registry" from "node_modules/@celo/contractkit/lib/address-registry.js"

  • @celo/contractkit: ^8.1.1
  • web3: 1.10
  • expo: ~51.0.28

Hey Jonath

Yeah I see this happening with expo too. We don’t get this in other environments so there might be away around it but I havent found yet.

In the mean time you might have better luck using viem. Its my go to library.

For my own curiosity, which features of contractkit where you hoping to use? I might be able to show snippetss of equivalent with viem

– Aaron

1 Like

Thanks @aaronmgdr , I want the sendTransaction mainly

Yeah viem sendTransaction
https://viem.sh/docs/actions/wallet/sendTransaction.html#sendtransaction

Create the wallet client with Celo instead of Ethereum of course

import { createWalletClient, custom } from ‘viem’

import { celo } from 'viem/chains’

const walletClient = createWalletClient({ chain: mainnet, transport: custom(window.ethereum!),})

I’m using react native with expo