eth_sendTransaction - Manta RPC Method
Send a transaction from an unlocked account on Manta Pacific. Requires the node to hold the sender's private key - intended for development and testing only.
Creates and sends a new transaction from an unlocked account on Manta Pacific. The node signs the transaction server-side using the private key associated with the from address.
Why Manta? Build on the modular ZK L2 with Celestia DA delivering the lowest fees for 200+ dApps with first L2 on Celestia mainnet, ZK-as-a-Service via Universal Circuits, Polygon CDK integration, and modular OP Stack architecture.
Security Warning: Public Dwellir endpoints do not manage unlocked accounts for you. On shared infrastructure,
eth_sendTransactioncommonly returns an unsupported-method response or an account-management error such asunknown account, depending on the client. For production applications, sign transactions client-side and useeth_sendRawTransactioninstead.
When to Use This Method
eth_sendTransaction is useful for ZK application developers, privacy-focused builders, and teams requiring modular scalability in development scenarios:
- Local Development - Send transactions quickly on local nodes (Hardhat, Anvil, Ganache) without managing private keys
- Testing Workflows - Rapidly prototype and test contract interactions on dev networks
- Scripted Deployments - Deploy contracts on private or permissioned networks with unlocked accounts
Best Practices
- Requires an unlocked account on the node, which is a significant security risk in production
- Prefer
eth_sendRawTransactionwith client-side signed transactions for all production use cases - Node-managed accounts are disabled on most public providers; this method is best for local development only
Code Examples
Common Use Cases
1. Local Development with Hardhat
Send transactions using Hardhat's pre-funded unlocked accounts:
async function devTransfer(provider, from, to, value) {
const txHash = await provider.send('eth_sendTransaction', [{
from,
to,
value: '0x' + value.toString(16),
gas: '0x5208' // 21000
}]);
const receipt = await provider.waitForTransaction(txHash);
console.log(`Transfer confirmed in block ${receipt.blockNumber}`);
return receipt;
}2. Contract Deployment on Dev Network
Deploy contracts without managing private keys locally:
async function deployContract(provider, from, bytecode) {
const txHash = await provider.send('eth_sendTransaction', [{
from,
data: bytecode,
gas: '0x4C4B40' // 5,000,000
}]);
const receipt = await provider.waitForTransaction(txHash);
console.log(`Contract deployed at: ${receipt.contractAddress}`);
return receipt.contractAddress;
}3. Batch Transfers in Testing
Send multiple test transactions on Manta dev networks:
async function batchTransfer(provider, from, recipients) {
const hashes = [];
for (const { to, value } of recipients) {
const hash = await provider.send('eth_sendTransaction', [{
from,
to,
value: '0x' + value.toString(16),
gas: '0x5208'
}]);
hashes.push(hash);
}
return hashes;
}Error Handling
Common errors and solutions:
| Error Code | Description | Solution |
|---|---|---|
| -32000 | Method unavailable or unknown account | Use client-side signing with eth_sendRawTransaction |
| -32000 | Insufficient funds | Ensure from address has enough balance for value + gas |
| -32000 | Nonce too low | A transaction with this nonce was already mined - let the node auto-assign |
| -32601 | Method not found | Method disabled on this node - use client-side signing |
| -32602 | Invalid params | Verify transaction object fields and hex encoding |
Related Methods
eth_sendRawTransaction- Broadcast a pre-signed transaction (recommended for production)eth_signTransaction- Sign without sending (requires unlocked account)eth_estimateGas- Estimate gas cost before sending
eth_signTransaction
Sign a transaction without broadcasting it on Manta Pacific. Public shared RPC endpoints commonly return deprecation, unsupported-method, or account-management errors because they do not keep unlocked signers.
eth_call
Execute smart contract calls without creating transactions on Manta Pacific. Essential for reading contract state for ZK-enabled DeFi, private identity verification, and modular ZK applications via Universal Circuits.