The Cast integration allows you to use Foundry's cast tool to sign transactions.
The following configuration options are available for Cast wallet:
Option | Description |
---|---|
enabled |
Flag to enable/disable Cast wallet usage |
passwordFile |
Path to a file containing the keystore password |
keystore |
Path to a keystore file or directory |
mnemonicIndex |
The index to use with a mnemonic (default: 0) |
account |
Account name when using the default keystore directory |
interactive |
Open an interactive prompt for entering private key |
In your Hardhat config:
module.exports = {
migrate: {
castWallet: {
enabled: true,
passwordFile: "./password",
}
}
}
Or via command line:
npx hardhat migrate --network sepolia --castEnabled --passwordFile ./password
The Trezor integration allows signing transactions with a Trezor hardware wallet for enhanced security.
Option | Description |
---|---|
enabled |
Flag to enable/disable Trezor wallet usage |
mnemonicIndex |
Index for the account derivation path (default: 0) |
- The integration uses the standard Ethereum derivation path:
m/44'/60'/0'/0'/{index}
- Initial connection requires user interaction with the device to confirm access
In your Hardhat config:
module.exports = {
migrate: {
trezorWallet: {
enabled: true,
mnemonicIndex: 0
}
}
}
Or via command line:
npx hardhat migrate --network sepolia --trezorEnabled --trezorMnemonicIndex 5
- Uses Node.js
child_process
to execute cast commands - Provides wrapped functions to interact with cast's wallet functionality
- Automatically handles command construction with appropriate flags
- Uses the official
@trezor/connect
library - Provides initialization, address retrieval, and transaction signing