Skip to content

Instantly share code, notes, and snippets.

@BlockmanCodes
Last active August 19, 2023 18:53
Show Gist options
  • Save BlockmanCodes/bbea0ed5ef48c78f43f004fcfb547018 to your computer and use it in GitHub Desktop.
Save BlockmanCodes/bbea0ed5ef48c78f43f004fcfb547018 to your computer and use it in GitHub Desktop.
Deploy Uniswap V3 Pool Ropsten
// SETUP
const { ethers } = require('ethers')
const axios = require('axios')
require('dotenv').config()
const UNISWAP_V3_FACTORY_ADDRESS = '0x1F98431c8aD98523631AE4a59f267346ea31F984'
const ROPSTEN_PROVIDER = new ethers.providers.JsonRpcProvider(process.env.INFURA_URL_ROPSTEN)
const WALLET_ADDRESS = process.env.WALLET_ADDRESS
const WALLET_SECRET = process.env.WALLET_SECRET
const PUG_COIN_ADDRESS = '<your deployed addresss>'
const COLLIE_COIN_ADDRESS = '<your deployed addresss>'
const wallet = new ethers.Wallet(WALLET_SECRET)
const connectedWallet = wallet.connect(ROPSTEN_PROVIDER)
...
const url = `https://api.etherscan.io/api?module=contract&action=getabi&address=${UNISWAP_V3_FACTORY_ADDRESS}&apikey=${apiKey}`
...
{
"name": "deploy-uniswap-pool-ropsten",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@nomicfoundation/hardhat-toolbox": "^1.0.2",
"@openzeppelin/contracts": "^4.7.2",
"axios": "^0.27.2",
"dotenv": "^16.0.1",
"hardhat": "^2.10.1"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment