Skip to content

Hardhat plugin for integration with a Trezor hardware wallet

License

Notifications You must be signed in to change notification settings

yankeguo/hardhat-trezor

Repository files navigation

hardhat-trezor

NPM Version NPM Downloads

Hardhat plugin for integration with a Trezor hardware wallet

Caution

This package comes with no warranty, use at your own risk

Requirements

Usage

  1. install the plugin
npm install --save @yankeguo/hardhat-trezor
  1. import the plugin in your hardhat.config.js
import "@yankeguo/hardhat-trezor";
  1. add the plugin configuration in your hardhat.config.js
module.exports = {
  solidity: "0.8.24",
  networks: {
    sepolia: {
      url: "https://sepolia.base.org",
      // standard ethereum derivation paths
      trezorDerivationPaths: [
        [44, 60, 0, 0, 0],
        [44, 60, 0, 0, 1],
      ],
      // this will bypass trezor derivation path validation, makes mainnet addresses usable on testnet
      // see https://github.com/trezor/trezor-firmware/blob/main/docs/common/ethereum-definitions.md
      trezorInsecureDerivation: true,
    },
  },
};

Example

See demo/hardhat.config.ts for a complete example.

Donation

Send me some ETH or tokens to yankeguo.eth.

Credits

GUO YANKE, MIT License