Uniswap Testnet Deployer

Robin Pedersen
Symfoni
Published in
1 min readSep 24, 2019

When creating https://app.rebalance.to/ we needed a tool to quickly create test environments with Uniswap. We made it into an NPM package so it can be easier for others to develop with Uniswap.

Locate the NPM package here: https://www.npmjs.com/package/@blockchangers/uniswap-testnet-deployer

npm install --save @blockchangers/uniswap-testnet-deployer

It’s tested with both Ethers.js and Metamask as providers.

Metamask example

let ethereumif (typeof window.ethereum !== 'undefined' || (typeof window.web3 !== 'undefined')) {ethereum = window.ethereum}const deployer = new UniswapTestnetDeployer(ethereum)const tokenExchanges = await deployer.setup()

Ethers.js example

First, it deploys some predefined tokens.

Then, it customizes the tokens and bootstraps a new Uniswap network.

--

--