This repository was archived by the owner on Feb 26, 2024. It is now read-only.
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
hdwallet-provider@1.3.0 not letting deploy #4000
Closed
Description
- [✅] I've asked for help in the Truffle Gitter before filing this issue.
Issue
@truffle/hdwallet-provider@1.3.0 not letting deploy contracts, however works just as fine for 1.2.6
// with 1.3.0
// with earlier versions
Steps to Reproduce
try to deploy with @truffle/hdwallet-provider@1.3.0
const provider = new HDWalletProvider(mnemonic, provider);
Expected Behavior
expected to deploy
Actual Results
node deploy.js
deploying from 0x31Dac9cD8B4fDc7B1d4F139e47a5703512460240
node:internal/process/promises:245
triggerUncaughtException(err, true /* fromPromise */);
^
[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#<Object>".] {
code: 'ERR_UNHANDLED_REJECTION'
}
Environment
- Operating System: linux ubuntu
- Ethereum client:infura api
- Truffle version (
truffle version
): @truffle/hdwallet-provider@1.3.0 - node version (
node --version
):@15.14.0 - npm version (
npm --version
): @7.7.6
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
christoph2806 commentedon Apr 27, 2021
Hi, I experienced a similar problem today while deploying to xDai (chainId = 100).
Steps to reproduce:
It works with @1.2.1, but still gives a lot of timeout errors which cannot be fixed by setting networkCheckTimeout or pollingInterval.
truffle-config parameters used:
xdai-rpc.etherisc.com is an openethereum-3.0.1 node behind an nginx reverse proxy.
nicezic commentedon Apr 28, 2021
I have a similar problem when deploying to BSC testnet.
#4010
Xinayder commentedon Apr 28, 2021
To fix this issue, you need to pass a
chainId
parameter when creating theHDWalletProvider
:I just had this issue and spent a lot of time trying to figure out why it happened, until I found a question on StackOverflow with the same error and the author mentioned a named parameter.
nicezic commentedon Apr 28, 2021
wow!!!
davidmurdoch commentedon Apr 28, 2021
Thanks everyone for providing your experience with this issue!
A recent geth update has started defaulting to requiring EIP-155 signed transactions, which HDWalletProvider doesn't automatically do unless a chainId option is passed in, and the chainId is the ID of a "known network" (ethereum testnets and mainnet, currently).
We need to do a couple of things here:
gakonst commentedon Apr 29, 2021
Minimal repro here: https://github.com/gakonst/truffle-bug-repro.
The problem is that when using the
chainId: 1337
(e.g. withgeth --dev
), I get:Error: Chain with ID 1337 not supported
, which comes from ethereumjs-vm/commonThe
chainId
seems to get set here.gnidan commentedon May 3, 2021
Plan for fixing this issue:
provider.send
.chainId
is not available on the chain; it means we're pre-spurious dragonchainId
to skip this behaviorchainSettings
property to the constructor args (as a more verbose form ofchainId
).chainSettings
would be type{ chainId?: number | string; networkId?: number | string; hardfork?: string }
. Each of these properties is optional, with the following implications:chainId
not being specified means we fetch ithardfork
not being specified means we default to some post-"spurious dragon"
fork (maybe we default to"instanbul"
?)networkId
not being specified likely can just be ignored, since ethereumjs-common doesn't appear to use it. If it is necessary, we can treat it the same aschainId
and fetch when missing.chainSettings
calleddisableReplayProtection
?Other thoughts:
7 remaining items