switching from network-specific Alchemy keys 🛰️

This commit is contained in:
dysbulic
2024-06-10 22:53:25 -04:00
committed by δυς
parent d4284ef814
commit ac005d169f
5 changed files with 10 additions and 8 deletions

View File

@@ -54,7 +54,7 @@ jobs:
steps:
- name: Cancel Existing Runs
uses: styfle/cancel-workflow-action@0.10.0
uses: styfle/cancel-workflow-action@0.12.0
with:
access_token: ${{github.token}}

View File

@@ -59,7 +59,7 @@ jobs:
steps:
- name: Cancel Existing Runs
uses: styfle/cancel-workflow-action@0.10.0
uses: styfle/cancel-workflow-action@0.12.0
with:
access_token: ${{github.token}}

View File

@@ -55,6 +55,7 @@ ARG GCAL_CALENDAR_ID
ARG GCAL_PRIVATE_KEY
ARG GCAL_CLIENT_EMAIL
ARG GCAL_PROJECT_NUMBER
ARG ALCHEMY_API_KEY
ARG WEB3_STORAGE_DID
ARG WEB3_STORAGE_KEY
ARG WEB3_STORAGE_PROOF
@@ -72,6 +73,7 @@ ENV NEXT_PUBLIC_GOOGLE_ANALYTICS_ID $GOOGLE_ANALYTICS_ID
ENV NEXT_PUBLIC_USERBACK_TOKEN $USERBACK_TOKEN
ENV NEXT_PUBLIC_CERAMIC_URL $CERAMIC_URL
ENV NEXT_PUBLIC_GCAL_CALENDAR_ID $GCAL_CALENDAR_ID
ENV NEXT_PUBLIC_ALCHEMY_API_KEY $ALCHEMY_API_KEY
ENV NEXT_PUBLIC_WEB3_STORAGE_DID $WEB3_STORAGE_DID
ENV NEXT_PUBLIC_WEB3_STORAGE_KEY $WEB3_STORAGE_KEY
ENV NEXT_PUBLIC_WEB3_STORAGE_PROOF $WEB3_STORAGE_PROOF

View File

@@ -23,13 +23,13 @@ const config = createConfig(
chains: [optimism, polygon, mainnet],
transports: {
[optimism.id]: http(
`https://opt-mainnet.g.alchemy.com/v2/${process.env.NEXT_PUBLIC_ALCHEMY_API_KEY}`,
`https://opt-mainnet.g.alchemy.com/v2/${CONFIG.alchemyAPIKey}`,
),
[mainnet.id]: http(
`https://eth-mainnet.g.alchemy.com/v2/${process.env.NEXT_PUBLIC_ALCHEMY_API_KEY}`,
`https://eth-mainnet.g.alchemy.com/v2/${CONFIG.alchemyAPIKey}`,
),
[polygon.id]: http(
`https://polygon-mainnet.g.alchemy.com/v2/${process.env.NEXT_PUBLIC_ALCHEMY_API_KEY}`,
`https://polygon-mainnet.g.alchemy.com/v2/${CONFIG.alchemyAPIKey}`,
),
},

View File

@@ -25,7 +25,7 @@ export const NETWORK_INFO: NetworkInfo = {
label: 'Ethereum',
symbol: 'ETH',
explorer: 'https://etherscan.io',
rpc: `https://eth-mainnet.g.alchemy.com/v2/${process.env.NEXT_PUBLIC_ALCHEMY_MAINNET}`,
rpc: `https://eth-mainnet.g.alchemy.com/v2/${CONFIG.alchemyAPIKey}`,
},
[GOERLI]: {
chainId: GOERLI,
@@ -49,7 +49,7 @@ export const NETWORK_INFO: NetworkInfo = {
label: 'Polygon',
symbol: 'MATIC',
explorer: 'https://polygonscan.com',
rpc: `https://eth-mainnet.g.alchemy.com/v2/${process.env.NEXT_PUBLIC_ALCHEMY_MATIC}`,
rpc: `https://polygon-mainnet.g.alchemy.com/v2/${CONFIG.alchemyAPIKey}`,
},
[MUMBAI]: {
chainId: MUMBAI,
@@ -84,4 +84,4 @@ export function getHexChainId(chain?: string): string {
}
}
export const getNumberId = (chainId: string): number => parseInt(chainId, 16)
export const getNumberId = (chainId: string): number => Number(chainId);