⚠️Blast API (blastapi.io) ends Oct 31. Migrate to Dwellir and skip Alchemy's expensive compute units.
Switch Today →
Skip to main content

eth_sendTransaction

Overview

Creates and submits a transaction via the node or wallet. For hosted RPC, this is typically unsupported; use eth_sendRawTransaction.

Movement-Specific Considerations

  • Prefer eth_sendRawTransaction with a client-side wallet; Movement EVM chain ID is 3073.

Parameters

NameTypeRequiredDescription
txobjectYesFrom, to, value, gas, data, etc.

Returns

Transaction hash.

Code Examples

Ethers.js v6 (wallet required)

import { Wallet, JsonRpcProvider } from 'ethers';
const provider = new JsonRpcProvider('https://api-movement-mainnet.n.dwellir.com/YOUR_API_KEY/v1');
const wallet = new Wallet(process.env.PRIV_KEY!, provider);
const tx = await wallet.sendTransaction({ to: '0x0000000000000000000000000000000000000000', value: 0n });
console.log(tx.hash);

Web3.js (wallet required)

import Web3 from 'web3';
const web3 = new Web3('https://api-movement-mainnet.n.dwellir.com/YOUR_API_KEY/v1');
// Use web3.eth.accounts.signTransaction + eth_sendRawTransaction as recommended