Skip to content

Commit

Permalink
README
Browse files Browse the repository at this point in the history
  • Loading branch information
kristoferlund committed Nov 7, 2024
1 parent 4851b1f commit f7ef2b5
Showing 1 changed file with 39 additions and 21 deletions.
60 changes: 39 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,49 +35,67 @@ canister calls to provide a responsive UI.
Instead, the frontend queries the balance from an Ethereum RPC endpoint. This
is more efficient than making a canister call.

## Prerequisites
## Setup, pre-requisites

### `dfx`
#### Etherscan API key

The project requires the IC developer environment to be installed.
An [Etherscan API key](https://etherscan.io/apis) is required to query the wallet ETH balance. Creating an Etherscan account is free.

- [Installation instructions](https://internetcomputer.org/docs/current/developer-docs/backend/rust/dev-env)
Save the API key to a file named `.env.local` in the root of the project:

### `pnpm`
```bash
echo "VITE_ETHERSCAN_API_KEY=YOUR_API_KEY" > .env.local
```

Use `pnpm` to install the frontend dependencies.
## Setup, dev environment

- [Installation instructions](https://pnpm.io/installation)
There are two main ways to set up the dev environment:

### Etherscan API key
### 1. Using a VS Code Dev Container

An Etherscan API is required to query the wallet ETH balance.
The dev containers extension lets you use a Docker container as a full-featured
development environment. This repository includes a dev container configuration
that you can use to open the project with all the necessary tools and
dependencies pre-installed.

- [Get an API key](https://etherscan.io/apis)
Pre-requisites:

Save the API key to a file named `.env.local` in the root of the project:
- [Docker](https://www.docker.com/products/docker-desktop)
- [Visual Studio Code](https://code.visualstudio.com/)
- [Dev Containers Extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)

```bash
echo "VITE_ETHERSCAN_API_KEY=YOUR_API_KEY" > .env.local
```
Once Docker, Visual Studio Code and the Dev Containers Extension are installed,
you can open the project in a container by clicking the button below:

[![Open locally in Dev Containers](https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/ic-alloy/ic-alloy-basic-wallet)

## Build and deploy
### 2. Setup manually

### 1. Start the local IC replica
Pre-requisites:

- [Local Internet Computer dev environment](https://internetcomputer.org/docs/current/developer-docs/backend/rust/dev-env)
- [pnpm](https://pnpm.io/installation)

Once you have the prerequisites installed, you can clone this repository and run
the project.

## Running the project

### 1. Start the Internet Computer

```bash
dfx start --background --clean
dfx start --background
```

### 2. Install frontend dependencies
### 2. Install dependencies

```bash
```
pnpm install
```

### 3. Deploy
### 3. Deploy the canisters

```bash
```
dfx deploy
```

Expand Down

0 comments on commit f7ef2b5

Please sign in to comment.