EVM Transactions
This guide covers EVM transactions on Monolythium.
Transaction Types
| Type | Description |
|---|---|
| Transfer | Send LYTH to another address |
| Contract deployment | Deploy smart contract |
| Contract interaction | Call contract functions |
Sending Transactions
Using MetaMask
- Connect to Monolythium network
- Click Send
- Enter recipient and amount
- Confirm transaction
Using ethers.js
const { ethers } = require('ethers');
const provider = new ethers.JsonRpcProvider('https://rpc.sprintnet.monolythium.com:8545');
const wallet = new ethers.Wallet(privateKey, provider);
const tx = await wallet.sendTransaction({
to: '0x...',
value: ethers.parseEther('1.0')
});
await tx.wait();
console.log('Transaction hash:', tx.hash);
Using web3.js
const Web3 = require('web3');
const web3 = new Web3('https://rpc.sprintnet.monolythium.com:8545');
const account = web3.eth.accounts.privateKeyToAccount(privateKey);
const tx = {
from: account.address,
to: '0x...',
value: web3.utils.toWei('1', 'ether'),
gas: 21000
};
const signedTx = await account.signTransaction(tx);
const receipt = await web3.eth.sendSignedTransaction(signedTx.rawTransaction);
Gas Configuration
Gas Limit
Maximum gas willing to consume:
| Transaction | Typical Gas |
|---|---|
| Transfer | 21,000 |
| ERC-20 transfer | 60,000 |
| Contract deploy | 100,000 - 5,000,000+ |
| Contract call | 30,000 - 500,000+ |
Gas Price
Minimum gas price: 0.025 alyth (0.025 gwei equivalent)
const gasPrice = await provider.getFeeData();
console.log('Gas price:', gasPrice.gasPrice);
Transaction Receipt
After confirmation:
const receipt = await tx.wait();
console.log({
transactionHash: receipt.hash,
blockNumber: receipt.blockNumber,
gasUsed: receipt.gasUsed,
status: receipt.status // 1 = success, 0 = failure
});
Error Handling
Common errors:
| Error | Cause | Solution |
|---|---|---|
insufficient funds | Not enough LYTH | Add more LYTH |
nonce too low | Transaction already sent | Use higher nonce |
gas limit exceeded | Out of gas | Increase gas limit |
execution reverted | Contract error | Check contract logic |
Transaction Lifecycle
Create → Sign → Submit → Pending → Included → Confirmed
- Create: Build transaction object
- Sign: Sign with private key
- Submit: Send to node
- Pending: In mempool
- Included: In a block
- Confirmed: Block finalized
On Monolythium, confirmation is instant (deterministic finality).
FAQ
How fast are confirmations?
~2 seconds (one block). Finality is immediate.
Can transactions be reverted?
No. Once confirmed, transactions are final.
What's the difference from Ethereum?
Same EVM, different consensus. Faster finality, no reorgs.