Changeset 3036124
- Timestamp:
- 02/15/2024 09:47:07 AM (2 years ago)
- Location:
- rainbowkit-login-web3-integration-for-sign-in-with-ethereum
- Files:
-
- 2 added
- 10 edited
- 1 copied
-
tags/0.4.6 (copied) (copied from rainbowkit-login-web3-integration-for-sign-in-with-ethereum/trunk)
-
tags/0.4.6/inc/class-wp-rainbow-login-functionality.php (modified) (2 diffs)
-
tags/0.4.6/inc/functions.php (added)
-
tags/0.4.6/plugins/class-wp-rainbow-plugins-erc-1155-roles.php (modified) (1 diff)
-
tags/0.4.6/readme.txt (modified) (2 diffs)
-
tags/0.4.6/vendor/composer/installed.php (modified) (2 diffs)
-
tags/0.4.6/wp-rainbow.php (modified) (2 diffs)
-
trunk/inc/class-wp-rainbow-login-functionality.php (modified) (2 diffs)
-
trunk/inc/functions.php (added)
-
trunk/plugins/class-wp-rainbow-plugins-erc-1155-roles.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
-
trunk/wp-rainbow.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
rainbowkit-login-web3-integration-for-sign-in-with-ethereum/tags/0.4.6/inc/class-wp-rainbow-login-functionality.php
r3035005 r3036124 222 222 223 223 /** 224 * Map filtered Infura network to an Infura endpoint value.225 *226 * @param string $filtered_network Filtered Infura network.227 *228 * @return string Infura endpoint or default229 */230 private function map_filtered_network_to_infura_endpoint( string $filtered_network ): string {231 $overrides = [232 'arbitrum' => 'arbitrum-mainnet',233 'arbitrumGoerli' => 'arbitrum-goerli',234 'arbitrumSepolia' => 'arbitrum-sepolia',235 'optimism' => 'optimism-mainnet',236 'optimismGoerli' => 'optimism-goerli',237 'optimismSepolia' => 'optimism-sepolia',238 'polygon' => 'polygon-mainnet',239 'polygonMumbai' => 'polygon-mumbai',240 ];241 if ( ! empty( $overrides[ $filtered_network ] ) ) {242 return $overrides[ $filtered_network ];243 }244 245 return $filtered_network;246 }247 248 /**249 224 * Validates Log In with Ethereum request. 250 225 * … … 322 297 323 298 $example_abi = '[{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"}]'; 324 $contract = new Contract( 'https://' . $this->map_filtered_network_to_infura_endpoint( $filtered_infura_network ) . '.infura.io/v3/' . $filtered_infura_id, $example_abi );299 $contract = new Contract( 'https://' . map_filtered_network_to_infura_endpoint( $filtered_infura_network ) . '.infura.io/v3/' . $filtered_infura_id, $example_abi ); 325 300 $contract->at( $wp_rainbow_options['wp_rainbow_field_required_token'] )->call( 326 301 'balanceOf', -
rainbowkit-login-web3-integration-for-sign-in-with-ethereum/tags/0.4.6/plugins/class-wp-rainbow-plugins-erc-1155-roles.php
r2839828 r3036124 63 63 $erc1155_abi = '[{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]'; 64 64 $erc1155_role = ''; 65 $contract = new Contract( 'https://' . $filtered_infura_network. '.infura.io/v3/' . $filtered_infura_id, $erc1155_abi );65 $contract = new Contract( 'https://' . map_filtered_network_to_infura_endpoint( $filtered_infura_network ) . '.infura.io/v3/' . $filtered_infura_id, $erc1155_abi ); 66 66 $wp_rainbow_options = get_option( 67 67 'wp_rainbow_options', -
rainbowkit-login-web3-integration-for-sign-in-with-ethereum/tags/0.4.6/readme.txt
r3035005 r3036124 5 5 Requires at least: 5.9 6 6 Requires PHP: 7.0 7 Stable tag: 0.4. 57 Stable tag: 0.4.6 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 70 70 71 71 == Changelog == 72 73 = 0.4.6 = 74 * Fix bug with Infura endpoint mapping 72 75 73 76 = 0.4.5 = -
rainbowkit-login-web3-integration-for-sign-in-with-ethereum/tags/0.4.6/vendor/composer/installed.php
r3035005 r3036124 2 2 'root' => array( 3 3 'name' => 'wp-rainbow/wp-rainbow', 4 'pretty_version' => 'v0.4. 5',5 'version' => '0.4. 5.0',6 'reference' => ' 962e731f3b34c81ddb9cab0b593dad66c069ad54',4 'pretty_version' => 'v0.4.6', 5 'version' => '0.4.6.0', 6 'reference' => 'c13ab4f015b86990fdc9e3627c6483ad8e7acb1c', 7 7 'type' => 'project', 8 8 'install_path' => __DIR__ . '/../../', … … 167 167 ), 168 168 'wp-rainbow/wp-rainbow' => array( 169 'pretty_version' => 'v0.4. 5',170 'version' => '0.4. 5.0',171 'reference' => ' 962e731f3b34c81ddb9cab0b593dad66c069ad54',169 'pretty_version' => 'v0.4.6', 170 'version' => '0.4.6.0', 171 'reference' => 'c13ab4f015b86990fdc9e3627c6483ad8e7acb1c', 172 172 'type' => 'project', 173 173 'install_path' => __DIR__ . '/../../', -
rainbowkit-login-web3-integration-for-sign-in-with-ethereum/tags/0.4.6/wp-rainbow.php
r3035005 r3036124 11 11 * Plugin URI: https://wp-rainbow.davisshaver.com/ 12 12 * Description: RainbowKit Login allows WordPress users to log in with Ethereum using the Sign-In With Ethereum standard, powered by RainbowKit. 13 * Version: 0.4. 513 * Version: 0.4.6 14 14 * Author: Davis Shaver 15 15 * Author URI: https://davisshaver.com/ … … 41 41 ); 42 42 43 // Require the helper functions. 44 require_once __DIR__ . '/inc/functions.php'; 45 43 46 // Require the main class. 44 47 require_once __DIR__ . '/inc/class-wp-rainbow.php'; -
rainbowkit-login-web3-integration-for-sign-in-with-ethereum/trunk/inc/class-wp-rainbow-login-functionality.php
r3035005 r3036124 222 222 223 223 /** 224 * Map filtered Infura network to an Infura endpoint value.225 *226 * @param string $filtered_network Filtered Infura network.227 *228 * @return string Infura endpoint or default229 */230 private function map_filtered_network_to_infura_endpoint( string $filtered_network ): string {231 $overrides = [232 'arbitrum' => 'arbitrum-mainnet',233 'arbitrumGoerli' => 'arbitrum-goerli',234 'arbitrumSepolia' => 'arbitrum-sepolia',235 'optimism' => 'optimism-mainnet',236 'optimismGoerli' => 'optimism-goerli',237 'optimismSepolia' => 'optimism-sepolia',238 'polygon' => 'polygon-mainnet',239 'polygonMumbai' => 'polygon-mumbai',240 ];241 if ( ! empty( $overrides[ $filtered_network ] ) ) {242 return $overrides[ $filtered_network ];243 }244 245 return $filtered_network;246 }247 248 /**249 224 * Validates Log In with Ethereum request. 250 225 * … … 322 297 323 298 $example_abi = '[{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"}]'; 324 $contract = new Contract( 'https://' . $this->map_filtered_network_to_infura_endpoint( $filtered_infura_network ) . '.infura.io/v3/' . $filtered_infura_id, $example_abi );299 $contract = new Contract( 'https://' . map_filtered_network_to_infura_endpoint( $filtered_infura_network ) . '.infura.io/v3/' . $filtered_infura_id, $example_abi ); 325 300 $contract->at( $wp_rainbow_options['wp_rainbow_field_required_token'] )->call( 326 301 'balanceOf', -
rainbowkit-login-web3-integration-for-sign-in-with-ethereum/trunk/plugins/class-wp-rainbow-plugins-erc-1155-roles.php
r2839828 r3036124 63 63 $erc1155_abi = '[{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]'; 64 64 $erc1155_role = ''; 65 $contract = new Contract( 'https://' . $filtered_infura_network. '.infura.io/v3/' . $filtered_infura_id, $erc1155_abi );65 $contract = new Contract( 'https://' . map_filtered_network_to_infura_endpoint( $filtered_infura_network ) . '.infura.io/v3/' . $filtered_infura_id, $erc1155_abi ); 66 66 $wp_rainbow_options = get_option( 67 67 'wp_rainbow_options', -
rainbowkit-login-web3-integration-for-sign-in-with-ethereum/trunk/readme.txt
r3035005 r3036124 5 5 Requires at least: 5.9 6 6 Requires PHP: 7.0 7 Stable tag: 0.4. 57 Stable tag: 0.4.6 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 70 70 71 71 == Changelog == 72 73 = 0.4.6 = 74 * Fix bug with Infura endpoint mapping 72 75 73 76 = 0.4.5 = -
rainbowkit-login-web3-integration-for-sign-in-with-ethereum/trunk/vendor/composer/installed.php
r3035005 r3036124 2 2 'root' => array( 3 3 'name' => 'wp-rainbow/wp-rainbow', 4 'pretty_version' => 'v0.4. 5',5 'version' => '0.4. 5.0',6 'reference' => ' 962e731f3b34c81ddb9cab0b593dad66c069ad54',4 'pretty_version' => 'v0.4.6', 5 'version' => '0.4.6.0', 6 'reference' => 'c13ab4f015b86990fdc9e3627c6483ad8e7acb1c', 7 7 'type' => 'project', 8 8 'install_path' => __DIR__ . '/../../', … … 167 167 ), 168 168 'wp-rainbow/wp-rainbow' => array( 169 'pretty_version' => 'v0.4. 5',170 'version' => '0.4. 5.0',171 'reference' => ' 962e731f3b34c81ddb9cab0b593dad66c069ad54',169 'pretty_version' => 'v0.4.6', 170 'version' => '0.4.6.0', 171 'reference' => 'c13ab4f015b86990fdc9e3627c6483ad8e7acb1c', 172 172 'type' => 'project', 173 173 'install_path' => __DIR__ . '/../../', -
rainbowkit-login-web3-integration-for-sign-in-with-ethereum/trunk/wp-rainbow.php
r3035005 r3036124 11 11 * Plugin URI: https://wp-rainbow.davisshaver.com/ 12 12 * Description: RainbowKit Login allows WordPress users to log in with Ethereum using the Sign-In With Ethereum standard, powered by RainbowKit. 13 * Version: 0.4. 513 * Version: 0.4.6 14 14 * Author: Davis Shaver 15 15 * Author URI: https://davisshaver.com/ … … 41 41 ); 42 42 43 // Require the helper functions. 44 require_once __DIR__ . '/inc/functions.php'; 45 43 46 // Require the main class. 44 47 require_once __DIR__ . '/inc/class-wp-rainbow.php';
Note: See TracChangeset
for help on using the changeset viewer.