hardhat-ethernal
hardhat-ethernal copied to clipboard
Error synchronizing artifacts on local hh network
Any idea why I'd be getting this error in my local hardhat network when I try to synchronize artifacts of a newly created contract?
Here's the relevant portions of my script file:
const hre = require("hardhat");
const ethernal = require('hardhat-ethernal');
const { utils } = require("ethers");
[...]
await hre.ethernal.push({
name: "TheAllSeeingLemon",
address: contract.address,
abi: contract.abi
});
Terminal output (apparent success):
% hh run --network localhost scripts/deploy_and_mint.js
owner.address: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
TheAllSeeingLemon contract deployed to: 0x5FbDB2315678afecb367f032d93F642f64180aa3
Owner has 1 token(s).
[Ethernal] Logged in with [email protected]
[Ethernal] Using default workspace "TheAllSeeingLemon"
[Ethernal] Updated artifacts for contract TheAllSeeingLemon (0x5FbDB2315678afecb367f032d93F642f64180aa3). Dependencies: Ownable, ERC721, IERC721, IERC721Receiver, ERC721Enumerable, IERC721Enumerable, IERC721Metadata, Address, Context, Counters, Strings, ERC165, IERC165, SafeMath, LemonCollectible, ReentrancyGuard, ERC721A, console
And here's the output from hardhat local network:
web3_clientVersion (2)
eth_accounts
eth_chainId
eth_accounts
eth_blockNumber
eth_chainId (2)
eth_estimateGas
eth_getBlockByNumber
eth_feeHistory
eth_sendTransaction
Contract deployment: TheAllSeeingLemon
Contract address: 0x5fbdb2315678afecb367f032d93f642f64180aa3
Transaction: 0xfa61d54aa9f49c1ce892814e59661ee4c0eff4501390788dc94b45710aeaa83a
From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
Value: 0 ETH
Gas used: 3491332 of 3491332
Block #1: 0x07e7ab735b3ad1ecbfd5cc566591602dbe5e65e59359410388b5ace0d6055be5
eth_chainId
eth_getTransactionByHash
eth_chainId
eth_getTransactionReceipt
eth_chainId
eth_estimateGas
eth_feeHistory
eth_sendTransaction
Contract call: TheAllSeeingLemon#mint
Transaction: 0x20e97ce1cffa3c86b20bf8d93c79028c46e0f248b6ee6b7c5e26eb22bdecebe8
From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
To: 0x5fbdb2315678afecb367f032d93f642f64180aa3
Value: 0.001 ETH
Gas used: 101839 of 107407
Block #2: 0x58e8f5ea660d93adb17f3e67f550ba91ce637ba30bb7e6f8bb6c1a12aa89f50b
eth_chainId
eth_getTransactionByHash
eth_chainId
eth_getTransactionReceipt
eth_chainId
eth_call
Contract call: TheAllSeeingLemon#balanceOf
From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
To: 0x5fbdb2315678afecb367f032d93f642f64180aa3
eth_accounts
eth_chainId
eth_accounts
eth_chainId
eth_call
Contract call: TheAllSeeingLemon#<unrecognized-selector>
From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
To: 0x5fbdb2315678afecb367f032d93f642f64180aa3
Error: Transaction reverted: function selector was not recognized and there's no fallback function
at TheAllSeeingLemon.<unrecognized-selector> (contracts/TheAllSeeingLemon.sol:11)
at HardhatNode.runCall (/Users/jameskessler/Workspace/2022/crypto/projects/allseeinglemon/allseeinglemon/contracts/node_modules/hardhat/src/internal/hardhat-network/provider/node.ts:616:20)
at EthModule._callAction (/Users/jameskessler/Workspace/2022/crypto/projects/allseeinglemon/allseeinglemon/contracts/node_modules/hardhat/src/internal/hardhat-network/provider/modules/eth.ts:354:9)
at HardhatNetworkProvider._sendWithLogging (/Users/jameskessler/Workspace/2022/crypto/projects/allseeinglemon/allseeinglemon/contracts/node_modules/hardhat/src/internal/hardhat-network/provider/provider.ts:139:22)
at HardhatNetworkProvider.request (/Users/jameskessler/Workspace/2022/crypto/projects/allseeinglemon/allseeinglemon/contracts/node_modules/hardhat/src/internal/hardhat-network/provider/provider.ts:116:18)
at JsonRpcHandler._handleRequest (/Users/jameskessler/Workspace/2022/crypto/projects/allseeinglemon/allseeinglemon/contracts/node_modules/hardhat/src/internal/hardhat-network/jsonrpc/handler.ts:188:20)
at JsonRpcHandler._handleSingleRequest (/Users/jameskessler/Workspace/2022/crypto/projects/allseeinglemon/allseeinglemon/contracts/node_modules/hardhat/src/internal/hardhat-network/jsonrpc/handler.ts:167:17)
at Server.JsonRpcHandler.handleHttp (/Users/jameskessler/Workspace/2022/crypto/projects/allseeinglemon/allseeinglemon/contracts/node_modules/hardhat/src/internal/hardhat-network/jsonrpc/handler.ts:52:21)
When I comment out the offending lines in scripts/deploy_and_mint.js
:
// await hre.ethernal.push({
// name: "TheAllSeeingLemon",
// address: contract.address,
// abi: contract.abi
// });
The results are:
Terminal output:
% hh run --network localhost scripts/deploy_and_mint.js
owner.address: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
TheAllSeeingLemon contract deployed to: 0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9
Owner has 1 token(s).
Hardhat local:
web3_clientVersion
eth_accounts
web3_clientVersion
eth_chainId
eth_accounts
eth_blockNumber
eth_chainId (2)
eth_estimateGas
eth_getBlockByNumber
eth_feeHistory
eth_sendTransaction
Contract deployment: TheAllSeeingLemon
Contract address: 0xdc64a140aa3e981100a9beca4e685f962f0cf6c9
Transaction: 0x0ff4e288dbdcc045cc33d386a2f6e155ba14347454402068fab116cb6f014634
From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
Value: 0 ETH
Gas used: 3491332 of 3491332
Block #5: 0x25d2d74f69b1ca086cffaa3ffc72b3d18553feb56f060a47ab30b0c59593a458
eth_chainId
eth_getTransactionByHash
eth_chainId
eth_getTransactionReceipt
eth_chainId
eth_estimateGas
eth_feeHistory
eth_sendTransaction
Contract call: TheAllSeeingLemon#mint
Transaction: 0x9be7ad5cdd79b9d082d9fdfd1455e1a8d7b93f5fb24497142423a9feeaaa6d36
From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
To: 0xdc64a140aa3e981100a9beca4e685f962f0cf6c9
Value: 0.001 ETH
Gas used: 101839 of 107407
Block #6: 0xcd295f20b07731b8df50c65ec8db18acdaa3edba9cfa8ef67e8eff0c939c824e
eth_chainId
eth_getTransactionByHash
eth_chainId
eth_getTransactionReceipt
eth_chainId
eth_call
Contract call: TheAllSeeingLemon#balanceOf
From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
To: 0xdc64a140aa3e981100a9beca4e685f962f0cf6c9
TIA