(chain = SameOrCrossChain.same)
| 13 | * @returns The ethers provider connected to the provider URL specified in the "integration-info.json". |
| 14 | */ |
| 15 | export const getProvider = (chain = SameOrCrossChain.same) => { |
| 16 | const integrationInfo = readIntegrationInfo(); |
| 17 | const providerUrl = |
| 18 | chain === SameOrCrossChain.cross ? integrationInfo.crossChainProviderUrl! : integrationInfo.providerUrl; |
| 19 | const provider = new ethers.providers.JsonRpcProvider(providerUrl); |
| 20 | return provider; |
| 21 | }; |
| 22 | |
| 23 | /** |
| 24 | * Reads the mnemonic and provider URL from "integration-info.json" and returns the connected wallet. |
no test coverage detected