v1.3.0
🦕 module to simplify uniswap interactions
Repository
Current version released
4 months ago
Freedomswaps
This repository provides smart contracts like Freedomswaps to simplify the provisioning of interfaces for decentralized exchanges.
Thanks to brightinventions.pl.
Deno API
Usage Example
import { FreedomSwaps } from "https://deno.land/x/freedomswaps@v1.2.0/mod.ts"
const tokenIn = "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270" // Matic on Polygon POS
const tokenOut = "0x099471B71c9D8b0C6b616eE9A7C645e22cA9cfF7" // Freiheit on Polygon POS
const amountIn = 1
const poolFee = 10000
const slippage = 30
const providerURL = Deno.args[0]
const pkTestWallet = Deno.args[1]
if (providerURL === undefined || pkTestWallet === undefined) {
throw new Error("parameter missing")
}
const freedomSwaps = await FreedomSwaps.getInstance(providerURL)
await freedomSwaps.swap(tokenIn, tokenOut, amountIn, poolFee, slippage, pkTestWallet)
Execute Usage Example
git clone https://github.com/moniquebaumann/freedomswaps.git
cd freedomswaps
deno run --allow-all usage-example.ts <your provider url> <your pk of an experimental testwallet>
About us
We are Friends of Satoshi.
Chancellor on brink of second bailout for banks.
We are free.