Skip to content

Commit

Permalink
add holesky to constants; default publicnode.com for rpc
Browse files Browse the repository at this point in the history
  • Loading branch information
dmosites committed Jan 13, 2024
1 parent a0fd2b7 commit 9a66004
Show file tree
Hide file tree
Showing 13 changed files with 41 additions and 20 deletions.
17 changes: 11 additions & 6 deletions hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ const {
*/
module.exports = {
networks: {
goerli: {
url: apiUrls[ChainIds.GOERLI] + '/' + process.env.INFURA_API_KEY,
mainnet: {
url: apiUrls[ChainIds.MAINNET],
accounts: process.env.PRIVATE_KEY ? [process.env.PRIVATE_KEY] : undefined,
},
mainnet: {
url: apiUrls[ChainIds.MAINNET] + '/' + process.env.INFURA_API_KEY,
goerli: {
url: apiUrls[ChainIds.GOERLI],
accounts: process.env.PRIVATE_KEY ? [process.env.PRIVATE_KEY] : undefined,
},
bsctestnet: {
Expand Down Expand Up @@ -71,7 +71,7 @@ module.exports = {
accounts: process.env.PRIVATE_KEY ? [process.env.PRIVATE_KEY] : undefined,
},
linea: {
url: apiUrls[ChainIds.LINEA] + '/' + process.env.INFURA_API_KEY,
url: apiUrls[ChainIds.LINEA],
accounts: process.env.PRIVATE_KEY ? [process.env.PRIVATE_KEY] : undefined,
},
basegoerli: {
Expand All @@ -91,7 +91,11 @@ module.exports = {
accounts: process.env.PRIVATE_KEY ? [process.env.PRIVATE_KEY] : undefined,
},
sepolia: {
url: apiUrls[ChainIds.SEPOLIA] + '/' + process.env.INFURA_API_KEY,
url: apiUrls[ChainIds.SEPOLIA],
accounts: process.env.PRIVATE_KEY ? [process.env.PRIVATE_KEY] : undefined,
},
holesky: {
url: apiUrls[ChainIds.HOLESKY],
accounts: process.env.PRIVATE_KEY ? [process.env.PRIVATE_KEY] : undefined,
},
},
Expand Down Expand Up @@ -137,6 +141,7 @@ module.exports = {
arbitrumGoerli: process.env.ARBISCAN_API_KEY,
avalanche: process.env.SNOWTRACE_API_KEY,
avalancheFujiTestnet: process.env.SNOWTRACE_API_KEY,
holesky: process.env.ETHERSCAN_API_KEY,
polygonMumbai: process.env.POLYGONSCAN_API_KEY,
linea: process.env.LINEASCAN_API_KEY,
lineagoerli: process.env.LINEASCAN_API_KEY,
Expand Down
2 changes: 1 addition & 1 deletion source/batch-call/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@airswap/swap-erc20": "4.1.7-beta.0"
},
"devDependencies": {
"@airswap/constants": "4.1.9-beta.0",
"@airswap/constants": "4.1.9-beta.1",
"@airswap/utils": "4.1.12",
"prompt-confirm": "^2.0.4"
},
Expand Down
2 changes: 1 addition & 1 deletion source/pool/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@openzeppelin/contracts": "^4.8.3"
},
"devDependencies": {
"@airswap/constants": "4.1.9-beta.0",
"@airswap/constants": "4.1.9-beta.1",
"@airswap/metadata": "4.1.15",
"@airswap/types": "4.1.3",
"@airswap/utils": "4.1.12",
Expand Down
2 changes: 1 addition & 1 deletion source/registry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"access": "public"
},
"devDependencies": {
"@airswap/constants": "4.1.9-beta.0",
"@airswap/constants": "4.1.9-beta.1",
"@airswap/utils": "4.1.12",
"prompt-confirm": "^2.0.4"
}
Expand Down
7 changes: 7 additions & 0 deletions source/staking/scripts/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ module.exports = {
stakingDuration: 60 * 60, // 1 HOUR
minDurationChangeDelay: 60, // 1 MINUTE
},
[ChainIds.HOLESKY]: {
name: 'Staked AST (Holesky)',
symbol: 'sAST (Holesky)',
stakingToken: stakingTokenAddresses[ChainIds.HOLESKY],
stakingDuration: 60 * 60, // 1 HOUR
minDurationChangeDelay: 60, // 1 MINUTE
},
[ChainIds.SEPOLIA]: {
name: 'Staked AST (Sepolia)',
symbol: 'sAST (Sepolia)',
Expand Down
2 changes: 1 addition & 1 deletion source/swap-erc20/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@openzeppelin/contracts": "^4.8.3"
},
"devDependencies": {
"@airswap/constants": "4.1.9-beta.0",
"@airswap/constants": "4.1.9-beta.1",
"@airswap/staking": "4.1.0-beta.0",
"@airswap/types": "4.1.3",
"@airswap/utils": "4.1.12",
Expand Down
2 changes: 1 addition & 1 deletion source/swap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@openzeppelin/contracts": "^4.8.3"
},
"devDependencies": {
"@airswap/constants": "4.1.9-beta.0",
"@airswap/constants": "4.1.9-beta.1",
"@airswap/types": "4.1.3",
"@airswap/utils": "4.1.12",
"@nomicfoundation/hardhat-network-helpers": "^1.0.7"
Expand Down
2 changes: 1 addition & 1 deletion source/wrapper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@openzeppelin/contracts": "^4.8.3"
},
"devDependencies": {
"@airswap/constants": "4.1.9-beta.0",
"@airswap/constants": "4.1.9-beta.1",
"@airswap/utils": "4.1.12",
"@airswap/types": "4.1.3",
"@uniswap/v2-periphery": "^1.1.0-beta.0",
Expand Down
17 changes: 13 additions & 4 deletions tools/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export enum ChainIds {
BSCTESTNET = 97,
POLYGON = 137,
BASE = 8453,
HOLESKY = 17000,
HARDHAT = 31337,
ARBITRUM = 42161,
FUJI = 43113,
Expand Down Expand Up @@ -47,6 +48,7 @@ export const testnets: number[] = [
ChainIds.RSKTESTNET,
ChainIds.TELOSTESTNET,
ChainIds.BSCTESTNET,
ChainIds.HOLESKY,
ChainIds.HARDHAT,
ChainIds.FUJI,
ChainIds.LINEAGOERLI,
Expand All @@ -67,6 +69,7 @@ export const chainLabels: Record<number, string> = {
[ChainIds.BSCTESTNET]: 'BSCTESTNET',
[ChainIds.POLYGON]: 'POLYGON',
[ChainIds.BASE]: 'BASE',
[ChainIds.HOLESKY]: 'HOLESKY',
[ChainIds.HARDHAT]: 'HARDHAT',
[ChainIds.ARBITRUM]: 'ARBITRUM',
[ChainIds.FUJI]: 'FUJI',
Expand All @@ -90,6 +93,7 @@ export const chainNames: Record<number, string> = {
[ChainIds.BSCTESTNET]: 'BSC Testnet',
[ChainIds.POLYGON]: 'Polygon',
[ChainIds.BASE]: 'Base',
[ChainIds.HOLESKY]: 'Holesky',
[ChainIds.HARDHAT]: 'Hardhat',
[ChainIds.ARBITRUM]: 'Arbitrum',
[ChainIds.FUJI]: 'Fuji Testnet',
Expand All @@ -113,6 +117,7 @@ export const chainCurrencies: Record<number, string> = {
[ChainIds.BSCTESTNET]: 'BNB',
[ChainIds.POLYGON]: 'MATIC',
[ChainIds.BASE]: 'ETH',
[ChainIds.HOLESKY]: 'HoleskyETH',
[ChainIds.HARDHAT]: 'ETH',
[ChainIds.ARBITRUM]: 'AETH',
[ChainIds.FUJI]: 'AVAX',
Expand All @@ -136,6 +141,7 @@ export const currencyIcons: Record<number, number> = {
[ChainIds.BSCTESTNET]: ChainIds.BSC,
[ChainIds.POLYGON]: ChainIds.POLYGON,
[ChainIds.BASE]: ChainIds.MAINNET,
[ChainIds.HOLESKY]: ChainIds.MAINNET,
[ChainIds.ARBITRUM]: ChainIds.MAINNET,
[ChainIds.FUJI]: ChainIds.AVALANCHE,
[ChainIds.AVALANCHE]: ChainIds.AVALANCHE,
Expand All @@ -148,8 +154,8 @@ export const currencyIcons: Record<number, number> = {
}

export const apiUrls: Record<number, string> = {
[ChainIds.MAINNET]: 'https://mainnet.infura.io/v3',
[ChainIds.GOERLI]: 'https://goerli.infura.io/v3',
[ChainIds.MAINNET]: 'https://ethereum.publicnode.com',
[ChainIds.GOERLI]: 'https://ethereum-goerli.publicnode.com',
[ChainIds.RSK]: 'https://public-node.rsk.co',
[ChainIds.RSKTESTNET]: 'https://public-node.testnet.rsk.co',
[ChainIds.TELOS]: 'https://mainnet.telos.net/evm',
Expand All @@ -158,15 +164,16 @@ export const apiUrls: Record<number, string> = {
[ChainIds.BSCTESTNET]: 'https://data-seed-prebsc-1-s1.binance.org:8545',
[ChainIds.POLYGON]: 'https://polygon-rpc.com',
[ChainIds.BASE]: 'https://mainnet.base.org',
[ChainIds.HOLESKY]: 'https://ethereum-holesky.publicnode.com',
[ChainIds.ARBITRUM]: 'https://arb1.arbitrum.io/rpc',
[ChainIds.FUJI]: 'https://api.avax-test.network/ext/bc/C/rpc',
[ChainIds.AVALANCHE]: 'https://api.avax.network/ext/bc/C/rpc',
[ChainIds.LINEAGOERLI]: 'https://rpc.goerli.linea.build',
[ChainIds.LINEA]: 'https://linea-mainnet.infura.io/v3',
[ChainIds.LINEA]: 'https://rpc.linea.build',
[ChainIds.MUMBAI]: 'https://rpc-mumbai.maticvigil.com',
[ChainIds.BASEGOERLI]: 'https://goerli.base.org',
[ChainIds.ARBITRUMGOERLI]: 'https://goerli-rollup.arbitrum.io/rpc',
[ChainIds.SEPOLIA]: 'https://sepolia.infura.io/v3',
[ChainIds.SEPOLIA]: 'https://ethereum-sepolia.publicnode.com',
}

export const explorerUrls: Record<number, string> = {
Expand All @@ -180,6 +187,7 @@ export const explorerUrls: Record<number, string> = {
[ChainIds.BSCTESTNET]: 'https://testnet.bscscan.com',
[ChainIds.POLYGON]: 'https://polygonscan.com',
[ChainIds.BASE]: 'https://basescan.org',
[ChainIds.HOLESKY]: 'https://holesky.etherscan.io/',
[ChainIds.ARBITRUM]: 'https://arbiscan.io',
[ChainIds.FUJI]: 'https://testnet.snowtrace.io',
[ChainIds.AVALANCHE]: 'https://snowtrace.io',
Expand All @@ -205,6 +213,7 @@ export const stakingTokenAddresses: Record<number, string> = {
[ChainIds.MAINNET]: '0x27054b13b1b798b345b591a4d22e6562d47ea75a',
[ChainIds.GOERLI]: '0x23474e94e27ac59eec4411ce96c322add8833680',
[ChainIds.SEPOLIA]: '0x517d482f686f11b922eed764692f2b42663ce2fa',
[ChainIds.HOLESKY]: '0x71070c5607358fc25E3B4aaf4FB0a580c190252a',
}

export const ownerAddresses: Record<number, string> = {
Expand Down
2 changes: 1 addition & 1 deletion tools/constants/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@airswap/constants",
"version": "4.1.9-beta.0",
"version": "4.1.9-beta.1",
"description": "AirSwap: Constants for Developers",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion tools/libraries/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"dependencies": {
"@airswap/batch-call": "4.1.0-beta.0",
"@airswap/constants": "4.1.9-beta.0",
"@airswap/constants": "4.1.9-beta.1",
"@airswap/jsonrpc-client-websocket": "0.0.1",
"@airswap/registry": "4.1.3",
"@airswap/pool": "4.1.4",
Expand Down
2 changes: 1 addition & 1 deletion tools/metadata/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"test": "TS_NODE_COMPILER_OPTIONS='{\"strict\":false}' yarn mocha -r ts-node/esm test/*.ts"
},
"dependencies": {
"@airswap/constants": "4.1.9-beta.0",
"@airswap/constants": "4.1.9-beta.1",
"@airswap/types": "4.1.3",
"@airswap/wrapper": "4.1.6-beta.0",
"@openzeppelin/contracts": "^4.8.3",
Expand Down
2 changes: 1 addition & 1 deletion tools/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"test:ci": "yarn test"
},
"dependencies": {
"@airswap/constants": "4.1.9-beta.0",
"@airswap/constants": "4.1.9-beta.1",
"@airswap/types": "4.1.3",
"@metamask/eth-sig-util": "^5.0.2",
"bignumber.js": "^9.0.1",
Expand Down

0 comments on commit 9a66004

Please sign in to comment.