# Blockchain for IoT laboratory toolkit

Start with the offline browser experiments. Actual contract execution uses Remix VM (https://remix.ethereum.org/) or the optional isolated local EVM runner. The website's JavaScript simulator is not an EVM. Use fictional telemetry and fresh test accounts only. Do not enter seed phrases, keys, private measurements or real assets. Solidity 0.8.28 is pinned for this teaching release, not claimed to be the latest. In Remix select compiler 0.8.28, Shanghai EVM target, optimizer disabled, and Remix VM with a compatible fork. Upload the individual `.sol` file, compile, select its named contract, VALUE 0, deploy. Verify terminal receipt and state. The compiler may need a network download.

Optional reproducible actual execution: install Node.js 20 or later on your development machine, extract this folder, `cd blockchain`, `npm install`, `npm test`. Network access required for initial package download. This uses an in-process Ganache chain (chain ID 1337) without a listening RPC server or real funds. The first run writes `evm-evidence.json` and `gas-trials.csv`; move both elsewhere before repeating. No `.env`, private keys or public RPC endpoints needed. Record compiler, dependency versions (`npm ls --depth=0`), receipt gas, payload sizes, fresh contract state and source hash. The packaged runner has not been executed in the build environment because its dependencies could not be downloaded. Review dependencies before installing, and use this only as an educational development environment.

References: https://remix-ide.readthedocs.io/en/latest/create_deploy.html ; https://remix-ide.readthedocs.io/en/latest/compile.html ; https://remix-ide.readthedocs.io/en/latest/unittesting.html ; https://ethereum.org/developers/docs/smart-contracts/testing/ ; https://ethereum.org/developers/docs/networks/ ; https://docs.soliditylang.org/en/v0.8.28/security-considerations.html

## Verification update
Run from the extracted blockchain directory: `node --version`, `npm --version`, `npm install`, `npm ls --depth=0`, `npm test`. The updated runner checks exact revert selectors with static calls and failed transaction receipts; use two distinct fresh GasStudy deployments for paired conditions, confirm actual stored bytes and digest, and exclude deployment gas. This runner is syntax-checked only: npm registry DNS failed and dependencies were unavailable in this audit. Do not assume compilation or execution success. Official Remix deployment instructions: https://remix-ide.readthedocs.io/en/latest/run.html

## Advanced B10–B15
See the portal guide ADVANCED_167_GUIDE.md. Install the pinned packages with npm install, then run npm run test:advanced (13 expected checks, actual EVM execution pending). Archive advanced-evm-evidence.json before repeating. No public RPC or wallet keys.
