I’ve deployed my contract on EVM (Ethereum and multiple forks), but when I do this for Sapphire testnet it’s returning an error:
ProviderError: core: invalid call format: invalid packed call
at HttpProvider.request (/home/proj/node_modules/hardhat/src/internal/core/providers/http.ts:78:19)
at LocalAccountsProvider.request (/home/proj/node_modules/hardhat/src/internal/core/providers/accounts.ts:188:34)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at EthersProviderWrapper.send (/home/proj/node_modules/@nomiclabs/hardhat-ethers/src/internal/ethers-provider-wrapper.ts:13:20)
The callee is the following:
const K = await hre.ethers.getContractFactory(k);
const contract = await K.deploy(); // <-- fails here
await contract.deployed();
Any suggestions what I can do? I noticed https://testnet.sapphire.oasis.dev responds with a 405, guessing it’s ‘/ GET’ and the system is running fine (testnet explorer is looking good to go)
That’s really strange. I’m sorry you’re having difficulty. I’d like to help more, but I don’t know where the plugin was included, nor what complaint hardhat is making. Could you please check this code and making sure you’re doing what it’s doing? If you want to post your hardhat config that also works.
Have you followed along with this tutorial and made sure you are using the Sapphire compat lib? It should be very easy to do, but it is slightly different than deploying to other EVM chains.
pnpm is awesome, installed and used it to download sapphire-hardhat
the install is much much better than npm install @oasisprotocol/sapphire-hardhat: much faster and secure
I was missing the import/require for sapphire-hardhat in config, updated compiler to 0.8.7 and was able to successfully add chainId without the previous error (Expected a value of type HttpNetworkConfig)