@appliedblockchain/silentdatarollup-hardhat-plugin
v1.0.1
Published
Hardhat plugin for Silent Data [Rollup]
Downloads
181
Maintainers
Readme
Silent Data [Rollup] Providers - Hardhat Plugin Package
Table of Contents
Introduction
Custom providers for integrating Silent Data [Rollup] with Hardhat.
Prerequisites
- Node.js (version 18 or higher)
- Hardhat v2
- npm
- Basic knowledge of Ethereum and smart contracts
Integration
Hardhat Integration
Installing Hardhat Integration Dependencies
npm install @appliedblockchain/silentdatarollup-hardhat-plugin @nomicfoundation/hardhat-ignition-ethers@0.15.7
Hardhat Integration Example
To integrate the Silent Data [Rollup] Provider with Hardhat, you need to configure your Silent Data network in the hardhat.config.ts
file. Below is an example of how to set it up, and note that a silentdata
property is needed on the network config to enable it. This property can be an empty object to apply defaults, or you can specify the configurations.
import '@nomicfoundation/hardhat-ignition-ethers'
import '@appliedblockchain/silentdatarollup-hardhat-plugin'
const RPC_URL = 'SILENT_DATA_ROLLUP_RPC_URL'
const PRIVATE_KEY = process.env.PRIVATE_KEY
export default {
solidity: '0.8.21',
defaultNetwork: 'sdr',
networks: {
sdr: {
url: RPC_URL,
accounts: [PRIVATE_KEY], // Note: Currently, only one private key can be passed to the network accounts configuration.
silentdata: {
authSignatureType: SignatureType.EIP712, // Optional, defaults to RAW
},
},
},
}
Note: With the above configuration, you can deploy a contract using Hardhat Ignition. For a detailed example, including a sample contract and an Ignition module, please refer to the Hardhat Ignition Getting Started Guide.
To deploy your contract using Hardhat Ignition, run the following command:
npx hardhat ignition deploy ignition/modules/Apollo.ts --network sdr
Troubleshooting
If you encounter any issues, please check the following:
- Ensure you're using the correct RPC URL for your desired network.
- Verify that your private key is correctly set.
- Ensure that your token is still active on the SilentData AppChains dashboard.
License
This project is licensed under the MIT License.