Configuration and Deployment
This guide outlines the technical steps required to deploy smart contracts on the Cypher testnet. It includes configuring your development environment, deploying contracts, verifying deployments, and obtaining testnet tokens for transactions.
Configuration Details
RPC Endpoint and Gateway URLs
RPC Testnet URL: https://testnet-rpc.cypher.z1labs.ai
Gateway URL: https://gateway.cypherscan.ai
The RPC URL connects your development environment to the Cypher testnet, while the Gateway URL facilitates encrypted operations, such as decryption or re-encryption, when interacting with Cypher.
Deployment Steps
Step 1: Configure Network Settings
Set up the Cypher network in your development framework (e.g., Hardhat or Truffle). Below is an example configuration for Hardhat:
For Truffle, modify your truffle-config.js:
Step 2: Update Gateway Configuration
If your application interacts with encrypted data, ensure the Gateway URL is correctly configured. For example, in fhevmjs:
Step 3: Deploy Your Contracts
Use your preferred tool to deploy contracts. For Hardhat, an example deployment script is as follows:
Run the script with:
For Truffle:
Step 4: Verify Deployment
Cypherscan Interface Verification
Provide your contract address, compiler details, and source code.
Follow the guided form to complete the verification process.
Cypherscan API Verification
Automate verification by interacting with the Cypherscan API:
API Endpoint: https://testnet.cypherscan.ai/api/v2/
Example Request:
After deployment, verify your contract on Cypherscan to make the source code accessible for public inspection.
Follow the Blockscout API documentation for additional parameters.
Last updated