Video Tutorials on Setting Up Ganache and Hardhat and Connecting Them to Your Moralis Server.
Setting Up Ganache and MetaMask
Connecting Ganache to Moralis
A note for Mac users, download frp_0.36.2_darwin_amd64.tar.gz for the Ganache proxy server.
Connecting Hardhat to MetaMask - Ivan on Tech Explains
Connecting Hardhat to Moralis - Real-Time and Historical Transactions
Solidity Writing to Console (console.log) - Hardhat Introduction
Forking Mainnet (not supported)
Note, the "Mainnet Forking" feature in Ganache CLI and Hardhat is not yet supported. Transactions and contract events will not sync due to the block numbers starting at an unexpected value. We hope to have support for this in the future.
Note, Moralis doesn't support changing local dev chains. Once you've used a local dev chain on a Moralis Server - you have to keep using it. Changing chains may result in unexpected results like transactions not being synced at all or just partially synced. If you need to switch chains you will have to create another server. We hope to support changing chains on the same server in the near future!
Connect Through the moralis-admin-cli
You can connect your local dev chain to Moralis by making use of the moralis-admin-cli.
To get started, you need to install it by running the following code in the terminal: