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

Deploy problems with npx hardhat run scripts/deploy.ts #73

Open
luislucena16 opened this issue Feb 27, 2024 · 13 comments
Open

Deploy problems with npx hardhat run scripts/deploy.ts #73

luislucena16 opened this issue Feb 27, 2024 · 13 comments

Comments

@luislucena16
Copy link

hi @excaliborr following the instructions of the repo I have a problem in step number 9 of here when I run the command to deploy I get this error:

Details: fetch is not defined
Version: [email protected]

have you seen it before? thanks in advance!

@luislucena16 luislucena16 changed the title Deploy problems npx hardhat run scripts/deploy.ts Deploy problems in npx hardhat run scripts/deploy.ts Feb 27, 2024
@luislucena16 luislucena16 changed the title Deploy problems in npx hardhat run scripts/deploy.ts Deploy problems with npx hardhat run scripts/deploy.ts Feb 27, 2024
@excaliborr
Copy link
Contributor

How are you getting this error can you share some code snippets? You are running the example repo right? We dont use viem or fetch in there by default if I remember correctly

@luislucena16
Copy link
Author

luislucena16 commented Feb 27, 2024

@excaliborr yes, I am running the example repository, then the error could be in relation to pimlico, I also get this as part of the error:

  details: 'fetch is not defined',
  docsPath: undefined,
  metaMessages: [
    'URL: https://api.pimlico.io/v1/mumbai/rpc?apikey=my_key',
    'Request body: {"method":"eth_chainId","params":[]}'
  ],
  shortMessage: 'HTTP request failed.',
  version: '[email protected]',
  body: { method: 'eth_chainId', params: [] },
  headers: undefined,
  status: undefined,
  url: 'https://api.pimlico.io/v1/mumbai/rpc?apikey=my_key'

I am using Pimlico's bundler and paymaster

@excaliborr
Copy link
Contributor

the my_key was a placeholder in the readme, you need to fill this in with the pimlico API key that you will need to get on your own

@luislucena16
Copy link
Author

that my_key was added by me for the example here in github, I'm using my apiKey correctly

@excaliborr
Copy link
Contributor

oh oops mb! Have you installed the dependencies in both the account-abstraction repo and the example repo, and ran yarn link to link them? The fetch is not defined sounds like a dependency error, have you modified any code from the example repo or you just cloned and ran it?

@luislucena16
Copy link
Author

luislucena16 commented Feb 27, 2024

yes, I have installed the dependencies as in the instructions and all the commands as well, up to step (9) I got there, the only thing I modified of course was the hardhat.config.ts, I modified the code you indicate with Example

@excaliborr
Copy link
Contributor

What node version are you using, can you try with node 20+

@luislucena16
Copy link
Author

@excaliborr nice!! it was that, i updated my node version and it worked fine, now with the next pass which is to run the integration tests it breaks

  • error messages:
 Should send a transaction:
     Error: could not decode result data (value="0x", info={ "method": "balanceOf", "signature": "balanceOf(address)" }, code=BAD_DATA, version=6.9.0)
Should transfer tokens from the smart account:
     Error: could not decode result data (value="0x", info={ "method": "balanceOf", "signature": "balanceOf(address)" }, code=BAD_DATA, version=6.9.0)

@excaliborr
Copy link
Contributor

Our integration test suite uses testnet contracts on ethereum sepolia, if you are using a different network that is probably why as the contracts we test dont exist there

@luislucena16
Copy link
Author

of course, that's right! now it's working for me!

@luislucena16
Copy link
Author

luislucena16 commented Feb 28, 2024

have you done any test with biconomy? i was trying from sepolia with the paymaster and bundlr from them but it doesn't recognise it:

Error: Unknown paymaster type

@excaliborr
Copy link
Contributor

Yes we currently do not support biconomy in this version of the plugin, here is a list of paymasters we support: https://github.com/defi-wonderland/hardhat-account-abstraction?tab=readme-ov-file#supported-paymaster-types

If you would like to attempt to add support for this paymaster you are welcome to give it a go!

@luislucena16
Copy link
Author

good, I will try!

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

2 participants