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.
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:
Copy
module.exports = {
networks: {
cypherTestnet: {
url: "https://testnet-rpc.cypher.z1labs.ai",
chainId: 10111,
accounts: ["<YOUR_PRIVATE_KEY>"] // Replace with your wallet's private key or use a .env file for security
}
},
solidity: "0.8.17",
};
For Truffle, modify your truffle-config.js:
Copy
// Example configuration for the Cypher network using Web3j in Java
module.exports = {
networks: {
cypherTestnet: {
provider: () => new HDWalletProvider("<YOUR_MNEMONIC>", "https://testnet-rpc.cypher.z1labs.ai"),
network_id: 10111, // Cypher testnet Chain ID
}
},
compilers: {
solc: {
version: "0.8.17"
}
}
};
Step 2: Update Gateway Configuration
If your application interacts with encrypted data, ensure the Gateway URL is correctly configured. For example, in fhevmjs: