# Operator guide: deploy TestToken and TestStaking on Sepolia with Remix Audience: the requester, deploying from their own browser wallet. Every transaction and confirmation below is a future action you take; nothing here has been deployed yet. Faucets and site hosting are covered by the existing guides and are not repeated here. ## What you must take from the merged release This guide does not contain contract source. Before starting, get these from the accepted, merged Solidity release (not from this guide or from memory): 1. The Solidity source files for `TestToken` and `TestStaking`, and every file they import (for example any library sources vendored in the release). 2. The compiler settings the release uses: Solidity compiler version, optimizer on/off and runs, EVM version. Use the release's configuration exactly. 3. The release tag or commit you deployed from (record it in your evidence). 4. The exact location and current shape of `site/deployment.json` in that release. Constructor signatures used below: `TestToken()` (no arguments) and `TestStaking(address token)` (one argument: the deployed token address). ## Steps ### 1. Load and compile the release in Remix 1. Open Remix (https://remix.ethereum.org) and add the release's source files, keeping their import paths so imports resolve. 2. In the Solidity Compiler plugin, choose the release's compiler version ("The compiler version is selected in the COMPILER dropdown list" [Remix compile]) and set optimizer and EVM version under Advanced Compiler Configurations to match the release [Remix compile]. 3. Compile. Fix nothing in the source; if it fails to compile, stop and report it against the release. ### 2. Connect the wallet and check the network 1. In Deploy & Run Transactions, set ENVIRONMENT to **Browser Extension** and pick your wallet. Remix: "Browser extension wallets allow you to connect Remix to a wallet installed in your browser" and "Make sure your wallet is unlocked and set to the correct network before deploying." [Remix run] 2. Confirm the chain is Ethereum Sepolia, chain ID **11155111** (hex **0xaa36a7**) [chain registry; Chainlist]. If Remix or your wallet shows any other chain ID, stop and switch networks. - Optional console check: `eth_chainId` "Returns the chain ID used for signing replay-protected transactions" and returns a hex string [Ethereum JSON-RPC]; expect `0xaa36a7`. 3. Confirm the selected account holds Sepolia test ETH for two contract-creation transactions plus gas headroom. If not, use the existing faucet guide first. ### 3. Deploy TestToken() 1. In the contract dropdown select `TestToken` ("It displays a list of the contracts active in the editor" [Remix run]). There are no constructor arguments. 2. Leave Value at 0. Click **Deploy**. Your wallet opens: "Transactions sent through a browser extension require approval in the wallet popup before they are broadcast to the network." [Remix run] Check the network is still Sepolia, then confirm. 3. Wait until it is mined; the instance is then added to "Deployed Contracts" [Remix run]. 4. Record (see Evidence): the transaction hash and, from the receipt, `status` and `contractAddress`. The receipt field `contractAddress` is "The contract address created, if the transaction was a contract creation" and `status` is "either 1 (success) or 0 (failure)" [Ethereum JSON-RPC]. Only a receipt with status 1 counts. Call this address **TOKEN**. ### 4. Deploy TestStaking(address token) 1. Select `TestStaking`. "If the contract’s constructor function has parameters, you will need to specify them." [Remix run] Paste **TOKEN** (the receipt `contractAddress` from step 3, not your wallet address) into the `token` field. 2. Click **Deploy**, check the network in the wallet popup, confirm. 3. Record the transaction hash, receipt `status` (must be 1) and receipt `contractAddress`. Call this **STAKING**. ### 5. Resume if the staking deployment is interrupted If the browser closes, the wallet popup is rejected, or the staking transaction fails **after** the token receipt was confirmed with status 1: 1. Do **not** deploy TestToken again. Reuse TOKEN from the recorded receipt. 2. If a staking transaction hash was already broadcast, look it up first. If it has a status-1 receipt, use that receipt's `contractAddress` as STAKING and skip to step 6. Only if it failed (status 0) or was never broadcast, redo step 4 with the same TOKEN. 3. To interact with TOKEN in a fresh Remix session, load it without redeploying: use "Add Contract" on the Deployed Contracts section; "Adding an already deployed contract costs no gas, since no redeployment is required." [Remix run] Keep the release's compiled source active in the editor when you do this. 4. Record the failed or abandoned hash in your evidence too, marked as not used. ### 6. Post-deployment checks (do all before publishing) Run each against Sepolia and record the result: 1. Both receipts have `status` = 1 [Ethereum JSON-RPC]. 2. Nonempty code at both addresses: `eth_getCode` "Returns code at a given address." [Ethereum JSON-RPC] Result for TOKEN and for STAKING must not be `0x`. 3. On TOKEN (via the loaded instance in Deployed Contracts): `name()` returns `test`, `symbol()` returns `test` (both lowercase), `decimals()` returns `18`. 4. On STAKING: `token()` returns exactly TOKEN. If any check fails, do not fill in the site file; report the failing check with the hash and address. ## Filling site/deployment.json Use only receipt addresses that passed step 6. Fill the three fields in `site/deployment.json` (path and exact format as in the merged release): - `chainId`: the Sepolia chain ID, 11155111 (use the number or string form the release's file expects). - `token`: TOKEN, the `contractAddress` from the TestToken receipt. - `staking`: STAKING, the `contractAddress` from the TestStaking receipt. Do not put transaction hashes in `site/deployment.json`. Keep them separately in your deployment record (below) so anyone can re-derive the addresses from the receipts. Do not hand-type addresses; copy them from the receipts. ## Evidence to retain for each deployment For **TestToken** and again for **TestStaking**: | Item | Where from | |---|---| | Release tag/commit and compiler settings used | merged release | | Chain ID seen at deploy time (11155111 / 0xaa36a7) | wallet / `eth_chainId` | | Deployer account | wallet | | Constructor argument (none / TOKEN) | step 3 / 4 | | Transaction hash | wallet or Remix terminal | | Receipt `status` (must be 1) and block number | receipt | | Receipt `contractAddress` | receipt | | `eth_getCode` non-empty | step 6 | | Read checks: name/symbol `test`, decimals 18 (token); `token()` = TOKEN (staking) | step 6 | | Any abandoned/failed hashes, marked unused | step 5 | ## Not covered / not found - Contract source, imports, compiler version and optimizer settings: not available to this guide; take them from the merged release. - The exact JSON shape of `site/deployment.json` (number vs string `chainId`, extra fields): not available here; follow the release. - Remix's current docs do not state where the constructor input sits relative to the Deploy button; look for the input next to the contract's Deploy control. - Faucets and hosting: see the existing guides. ## Sources - [Remix run] Remix docs, Deploy & Run: https://remix-ide.readthedocs.io/en/latest/run.html - [Remix compile] Remix docs, Solidity Compiler: https://remix-ide.readthedocs.io/en/latest/compile.html - [Ethereum JSON-RPC] ethereum.org JSON-RPC API (`eth_chainId`, `eth_getCode`, `eth_getTransactionReceipt`): https://ethereum.org/en/developers/docs/apis/json-rpc/ - ethereum.org networks (Sepolia for app testing): https://ethereum.org/en/developers/docs/networks/ - [chain registry] ethereum-lists entry for Sepolia: https://raw.githubusercontent.com/ethereum-lists/chains/master/_data/chains/eip155-11155111.json - [Chainlist] https://chainlist.org/chain/11155111