This template gives you everything you need to build a full-stack Web3 application on the Internet Computer. It includes a frontend built with Vite and React, a backend written in Rust, and the EVM RPC canister to directly connect to Ethereum or other EVM-based blockchains.
In Gitpod
or GitHub Codespaces
Make sure you have you have Docker and VS Code installed and running, then click the button below
Make sure that Node.js >= 21
and dfx
>= 0.18
are installed on your system.
Run the following commands in a new, empty project directory:
git clone https://github.com/fxgst/evm-rpc-rust.git # Download this starter project
cd evm-rpc-rust # Navigate to the project directory
dfx start --clean --background # Run dfx in the background
npm install # Install project dependencies
npm run setup # Install packages, deploy canisters, and generate type bindings
npm start # Start the development server
The frontend will update automatically as you save changes.
For the backend, run dfx deploy backend
to redeploy.
To redeploy all canisters (front- and backend), run dfx deploy
.
When ready, run dfx deploy --network ic
to deploy your application to the ICP mainnet.
- Vite: high-performance tooling for front-end web development
- React: a component-based UI library
- TypeScript: JavaScript extended with syntax for types
- Sass: an extended syntax for CSS stylesheets
- Prettier: code formatting for a wide range of supported languages
- Rust CDK: the Canister Development Kit for Rust
- EVM RPC canister: call Ethereum RPC methods from the Internet Computer
- Internet Computer docs
- Internet Computer wiki
- Internet Computer forum
- Vite developer docs
- React quick start guide
dfx.json
reference schema- Rust developer docs
- EVM RPC developer docs
- Developer Experience Feedback Board
- If the links printed by dfx do not work in Codespaces, run
./canister_urls.py
and click the links shown there. - If you get an error
The wasm of 7hfb6-caaaa-aaaar-qadga-cai in pulled cache ...
runrm -rf ~/.cache/dfinity/pulled/7hfb6-caaaa-aaaar-qadga-cai
- Customize your project's code style by editing the
.prettierrc
file and then runningnpm run format
. - Split your frontend and backend console output by running
npm run frontend
andnpm run backend
in separate terminals.