A decentralized application for over-the-counter token swaps on Polygon networks.
- Polygon Mainnet
- Polygon Amoy Testnet
- additional can be added depending on where smart contract is deployed and added to configs
- Node.js
- MetaMask
- Test tokens for testing (on respective networks)
- An
.envfile in the root directory
- Create a
.envfile in the root directory with the following variables:
PRIVATE_KEY=your_private_key
CONTRACT_ADDRESS=0xF9D874860d5801233dd84569fad8513e0037A5d9
RECIPIENT_ADDRESS=your_recipient_address
TOKEN1_ADDRESS=0xd85e481D10f8d77762e6215E87C5900D8b098e94
TOKEN2_ADDRESS=0xcDC1F663207f1ec636C5AF85C1D669A4a3d02fB3
YOUR_ALCHEMY_KEY=your_alchemy_keyThe application currently runs on Polygon Amoy Testnet. Network configuration is managed in config.js:
{
"80002": {
name: "Amoy",
contractAddress: "0xF9D874860d5801233dd84569fad8513e0037A5d9",
explorer: "https://www.oklink.com/amoy",
rpcUrl: "https://rpc.ankr.com/polygon_amoy",
fallbackRpcUrls: [
"https://polygon-amoy.blockpi.network/v1/rpc/public",
"https://polygon-amoy.public.blastapi.io"
]
}
}- Install dependencies:
npm install-
Ensure your
.envfile is properly configured -
Start the node server:
http-server- Connect your wallet - the application will automatically:
- Request connection to MetaMask
- Switch to Amoy testnet if needed
- Initialize the contract interface
- Create OTC swap orders
- Fill existing orders
- Cancel your orders
- View active orders
- Network switching support
- Real-time order updates
- Test on Amoy testnet first
- Get test tokens from the Polygon faucet
- Ensure your wallet has sufficient native tokens for gas
- Always verify token addresses
- Check order details carefully before swapping
- Never share your private keys
- Use trusted token contracts only
- Chain ID: 80002 (0x13882)
- Primary RPC URL: https://rpc.ankr.com/polygon_amoy
- Fallback RPC URLs:
- Explorer: https://www.oklink.com/amoy
- Faucet: https://faucet.polygon.technology/
- Native Currency: POL (18 decimals)
For issues and feature requests, please open an issue on the repository.