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 error (version: 2.15.0 ): ProviderError: too many arguments, want at most 1 #4010

Closed
anbang opened this issue Jun 9, 2023 · 12 comments
Labels
status:needs-more-info There's not enough information to start working on this issue

Comments

@anbang
Copy link

anbang commented Jun 9, 2023

Version of Hardhat

2.15.0

What happened?

deploy error when on other network

Minimal reproduction steps

This is the example: https://github.com/anbang/hardhat-deploy-example

  • install :
    • npm i
  • create .env file in project root path
    • mirror .env.example
  • compile :
    • npm run compile
  • deploy on blockchain network
    • ❌ run: npm run d:o or npx hardhat run scripts/deploy.ts --network okchain

Error info :

ProviderError: too many arguments, want at most 1
at HttpProvider.request (/Users/mac/Documents/xxxxxxxxxxxx/node_modules/hardhat/src/internal/core/providers/http.ts:88:21)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async HardhatEthersProvider.estimateGas (/Users/mac/Documents/xxxxxxxxxxxx/node_modules/@nomicfoundation/hardhat-ethers/src/internal/hardhat-ethers-provider.ts:209:27)
at async /Users/mac/Documents/xxxxxxxxxxxx/node_modules/@nomicfoundation/hardhat-ethers/src/signers.ts:235:35
at async Promise.all (index 0)
at async HardhatEthersSigner._sendUncheckedTransaction (/Users/mac/Documents/xxxxxxxxxxxx/node_modules/@nomicfoundation/hardhat-ethers/src/signers.ts:256:7)
at async HardhatEthersSigner.sendTransaction (/Users/mac/Documents/xxxxxxxxxxxx/node_modules/@nomicfoundation/hardhat-ethers/src/signers.ts:125:18)
at async ContractFactory.deploy (/Users/mac/Documents/xxxxxxxxxxxx/node_modules/ethers/src.ts/contract/factory.ts:106:24)
at async main (/Users/mac/Documents/xxxxxxxxxxxx/scripts/deploy.ts:9:16)

Search terms

No response

@fvictorio
Copy link
Member

I cannot reproduce this. I didn't do it in that okchain network, but the error you are getting shouldn't be affected by which network you are using.

Can you double check that those reproduction steps are accurate?

@fvictorio fvictorio added status:needs-more-info There's not enough information to start working on this issue and removed status:triaging labels Jun 9, 2023
@validateITNikita
Copy link

same issue with some other chain

@fvictorio
Copy link
Member

There isn't much we can do without reproduction steps.

@tnquanghuy0512
Copy link

I have the same issue with okt chain

@Haripandey21
Copy link

The OKChain network might have some issues because when I deployed the same contract on the Goerli network, it functioned perfectly. You can find the deployed address here: https://goerli.etherscan.io/address/0xfd472Ba195f2032fa8A59Ac97E031446aF434b37#code

@fvictorio
Copy link
Member

Thank you @Haripandey21. It seems like there's nothing we can do on our side, so I'm going to close this. I suggest reaching out to someone working on that chain's node implementation (or the node provider, idk) and letting them know about this.

@fvictorio fvictorio closed this as not planned Won't fix, can't repro, duplicate, stale Jun 20, 2023
@github-project-automation github-project-automation bot moved this to Done in Hardhat Jun 20, 2023
@jveer634
Copy link

@fvictorio We are facing similar issue on a different chain as well. Can you specify which part of the hardhat is bugging out. So that we can track down the error from our end as well.

@fvictorio
Copy link
Member

Can you specify which part of the hardhat is bugging out.

Sorry but I can't because no one has told me yet how to reproduce it 🤷‍♂️

@outSH
Copy link

outSH commented Jul 3, 2023

@anbang @jveer634 Try adding explicit gasLimit to the deployment transaction like this:

const token = await ethers.deployContract("Token", { gasLimit: "0x1000000" });

The problem is most probably caused by an outdated ethereum node (geth < 1.9.22 or similar) which doesn't support eth_estimateGas 2'nd argument (quantity / type, see https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_estimategas). hardhat-ethers seem to be compliant with the current API so I don't think there's an issue here.

@0xtrou
Copy link

0xtrou commented Oct 7, 2023

the old version works fine, since I upgraded hardhat and typechain it caused the error

@0xtrou
Copy link

0xtrou commented Oct 7, 2023

@fvictorio can we do fallback to the old estimate gas version when the newer version causes error?

@fvictorio
Copy link
Member

@0xtrou unless I'm missing something, that behavior comes from ethers, not from our plugin, so you should try asking in their repo.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status:needs-more-info There's not enough information to start working on this issue
Projects
Archived in project
Development

No branches or pull requests

8 participants