Skip to content

Commit

Permalink
Merge branch 'master' into feat/scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
jiro-ono authored May 8, 2024
2 parents 4b782fd + fe5622a commit 246675d
Show file tree
Hide file tree
Showing 15 changed files with 4,811 additions and 1,460 deletions.
1 change: 1 addition & 0 deletions deployments/blast/.chainId
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
81457
538 changes: 538 additions & 0 deletions deployments/blast/UniswapV3Factory.json

Large diffs are not rendered by default.

228 changes: 228 additions & 0 deletions deployments/blast/solcInputs/d9871ba9e6e091710ddf2d51decefef3.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions deployments/sepolia/.chainId
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
11155111
538 changes: 538 additions & 0 deletions deployments/sepolia/UniswapV3Factory.json

Large diffs are not rendered by default.

219 changes: 219 additions & 0 deletions deployments/sepolia/solcInputs/2e84228bb9aeab570a80cb63b27f21da.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions deployments/skale-europa/.chainId
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2046399126
538 changes: 538 additions & 0 deletions deployments/skale-europa/UniswapV3Factory.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions deployments/zetachain/.chainId
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7000
538 changes: 538 additions & 0 deletions deployments/zetachain/UniswapV3Factory.json

Large diffs are not rendered by default.

219 changes: 219 additions & 0 deletions deployments/zetachain/solcInputs/2e84228bb9aeab570a80cb63b27f21da.json

Large diffs are not rendered by default.

255 changes: 200 additions & 55 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import 'dotenv/config'
import 'hardhat-typechain'
import '@nomiclabs/hardhat-ethers'
import '@nomiclabs/hardhat-waffle'
import '@nomiclabs/hardhat-etherscan'
import '@nomiclabs/hardhat-ethers'
import '@nomiclabs/hardhat-etherscan'
import '@nomiclabs/hardhat-waffle'
import 'dotenv/config'
import 'hardhat-deploy'
import 'hardhat-deploy-ethers'
import 'hardhat-typechain'
import { task, types } from 'hardhat/config'
import { MaxUint128 } from './test/shared/utilities'
const sleep = require('util').promisify(setTimeout)
const accounts = {
mnemonic: process.env.MNEMONIC || 'test test test test test test test test test test test junk',
mnemonic:
process.env.MNEMONIC ||
'test test test test test test test test test test test junk',
accountsBalance: '990000000000000000000',
}

Expand All @@ -33,7 +35,56 @@ task('set-fee-protocol', 'Set fee protocol')
.addParam('feeProtocol0', 'Fee Protocol 0', 4, types.int)
.addParam('feeProtocol1', 'Fee Protocol 1', 4, types.int)
.setAction(async (taskArgs, hre) => {
const poolAddresses: string[] = []
const poolAddresses: string[] = [
// ETHEREUM
// '0x87c7056bbe6084f03304196be51c6b90b6d85aa2', // SUSHI/ETH
// POLYGON
// '0x8cfaab34f5159abf9c35587ac40d09a05dc94765', // USDC.e/USDT
// '0x21988c9cfd08db3b5793c2c6782271dc94749251', // MATIC/USDC.e
// '0x4646e8a5e1d14e2da01577822d6346c7883c6890', // USDC.e/DAI
// '0xf1a12338d39fc085d8631e1a745b5116bc9b2a32', // MATIC/WETH
// '0xc6ba44891cd95efc3929a428242f97bd9b735eb1', // USDC.e/USDC
// '0x0e3eaef09dfe55824a3cda7146a387af261d7824', // USDC/NPM
// '0xff5713fdbad797b81539b5f9766859d4e050a6cc', // SUSHI/WETH
// '0xaabfa6dc0541033c1a2eb685f358d0ea937bb026', // PKR/USDC.e
// '0x1b0585fc8195fc04a46a365e670024dfb63a960c', // USDC.e/WETH
// SCROLL
// '0xae5aa896bb93f4c7c5660b7fc894b3892255d015', // USDC/USDT
// '0xe64ae4128e725868e8fe52e771e3d272e787b041', // USDC/ETH
// '0x08d8b29864348f8d1b7266bf02879c9d0af04eba', // WBTC/ETH

// CORE
// '0x72d8e6d7307dcf11a3456b9f6fdfad05385b2f3e', // CORE/USDT
// ARBITRUM
// '0xb3942c9ffa04efbc1fa746e146be7565c76e3dc1', // ETH/ARB 0.3
// '0xd9e96f78b3c68ba79fd4dfad4ddf4f27bd1e2ecf', // USDT/USDC.e 0.01
// '0x15e444da5b343c5a0931f5d3e85d158d1efc3d40', // ETH/USDC.e 0.05
// '0xcda3b7bec56dbb562453231f142f63d3b00f8eb3', // USDC/USDC.e 0.05
// '0x753d81a2d6c61dd7c3510729c9df310659f9003b', // ZTX/ETH 0.3
// '0xe6ea93ba4ae9ee6520e55affebbdb38ed6c233a4', // ZTX/USDC 0.3
// '0xb3aba1fb17ea51d909938c87f823fdfb0797a49b', // ETH/SUSHI 0.3
// '0xb1aeb76b4e3e628ee54753ad4b8ef68c41e67a9f', // MAGIC/ETH 0.3
// '0x9a528325cc76aec0da05b4a9b5a839fae6edd733', // ETH/SUSHI 1

// BASE

// '0x8e27128839aea978d65e98b28092367ade6048d8', // BEPE/WETH 0.3
// '0x693143e78f4207ef0536620a87e2befa80a46f3f', // BAPE/WETH 1
// '0x41595326aabe6132fc6c7ae71af087a3a9dbc9f6', // ETH/USDC
// '0x22ca6d83ab887a535ae1c6011cc36ea9d1255c31', // ETH/USDbC
// '0xf458af2f7dd6c9c1f6f65ab429d0f7bddb05bc4b', // ETH/MOCHI
// '0x72c646067b11e9a7f94043a7f9a7c134db920129', // ETH/AYB
// '0x65488ed876fa62489569abc73b6005a0a3f64150', // ETH/KRAV
// '0xc4876eb31624a51888a2916f2d365b881ba9a8a3', // BRETT
// '0x6ece85052db0e29baf309361db2abfa65ea258bf', // TOSHI
// '0x65488ed876fa62489569abc73b6005a0a3f64150', // KRAV
// '0xa166e14e5bc66656f1514a45877497767506338c', // BALD 2.0
// '0x8efefcb548c9316c2367d6065e33e8d138e4137e', // EDE
// '0x24702ca4a4bedbe17ac5191a461143b542889750', // MEOW

// BLAST
// '0x512f7e46c48b358429e6259fbec74ef6dd3bc565', // ORE/WETH 1
]

const { feeProtocol0, feeProtocol1 } = taskArgs
const { ethers } = hre
Expand All @@ -53,16 +104,87 @@ task('collect', 'Collect')
// 'poolAddresses',
// 'Pool Addresses'
// )
.addParam('amount0Requested', 'Amount 0 Requested', MaxUint128.toString(), types.string)
.addParam('amount1Requested', 'Amount 1 Requested', MaxUint128.toString(), types.string)
.addParam(
'amount0Requested',
'Amount 0 Requested',
MaxUint128.toString(),
types.string,
)
.addParam(
'amount1Requested',
'Amount 1 Requested',
MaxUint128.toString(),
types.string,
)
.setAction(async (taskArgs, hre) => {
const deployer = '0xf87BC5535602077d340806D71f805EA9907a843D'
const poolAddresses: string[] = []
const poolAddresses: string[] = [
// ETHEREUM
// '0x87c7056bbe6084f03304196be51c6b90b6d85aa2', // SUSHI/ETH
// POLYGON
// '0x8cfaab34f5159abf9c35587ac40d09a05dc94765', // USDC.e/USDT
// '0x21988c9cfd08db3b5793c2c6782271dc94749251', // MATIC/USDC.e
// '0x4646e8a5e1d14e2da01577822d6346c7883c6890', // USDC.e/DAI
// '0xf1a12338d39fc085d8631e1a745b5116bc9b2a32', // MATIC/WETH
// '0xc6ba44891cd95efc3929a428242f97bd9b735eb1', // USDC.e/USDC
// '0x0e3eaef09dfe55824a3cda7146a387af261d7824', // USDC/NPM
// '0xff5713fdbad797b81539b5f9766859d4e050a6cc', // SUSHI/WETH
// '0xaabfa6dc0541033c1a2eb685f358d0ea937bb026', // PKR/USDC.e
// '0x1b0585fc8195fc04a46a365e670024dfb63a960c', // USDC.e/WETH
// SCROLL
// '0xae5aa896bb93f4c7c5660b7fc894b3892255d015', // USDC/USDT
// '0xe64ae4128e725868e8fe52e771e3d272e787b041', // USDC/ETH
// '0x08d8b29864348f8d1b7266bf02879c9d0af04eba', // WBTC/ETH
// CORE
// '0x72d8e6d7307dcf11a3456b9f6fdfad05385b2f3e', // CORE/USDT
// ARBITRUM
// '0xb3942c9ffa04efbc1fa746e146be7565c76e3dc1', // ETH/ARB 0.3
// '0xd9e96f78b3c68ba79fd4dfad4ddf4f27bd1e2ecf', // USDT/USDC.e 0.01
// '0x15e444da5b343c5a0931f5d3e85d158d1efc3d40', // ETH/USDC.e 0.05
// '0xcda3b7bec56dbb562453231f142f63d3b00f8eb3', // USDC/USDC.e 0.05
// '0x753d81a2d6c61dd7c3510729c9df310659f9003b', // ZTX/ETH 0.3
// '0xe6ea93ba4ae9ee6520e55affebbdb38ed6c233a4', // ZTX/USDC 0.3
// '0xb3aba1fb17ea51d909938c87f823fdfb0797a49b', // ETH/SUSHI 0.3
// '0xb1aeb76b4e3e628ee54753ad4b8ef68c41e67a9f', // MAGIC/ETH 0.3
// '0x9a528325cc76aec0da05b4a9b5a839fae6edd733', // ETH/SUSHI 1

// BASE
// '0x8e27128839aea978d65e98b28092367ade6048d8', // BEPE/WETH 0.3
// '0x693143e78f4207ef0536620a87e2befa80a46f3f', // BAPE/WETH 1
// '0x41595326aabe6132fc6c7ae71af087a3a9dbc9f6', // ETH/USDC
// '0x22ca6d83ab887a535ae1c6011cc36ea9d1255c31', // ETH/USDbC
// '0xf458af2f7dd6c9c1f6f65ab429d0f7bddb05bc4b', // ETH/MOCHI
// '0x72c646067b11e9a7f94043a7f9a7c134db920129', // ETH/AYB
// '0x65488ed876fa62489569abc73b6005a0a3f64150', // ETH/KRAV
// '0xc4876eb31624a51888a2916f2d365b881ba9a8a3', // BRETT
// '0x6ece85052db0e29baf309361db2abfa65ea258bf', // TOSHI
// '0x23e55d60b685d794ec83d0f9489bc5ce027ebc7b', // TOSHI
// '0x7ca35c2e6ba391ad2adc82413c052f3652d32c14', // LMEOW
// '0x13def4568165d56b42b8259e544b74383f4407d7', // MOCHI
// '0x7aa3bc844710220272d9e14cb4b4bb067953d8ac', // axlUSDC
// '0x5f0a153a64fd734c111b770da11de2c385ca8042', // BALD

//
// '0x5c279b6f7b300570a923ab17cd2f405848b9e5dd', // YOU
// '0x83c52776efe5f60efec721e5b3750993c514f817', // SMUDCAT
// '0x693143e78f4207ef0536620a87e2befa80a46f3f', // BAPE
// '0x54687e4454ba40833898272efea031ac5e9e541a', // BaseF
// '0xade9866a86372ce6ce4ec8562455bc7235037c88', // COIN
// '0x65488ed876fa62489569abc73b6005a0a3f64150', // KRAV
// '0xa166e14e5bc66656f1514a45877497767506338c', // BALD 2.0
// '0x8efefcb548c9316c2367d6065e33e8d138e4137e', // EDE
// '0x24702ca4a4bedbe17ac5191a461143b542889750', // MEOW

// BLAST
// '0x512f7e46c48b358429e6259fbec74ef6dd3bc565', // ORE/WETH 1
]
const { amount0Requested, amount1Requested } = taskArgs
const { ethers } = hre
for (const poolAddress of poolAddresses) {
const pool = await ethers.getContractAt('UniswapV3Pool', poolAddress)
await (await pool.collectProtocol(deployer, amount0Requested, amount1Requested)).wait()
await (
await pool.collectProtocol(deployer, amount0Requested, amount1Requested)
).wait()
console.log(`Fees collected for pool ${poolAddress}`)
}
console.log(`Fees collected for pool addresses ${poolAddresses}`)
Expand Down Expand Up @@ -223,7 +345,7 @@ export default {
saveDeployments: true,
},
filecoin: {
url: 'https://filecoin-mainnet.chainstacklabs.com/rpc/v1',
url: 'https://rpc.ankr.com/filecoin',
accounts,
chainId: 314,
live: true,
Expand Down Expand Up @@ -263,7 +385,21 @@ export default {
chainId: 534352,
live: true,
saveDeployments: true,
}
},
zetachain: {
url: 'https://zetachain-evm.blockpi.network/v1/rpc/public',
accounts,
chainId: 7000,
live: true,
saveDeployments: true,
},
blast: {
url: 'https://rpc.blast.io',
accounts,
chainId: 81457,
live: true,
saveDeployments: true,
},
// ropsten: {
// url: `https://ropsten.infura.io/v3/${process.env.INFURA_API_KEY}`,
// },
Expand Down Expand Up @@ -336,51 +472,60 @@ export default {
browserURL: 'https://andromeda-explorer.metis.io',
},
},
{
network: 'arbitrum-nova',
chainId: 42170,
urls: {
apiURL: 'https://api-nova.arbiscan.io/api',
browserURL: 'https://arbiscan.io',
},
},
],
apiKey: {
mainnet: process.env.ETHERSCAN_API_KEY || '',
ropsten: process.env.ETHERSCAN_API_KEY || '',
rinkeby: process.env.ETHERSCAN_API_KEY || '',
goerli: process.env.ETHERSCAN_API_KEY || '',
kovan: process.env.ETHERSCAN_API_KEY || '',
// binance smart chain
bsc: process.env.BSCSCAN_API_KEY || '',
bscTestnet: process.env.BSCSCAN_API_KEY || '',
// huobi eco chain
heco: process.env.HECOINFO_API_KEY || '',
hecoTestnet: process.env.HECOINFO_API_KEY || '',
// fantom mainnet
opera: process.env.FTMSCAN_API_KEY || '',
ftmTestnet: process.env.FTMSCAN_API_KEY || '',
// optimism
optimisticEthereum: process.env.OPTIMISTIC_ETHERSCAN_API_KEY || '',
optimisticKovan: process.env.OPTIMISTIC_ETHERSCAN_API_KEY || '',
// polygon
polygon: process.env.POLYGONSCAN_API_KEY || '',
polygonMumbai: process.env.POLYGONSCAN_API_KEY || '',
// arbitrum
arbitrumOne: process.env.ARBISCAN_API_KEY || '',
arbitrumTestnet: process.env.ARBISCAN_API_KEY || '',
// avalanche
avalanche: process.env.SNOWTRACE_API_KEY || '',
avalancheFujiTestnet: process.env.SNOWTRACE_API_KEY || '',
// moonbeam
moonbeam: process.env.MOONBEAM_MOONSCAN_API_KEY || '',
moonriver: process.env.MOONRIVER_MOONSCAN_API_KEY || '',
moonbaseAlpha: process.env.MOONBASE_MOONSCAN_API_KEY || '',
// harmony
harmony: process.env.HARMONY_API_KEY || '',
harmonyTest: process.env.HARMONY_API_KEY || '',
// xdai and sokol don't need an API key, but you still need
// to specify one; any string placeholder will work
xdai: 'api-key',
sokol: 'api-key',
aurora: 'api-key',
auroraTestnet: 'api-key',
metis: 'api-key',
// bobaAvax: 'api-key',
bttc: process.env.BTTC_API_KEY || '',
gnosis: process.env.GNOSIS_API_KEY || '',
'arbitrum-nova': '51WQTEN9E1G6191V8MWC5ZGBNWKSBKY2FB',
// mainnet: process.env.ETHERSCAN_API_KEY || '',
// ropsten: process.env.ETHERSCAN_API_KEY || '',
// rinkeby: process.env.ETHERSCAN_API_KEY || '',
// goerli: process.env.ETHERSCAN_API_KEY || '',
// kovan: process.env.ETHERSCAN_API_KEY || '',
// // binance smart chain
// bsc: process.env.BSCSCAN_API_KEY || '',
// bscTestnet: process.env.BSCSCAN_API_KEY || '',
// // huobi eco chain
// heco: process.env.HECOINFO_API_KEY || '',
// hecoTestnet: process.env.HECOINFO_API_KEY || '',
// // fantom mainnet
// opera: process.env.FTMSCAN_API_KEY || '',
// ftmTestnet: process.env.FTMSCAN_API_KEY || '',
// // optimism
// optimisticEthereum: process.env.OPTIMISTIC_ETHERSCAN_API_KEY || '',
// optimisticKovan: process.env.OPTIMISTIC_ETHERSCAN_API_KEY || '',
// // polygon
// polygon: process.env.POLYGONSCAN_API_KEY || '',
// polygonMumbai: process.env.POLYGONSCAN_API_KEY || '',
// // arbitrum
// arbitrumOne: process.env.ARBISCAN_API_KEY || '',
// arbitrumTestnet: process.env.ARBISCAN_API_KEY || '',
// // avalanche
// avalanche: process.env.SNOWTRACE_API_KEY || '',
// avalancheFujiTestnet: process.env.SNOWTRACE_API_KEY || '',
// // moonbeam
// moonbeam: process.env.MOONBEAM_MOONSCAN_API_KEY || '',
// moonriver: process.env.MOONRIVER_MOONSCAN_API_KEY || '',
// moonbaseAlpha: process.env.MOONBASE_MOONSCAN_API_KEY || '',
// // harmony
// harmony: process.env.HARMONY_API_KEY || '',
// harmonyTest: process.env.HARMONY_API_KEY || '',
// // xdai and sokol don't need an API key, but you still need
// // to specify one; any string placeholder will work
// xdai: 'api-key',
// sokol: 'api-key',
// aurora: 'api-key',
// auroraTestnet: 'api-key',
// metis: 'api-key',
// // bobaAvax: 'api-key',
// bttc: process.env.BTTC_API_KEY || '',
// gnosis: process.env.GNOSIS_API_KEY || '',
},
},
solidity: {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"dependencies": {},
"devDependencies": {
"@nomiclabs/hardhat-ethers": "2.2.2",
"@nomiclabs/hardhat-etherscan": "^2.1.8",
"@nomiclabs/hardhat-etherscan": "3.1.7",
"@nomiclabs/hardhat-waffle": "^2.0.1",
"@typechain/ethers-v5": "^4.0.0",
"@types/chai": "^4.2.6",
Expand Down
Loading

0 comments on commit 246675d

Please sign in to comment.