Smart Contract Redeployment

Because WSC is EVM-equivalent, you won't need to change your Solidity code. The process simply involves re-configuring your development environment to point to the Wall Street Chain network.

Configure Your Hardhat Environment

In your existing Hardhat project, open the hardhat.config.ts file and add the Wall Street Chain networks to the networks object.

TypeScript

import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import "dotenv/config";

const PRIVATE_KEY = process.env.PRIVATE_KEY || "";

const config: HardhatUserConfig = {
  solidity: "0.8.24", // Or your project's Solidity version
  networks: {
    // ... your other network configs like Ethereum, Polygon, etc.

    // Add Wall Street Chain Networks
    wallStreetChainTestnet: {
      url: "https://test.rpc",
      chainId: TBA,
      accounts: [PRIVATE_KEY],
    },
    wallStreetChain: {
      url: "https://test.rpc", // MAINNET RPC
      chainId: TBA,            // MAINNET CHAIN ID
      accounts: [PRIVATE_KEY],
    },
  },
};

export default config;

Compile & Deploy

Your existing compilation process remains unchanged. To deploy, simply run your deployment scripts and point to the desired Wall Street Chain network using the --network flag.

Bash

# First, deploy to our Testnet to verify everything
npx hardhat run scripts/deploy.ts --network wallStreetChainTestnet

# Once ready, deploy to Mainnet
npx hardhat run scripts/deploy.ts --network wallStreetChain

Verify Your Contracts

After deployment, remember to verify your smart contracts on the WSC Explorer. This provides transparency and trust for your players.

The verification process is identical to Etherscan's.

Last updated