Go to file
Barry Gitarts 432ae0667e add deposit information 2021-03-03 14:29:00 -05:00
constants add goerli deploy 2021-01-31 13:45:46 -05:00
contracts add execute deposit 2021-01-28 14:42:17 -05:00
deploy add stavalanche deploy 2021-02-26 14:55:30 -05:00
example_contracts add bridge contracts 2021-01-22 15:18:19 -05:00
frontend add deposit information 2021-03-03 14:29:00 -05:00
scripts add bridge contracts 2021-01-22 15:18:19 -05:00
test add minting of snt over bridge 2021-02-12 16:02:46 -05:00
utils add multichain asset tracking 2021-02-04 12:17:35 -05:00
verify add proper handling SNT/erc20 deposits 2021-02-09 15:01:02 -05:00
.gitattributes add bridge contracts 2021-01-22 15:18:19 -05:00
.gitignore add bridge deploy test 2021-01-22 15:50:52 -05:00
README.md add bridge contracts 2021-01-22 15:18:19 -05:00
TURTORIAL.md add bridge contracts 2021-01-22 15:18:19 -05:00
hardhat.config.ts add stavalanche deploy 2021-02-26 14:55:30 -05:00
package-lock.json add bridge contracts 2021-01-22 15:18:19 -05:00
package.json add stavalanche deploy 2021-02-26 14:55:30 -05:00
tsconfig.json add bridge deploy test 2021-01-22 15:50:52 -05:00

README.md

Get started

  1. Clone the repo and cd into it git clone https://github.com/symfoni/hardhat-react-boilerplate.git MyProject && cd MyProject
  2. Install deps with yarn yarn or npm npm install
  3. Start hardhat npx hardhat node --watch

It runs up a Hardhat node, compile contracts, generates typescript interfaces, creates React context and instantiates your contract instances and factories with frontend provider.
  1. Open up a new terminal
  2. cd frontend
  3. Install deps with yarn yarn or npm npm install
  4. Import seed phrase in Metamask. The default mnemonic currently used by hardhat is test test test test test test test test test test test junk
  5. Ensure Metamask RPC is set to http://localhost:8545 and chainID 31337.
  6. Start React app with yarn yarn start or npm npm start. The frontend should start up at http://localhost:3000/.

Because of this default hardhat.config.ts it will first try to connect with an injected provider like Metamask (web3modal package does this).

If nothing found it will try to connect with your hardhat node. On localhost and hardhat nodes it will inject your mnemonic into the frontend so you have a "browser wallet" that can both call and send transactions. NB! Dont ever put a mnemonic with actual value here. We will limit this feature going forward so its more explicit.

const config: HardhatUserConfig = {
  react: {
    providerPriority: ["web3modal", "hardhat"],
  },
};

Ensure you are useing RPC to http://localhost:8545.

You may also need to set the chainID to 31337 if you are useing Hardhat blockchain development node.

Invalid nonce.

eth_sendRawTransaction
  Invalid nonce. Expected X but got X.

Reset your account in Metamask.

We ❤️ these Ethereum projects: