-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 Fix Infura endpoint mapping for ERC115 integration
- Loading branch information
1 parent
962e731
commit 134f1b4
Showing
7 changed files
with
56 additions
and
30 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
/** | ||
* Map filtered Infura network to an Infura endpoint value. | ||
* | ||
* @param string $filtered_network Filtered Infura network. | ||
* | ||
* @return string Infura endpoint or default | ||
*/ | ||
function map_filtered_network_to_infura_endpoint( string $filtered_network ): string { | ||
$overrides = [ | ||
'arbitrum' => 'arbitrum-mainnet', | ||
'arbitrumGoerli' => 'arbitrum-goerli', | ||
'arbitrumSepolia' => 'arbitrum-sepolia', | ||
'optimism' => 'optimism-mainnet', | ||
'optimismGoerli' => 'optimism-goerli', | ||
'optimismSepolia' => 'optimism-sepolia', | ||
'polygon' => 'polygon-mainnet', | ||
'polygonMumbai' => 'polygon-mumbai', | ||
]; | ||
if ( ! empty( $overrides[ $filtered_network ] ) ) { | ||
return $overrides[ $filtered_network ]; | ||
} | ||
|
||
return $filtered_network; | ||
} |
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
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