Swap on-chain
To swap native ETH for XMR, call createIntent on the Ethereum mainnet contract. Set the transaction’s ETH value to the amount you want to swap, with additional ETH in your wallet for gas.
function createIntent( bytes calldata recipientAddress, uint64 minXmrAmount, uint64 minPaymentHeight, uint128 randomxDifficulty, uint32 settlementWindowSeconds) external payable returns (bytes32 swapId);| Parameter | Value to enter |
|---|---|
recipientAddress |
Your 95-character Monero mainnet standard address or subaddress, encoded as ASCII text in hex: 0x followed by 190 hex characters. Do not Base58-decode it. |
minXmrAmount |
Minimum XMR you will accept, in integer piconero. 1 XMR = 1,000,000,000,000 piconero. |
minPaymentHeight |
Minimum Monero payment block height. Use the latest mined block’s height plus one. |
randomxDifficulty |
The full network difficulty integer multiplied by your chosen factor, such as 1×, 2×, or 4×. Enter the resulting integer, not the multiplier alone. |
settlementWindowSeconds |
Time allowed after the 61-second auction, in seconds: 3,600–86,400. The website defaults to 86,400 (24 hours). |
The latest mined block height and current network difficulty are visible on Monero explorers such as xmrchain.net. Use fresh values. The ETH value, minimum XMR amount, payment height, and difficulty must all be positive.
You can submit the signed transaction through Etherscan’s Broadcast Transaction tool. Its Write Contract form lets you enter the parameters and confirm through a connected wallet once the contract source is verified; this deployment is currently unverified on Etherscan.