Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unallowed rpc method: eth_chainId #340

Open
phpmac opened this issue Dec 17, 2023 · 0 comments
Open

Unallowed rpc method: eth_chainId #340

phpmac opened this issue Dec 17, 2023 · 0 comments

Comments

@phpmac
Copy link

phpmac commented Dec 17, 2023

Please support eth_chainId

> php artisan test tests/Feature/TmpTest.php

   FAIL  Tests\Feature\TmpTest
  ⨯ example                                                                                                                  0.69s  
  ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────  
   FAILED  Tests\Feature\TmpTest > example                                                                       RuntimeException   
  Unallowed rpc method: eth_chainId

  at vendor/web3p/web3.php/src/Eth.php:83
     79▕         if (preg_match('/^[a-zA-Z0-9]+$/', $name) === 1) {
     80▕             $method = strtolower($class[1]) . '_' . $name;
     81▕ 
     82▕             if (!in_array($method, $this->allowedMethods)) {
  ➜  83▕                 throw new \RuntimeException('Unallowed rpc method: ' . $method);
     84▕             }
     85▕             if ($this->provider->isBatch) {
     86▕                 $callback = null;
     87▕             } else {

      +1 vendor frames 
  2   helpers.php:348
  3   helpers.php:391


  Tests:    1 failed (0 assertions)
  Duration: 0.74s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant