0.1.0 • Published 2 years ago

uniswap-v2-deployer v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

uniswap-v2-deployer

forked from https://github.com/AlexBHarley/uniswap-v2-deploy-plugin

One-Click Deployment Tool for Uniswap V2, TypeScript version, dependent on ethers 6.*. Usage as follows:

  • install:
npm i --save-dev uniswap-v2-deployer
  • quick start:
const {factory, router, weth9} = await UniswapV2Deployer.deploy(deployer);

const pair = IUniswapV2Pair__factory.connect(
    await factory.getPair(token0.target, token1.target),
    deployer
);
  • example:
// router addLiquidity (don't forget token-approve-router first)
await (
    await router.addLiquidity(
        token0.target,
        token1.target,
        amount0,
        amount1,
        0,
        0,
        deployer.address,
        MaxUint256
    )
).wait();

// router swap
await (
    await router.swapExactTokensForTokensSupportingFeeOnTransferTokens(
        swapAmount0,
        0,
        [token0.target, token1.target],
        deployer.address,
        MaxUint256
    )
).wait();
0.1.0

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

1.0.0

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago

0.0.0

2 years ago