### Install Foundry Source: https://docs.robinhood.com/chain/deploy-smart-contracts Installs Foundry, a smart contract development toolkit for Ethereum, by downloading and running the foundryup installer script. This script handles the installation of essential tools like forge, anvil, cast, and chisel. ```bash # Download and run the foundryup installer. Follow the prompts: curl -L https://foundry.paradigm.xyz | bash # Next, run foundryup to install forge, anvil, cast and chisel foundryup ``` -------------------------------- ### Create a Foundry Project Source: https://docs.robinhood.com/chain/deploy-smart-contracts Initializes a new Foundry project for smart contract development. This involves creating a project directory, navigating into it, and then running the `forge init` command to set up the standard project structure. ```bash mkdir rh-deploy cd rh-deploy forge init ``` -------------------------------- ### Create a Test Contract (Solidity) Source: https://docs.robinhood.com/chain/deploy-smart-contracts Defines a simple Solidity smart contract named `HelloRobinhood`. This contract includes a single function `hello` that returns a string literal. The contract is intended for testing deployment on the Robinhood Chain. ```solidity // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.13; contract HelloRobinhood { function hello() external pure returns (string memory) { return "Hello, Robinhood Chain!"; } } ``` -------------------------------- ### Deploy Test Contract to Robinhood Chain (Forge) Source: https://docs.robinhood.com/chain/deploy-smart-contracts Deploys the `HelloRobinhood` smart contract to the Robinhood Chain testnet using the Forge command-line tool. It requires setting environment variables for the private key and RPC URL, and uses the `--broadcast` flag for deployment. ```bash # Set this to the wallet key that holds your Robinhood Chain testnet ETH. # Never commit real private keys. export PRIVATE_KEY=0x export RH_RPC_URL=https://rpc.testnet.chain.robinhood.com # This command will deploy the HelloRobinhood contract and output its address forge create HelloRobinhood \ --rpc-url $RH_RPC_URL \ --private-key $PRIVATE_KEY \ --broadcast ``` -------------------------------- ### Verify Test Contract on Block Explorer (Forge) Source: https://docs.robinhood.com/chain/deploy-smart-contracts Verifies the deployed `HelloRobinhood` smart contract on the Robinhood Chain block explorer using Forge. This command requires the contract address, source file path, contract name, chain ID, RPC URL, and the verifier details. ```bash forge verify-contract \ src/HelloRobinhood.sol:HelloRobinhood \ --chain-id 46630 \ --rpc-url $RH_RPC_URL \ --verifier blockscout \ --verifier-url https://explorer.testnet.chain.robinhood.com/api/ ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.