-
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.
Merge pull request #60 from davisshaver/custom-rpc-classnames
✨ Add custom RPC options and Base/Zora support
- Loading branch information
Showing
19 changed files
with
3,345 additions
and
2,664 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 @@ | ||
18 |
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
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,25 +1,31 @@ | ||
<?php | ||
/** | ||
* General purpose functions file | ||
* | ||
* @package WP_Rainbow | ||
*/ | ||
|
||
/** | ||
* 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 ]; | ||
} | ||
function wp_rainbow_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; | ||
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
Oops, something went wrong.