> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getpara.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Execute Transactions

> Execute arbitrary transactions with lifecycle management using Web3 libraries on React Native

> [!NOTE]
>
> You're viewing the 2.0 (LTS) docs. [View the current 3.0 version of this page](https://docs.getpara.com/v3/react-native/guides/web3-operations/evm/execute-transactions.md).

Execute complex transactions with custom data and manage their lifecycle using Para.

## [Setup EVM Libraries First](https://docs.getpara.com/v2/react-native/guides/web3-operations/evm/setup-libraries.md)

Install and configure Ethers.js or Viem before using EVM operations

> [!NOTE]
>
> Wagmi is not available on React Native. Use Ethers.js or Viem for EVM operations.

> [tab] Ethers.js
>
> ## Execute Raw Transactions
>
> ```tsx theme={null}
> import { useParaEthersSigner, useParaEthersSendTransaction } from "@getpara/react-native-wallet/evm/ethers";
> import { ethers, JsonRpcProvider } from "ethers";
> import { View, Text, TouchableOpacity } from "react-native";
>
> const provider = new JsonRpcProvider("https://ethereum-sepolia-rpc.publicnode.com");
>
> function ExecuteTransaction() {
>   const { ethersSigner } = useParaEthersSigner({ provider });
>
>   const { sendTransactionAsync, isPending, data: receipt } = useParaEthersSendTransaction(ethersSigner);
>
>   return (
>     <View>
>       <TouchableOpacity
>         onPress={() =>
>           sendTransactionAsync({
>             to: "0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
>             data: "0x",
>             value: ethers.parseEther("0.01"),
>           })
>         }
>         disabled={isPending}
>       >
>         <Text>{isPending ? "Executing..." : "Execute Transaction"}</Text>
>       </TouchableOpacity>
>       {receipt && <Text>Transaction: {receipt.hash}</Text>}
>     </View>
>   );
> }
> ```
>
> ## Execute Contract Functions
>
> ```tsx theme={null}
> import { useParaEthersSigner, useParaEthersWriteContract } from "@getpara/react-native-wallet/evm/ethers";
> import { JsonRpcProvider } from "ethers";
> import { View, Text, TouchableOpacity } from "react-native";
>
> const CONTRACT_ABI = [
>   "function setGreeting(string memory _greeting)",
>   "function greet() view returns (string)"
> ];
>
> const provider = new JsonRpcProvider("https://ethereum-sepolia-rpc.publicnode.com");
>
> function ContractInteraction({ contractAddress }: { contractAddress: string }) {
>   const { ethersSigner } = useParaEthersSigner({ provider });
>
>   const { writeContractAsync, isPending, data: receipt } = useParaEthersWriteContract(ethersSigner);
>
>   return (
>     <View>
>       <TouchableOpacity
>         onPress={() =>
>           writeContractAsync({
>             address: contractAddress,
>             abi: CONTRACT_ABI,
>             functionName: "setGreeting",
>             args: ["Hello from Para!"],
>           })
>         }
>         disabled={isPending}
>       >
>         <Text>{isPending ? "Updating..." : "Update Greeting"}</Text>
>       </TouchableOpacity>
>       {receipt && <Text>Transaction: {receipt.hash}</Text>}
>     </View>
>   );
> }
> ```

> [tab] Viem
>
> ## Execute Raw Transactions
>
> ```tsx theme={null}
> import { useParaViemClient, useParaViemSendTransaction } from "@getpara/react-native-wallet/evm/viem";
> import { parseEther, http } from "viem";
> import { sepolia } from "viem/chains";
> import { View, Text, TouchableOpacity } from "react-native";
>
> function ExecuteTransaction() {
>   const { viemClient } = useParaViemClient({
>     walletClientConfig: { chain: sepolia, transport: http() },
>   });
>
>   const { sendTransactionAsync, isPending, data: hash } = useParaViemSendTransaction(viemClient);
>
>   return (
>     <View>
>       <TouchableOpacity
>         onPress={() =>
>           sendTransactionAsync({
>             to: "0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
>             data: "0x",
>             value: parseEther("0.01"),
>           })
>         }
>         disabled={isPending}
>       >
>         <Text>{isPending ? "Executing..." : "Execute Transaction"}</Text>
>       </TouchableOpacity>
>       {hash && <Text>Transaction: {hash}</Text>}
>     </View>
>   );
> }
> ```
>
> ## Execute Contract Functions
>
> ```tsx theme={null}
> import { useParaViemClient, useParaViemWriteContract } from "@getpara/react-native-wallet/evm/viem";
> import { http } from "viem";
> import { sepolia } from "viem/chains";
> import { View, Text, TouchableOpacity } from "react-native";
>
> const CONTRACT_ABI = [
>   {
>     name: "setGreeting",
>     type: "function",
>     stateMutability: "nonpayable",
>     inputs: [{ name: "_greeting", type: "string" }],
>     outputs: [],
>   },
> ] as const;
>
> function ContractInteraction({
>   contractAddress,
> }: {
>   contractAddress: `0x${string}`;
> }) {
>   const { viemClient } = useParaViemClient({
>     walletClientConfig: { chain: sepolia, transport: http() },
>   });
>
>   const { writeContractAsync, isPending, data: hash } = useParaViemWriteContract(viemClient);
>
>   return (
>     <View>
>       <TouchableOpacity
>         onPress={() =>
>           writeContractAsync({
>             address: contractAddress,
>             abi: CONTRACT_ABI,
>             functionName: "setGreeting",
>             args: ["Hello from Para!"],
>           })
>         }
>         disabled={isPending}
>       >
>         <Text>{isPending ? "Updating..." : "Update Greeting"}</Text>
>       </TouchableOpacity>
>       {hash && <Text>Transaction: {hash}</Text>}
>     </View>
>   );
> }
> ```

## Next Steps

## [Get Transaction Receipt](https://docs.getpara.com/v2/react-native/guides/web3-operations/evm/get-transaction-receipt.md)

Fetch and parse transaction receipts

## [Interact with Contracts](https://docs.getpara.com/v2/react-native/guides/web3-operations/evm/interact-with-contracts.md)

Read and write smart contract data

## [Watch Events](https://docs.getpara.com/v2/react-native/guides/web3-operations/evm/watch-events.md)

Subscribe to blockchain events


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.