truffle
truffle copied to clipboard
Error deploying to Linea
When you deploy to Linea with HD-wallet-provider, we consistently run into:
Compiling your contracts...
===========================
> Everything is up to date, there is nothing to compile.
/Users/emilylin/dev/demos/linea-tutorial/node_modules/eth-block-tracker/src/polling.js:51
const newErr = new Error(`PollingBlockTracker - encountered an error while attempting to update latest block:\n${err.stack}`)
^
Error: PollingBlockTracker - encountered an error while attempting to update latest block:
undefined
at PollingBlockTracker._performSync (/Users/emilylin/dev/demos/linea-tutorial/node_modules/eth-block-tracker/src/polling.js:51:24)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
UnhandledRejections detected
Promise {
<rejected> {
code: -32603,
message: 'Too Many Requests',
data: { originalError: {} }
}
} {
code: -32603,
message: 'Too Many Requests',
data: { originalError: {} }
}
Promise {
<rejected> {
code: -32603,
message: 'Too Many Requests',
data: { originalError: {} }
}
} {
code: -32603,
message: 'Too Many Requests',
data: { originalError: {} }
}
or
Compiling your contracts...
===========================
> Everything is up to date, there is nothing to compile.
/Users/emilylin/dev/demos/linea-tutorial/node_modules/eth-block-tracker/src/polling.js:51
const newErr = new Error(`PollingBlockTracker - encountered an error while attempting to update latest block:\n${err.stack}`)
^
Error: PollingBlockTracker - encountered an error while attempting to update latest block:
undefined
at PollingBlockTracker._performSync (/Users/emilylin/dev/demos/linea-tutorial/node_modules/eth-block-tracker/src/polling.js:51:24)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
Reproduction steps:
Deploy a contract using this configuration:
linea: {
provider: () => {
return new HDWalletProvider(
MNEMONIC,
'https://rpc.goerli.linea.build/',
);
},
network_id: "59140"
},
Maybe try add PollingInterval, I have a contract running with the following parameters:
linea: {
provider: function() {
return new HDWalletProvider(
MNEMONIC, PROJECT_ID,
);
},
verify: {
apiUrl: "https://explorer.goerli.linea.build/api",
apiKey: ETHERSCAN_API_KEY,
explorerUrl: "https://explorer.goerli.linea.build/",
},
poolingInterval: 30000,
networkCheckTimeoutnetworkCheckTimeout: 10000,
timeoutBlocks: 50,
network_id: "59140",
},
Same... but this time I get
Promise {
<rejected> {
code: -32603,
message: 'Gateway timeout. The request took too long to process. This can happen when querying logs over too wide a block range.',
data: { originalError: {} }
}
} {
code: -32603,
message: 'Gateway timeout. The request took too long to process. This can happen when querying logs over too wide a block range.',
data: { originalError: {} }
}