-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🧑💻 Was added the contracts depend of the network
- Loading branch information
Showing
9 changed files
with
1,379 additions
and
8 deletions.
There are no files selected for viewing
File renamed without changes.
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,38 @@ | ||
import meetdAppFactoryJsonMumbai from '@/assets/deployments/mumbai/MeetdAppFactory.json' | ||
import meetdAppEventJsonMumbai from '@/assets/deployments/mumbai/MeetdAppEvent.json' | ||
import meetdAppNFTJsonMumbai from '@/assets/deployments/mumbai/MeetdAppNFT.json' | ||
import meetdAppFactoryJsonPolygon from '@/assets/deployments/polygon/MeetdAppFactory.json' | ||
import meetdAppEventJsonPolygon from '@/assets/deployments/polygon/MeetdAppEvent.json' | ||
import meetdAppNFTJsonPolygon from '@/assets/deployments/polygon/MeetdAppNFT.json' | ||
|
||
interface ContractsJson { | ||
meetdAppFactory: | ||
| typeof meetdAppFactoryJsonPolygon | ||
| typeof meetdAppFactoryJsonMumbai | ||
meetdAppEvent: | ||
| typeof meetdAppEventJsonPolygon | ||
| typeof meetdAppEventJsonMumbai | ||
meetdAppNFT: typeof meetdAppNFTJsonPolygon | typeof meetdAppNFTJsonMumbai | ||
} | ||
|
||
export const CHAINID = process.env.NEXT_PUBLIC_CHAIN_ID | ||
export const PROVIDER = process.env.NEXT_PUBLIC_ALCHEMY_API_KEY | ||
export const SCAN = ( | ||
address: string, | ||
scan: string | undefined = process.env.NEXT_PUBLIC_EVM_EXPLORER | ||
) => `${scan}/${address}` | ||
|
||
export const CONTRACTS_JSON = (): ContractsJson => { | ||
if (process.env.NEXT_PUBLIC_ENABLE_TESTNETS === 'true') { | ||
return { | ||
meetdAppEvent: meetdAppEventJsonMumbai, | ||
meetdAppFactory: meetdAppFactoryJsonMumbai, | ||
meetdAppNFT: meetdAppNFTJsonMumbai | ||
} | ||
} | ||
return { | ||
meetdAppEvent: meetdAppEventJsonPolygon, | ||
meetdAppFactory: meetdAppFactoryJsonPolygon, | ||
meetdAppNFT: meetdAppNFTJsonPolygon | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters