forked from MetaMask/template-snap-monorepo
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
frankcrypto
committed
Aug 20, 2024
1 parent
c0b6d24
commit 8770d96
Showing
7 changed files
with
193 additions
and
84 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { networks } from 'qitmeerts'; | ||
import type { NetworkConfig } from 'qitmeerts/dist/src/networks'; | ||
|
||
export type Config = { | ||
entryPointAddress: string; | ||
factoryAddress: string; | ||
proxyUrl: string; | ||
networkConf: NetworkConfig; | ||
}; | ||
|
||
export const PrivateConfig: Config = { | ||
entryPointAddress: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789', | ||
factoryAddress: '0x9406cc6185a346906296840746125a0e44976454', | ||
proxyUrl: 'http://127.0.0.1:8081', | ||
networkConf: networks.privnet, | ||
}; | ||
|
||
export const TestConfig: Config = { | ||
entryPointAddress: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789', | ||
factoryAddress: '0x9406cc6185a346906296840746125a0e44976454', | ||
proxyUrl: 'http://146.196.54.208:2234', | ||
networkConf: networks.testnet, | ||
}; | ||
export const MixConfig: Config = { | ||
entryPointAddress: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789', | ||
factoryAddress: '0x9406cc6185a346906296840746125a0e44976454', | ||
proxyUrl: 'http://127.0.0.1:8081', | ||
networkConf: networks.mixnet, | ||
}; | ||
export const MainConfig: Config = { | ||
entryPointAddress: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789', | ||
factoryAddress: '0x9406cc6185a346906296840746125a0e44976454', | ||
proxyUrl: 'http://127.0.0.1:8081', | ||
networkConf: networks.mainnet, | ||
}; | ||
|
||
export const getConfig = (chainId: number): Config => { | ||
switch (chainId) { | ||
case 813: | ||
return MainConfig; | ||
case 8131: | ||
return TestConfig; | ||
case 8132: | ||
return MixConfig; | ||
default: | ||
return PrivateConfig; | ||
} | ||
}; |
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
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
Oops, something went wrong.