diff --git a/README.md b/README.md index a0e71e4..00a4d3a 100644 --- a/README.md +++ b/README.md @@ -21,46 +21,37 @@ Move to the `backend` folder and build smart contracts: pnpm build ``` -Next, deploy the contract. +Then, prepare your hex-encoded private key for paying the deployment gas fee +and store it as an environment variable: -### Basic Local Hardhat Deployment +```shell +export PRIVATE_KEY=0x... +``` -Start the hardhat node: +To deploy the contracts to the [Sapphire Localnet], Testnet or Mainnet, use +one of the following commands: -```sh -npx hardhat node +```shell +npx hardhat deploy --network sapphire-localnet +npx hardhat deploy --network sapphire-testnet +npx hardhat deploy --network sapphire ``` -Deploy smart contracts to that local network: +If you don't need any Sapphire-specific precompiles, you can spin up the +hardhat node and deploy the contract locally: -```sh +``` +npx hardhat node npx hardhat deploy --network localhost ``` -The deployed MessageBox address will be reported. Remember it and store it +Once deployed, the MessageBox address will be reported. Remember it and store it inside the `frontend` folder's `.env.development`, for example: ``` VITE_MESSAGE_BOX_ADDR=0x5FbDB2315678afecb367f032d93F642f64180aa3 ``` -### Deploying to Sapphire Localnet, Testnet and Mainnet - -Prepare your hex-encoded private key and store it as an environment variable: - -```shell -export PRIVATE_KEY=0x... -``` - -To deploy the contracts to the [Sapphire Localnet], Testnet or Mainnet, use the -following commands respectively: - -```shell -npx hardhat deploy --network sapphire-localnet -npx hardhat deploy --network sapphire-testnet -npx hardhat deploy --network sapphire -``` - [Sapphire Localnet]: https://github.com/oasisprotocol/oasis-web3-gateway/pkgs/container/sapphire-dev ## Frontend