-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extension: Update to Firefox docs (#1398)
* fix: make even more explicit instructions for FF * docs: add environment details * fix: accept REVISION as env var, specify in instructions * fix: update CI to provide revision env var, docs * fix: update .env overrides
- Loading branch information
Showing
7 changed files
with
100 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
# Specify the following if you wish to override the defaults defined in @namada/chains: | ||
# Specify the following if you wish to override the defaults: | ||
|
||
# NAMADA | ||
# Override default approved signing chain ID | ||
NAMADA_INTERFACE_NAMADA_CHAIN_ID=namada-testnet.ddf12d74622ca25f3ad6fe14 | ||
|
||
# Override revision - useful if building source outside of a git repo | ||
NAMADA_INTERFACE_REVISION=8916680a2bcd43f1ef54b47e2d0213d1d02abbfb | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,105 @@ | ||
# NOTICE FOR FIREFOX ADD-ON REVIEWERS | ||
|
||
This is the monorepo which contains the source code for Namada Extension. | ||
This is the monorepo which contains the source code for Namada Extension. Please follow the instructions | ||
exactly as they are described below. | ||
|
||
## Source code | ||
## Table of Contents | ||
|
||
The main extension source code is located in `apps/extension/src`. We also use | ||
several local packages; their sources are in: | ||
|
||
- `packages/chains/src` | ||
- `packages/components/src` | ||
- `packages/hooks/src` | ||
- `packages/sdk/src` | ||
- `packages/storage/src` | ||
- `packages/types/src` | ||
- `packages/utils/src` | ||
- `packages/shared/lib` (shared package Rust code compiled to WebAssembly) | ||
- `packages/shared/src` (shared package TypeScript glue code) | ||
- `packages/crypto/lib` (crypto package Rust code compiled to WebAssembly) | ||
- `packages/crypto/src` (crypto package TypeScript glue code) | ||
- [Build Instructions](#build-instructions) | ||
- [Notes](#notes) | ||
- [Environment](#environment) | ||
- [Setting up Node & NPM](#setting-up-node-and-npm) | ||
- [Source Code](#source-code) | ||
|
||
## Build instructions | ||
|
||
If you don't already have Node v20 LTS and NPM v10, install now via `nvm`: | ||
|
||
```bash | ||
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash | ||
|
||
# Enable nvm in current shell | ||
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" | ||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" | ||
**NOTE**: You _must_ use `yarn` to install dependencies! This is due to the fact that this is configured as a monorepo | ||
using yarn workspaces. If you install via `npm install` or `npm i`, it will not resolve dependencies correctly. | ||
|
||
# Install v20 LTS | ||
nvm install v20.9.0 | ||
``` | ||
If you don't already have Node v22 LTS and NPM v10, please follow these [instructions](#setting-up-node-and-npm) | ||
|
||
These instructions should work for the default reviewer build environment. | ||
|
||
```bash | ||
sudo apt install protobuf-compiler build-essential curl pkg-config libssl-dev binaryen | ||
sudo apt install protobuf-compiler build-essential curl pkg-config libssl-dev binaryen -y | ||
curl https://sh.rustup.rs -sSf | sh | ||
|
||
# Proceed with standard installation when prompted | ||
|
||
# Make sure to pull cargo into your current environment: | ||
. "$HOME/.cargo/env" | ||
|
||
# You must use yarn to install dependencies: | ||
npm install -g yarn | ||
export PUPPETEER_SKIP_DOWNLOAD=true | ||
|
||
# Run yarn to install dependencies | ||
yarn | ||
|
||
# Move into extension app directory | ||
cd apps/extension | ||
|
||
# Build wasm dependency: | ||
yarn wasm:build | ||
``` | ||
|
||
Then, issue the final build command for the Firefox add-on: | ||
|
||
```bash | ||
# Build the addon: | ||
yarn build:firefox | ||
``` | ||
|
||
The resulting extension is the ZIP file in `apps/extension/build/firefox`. | ||
|
||
[ [Table of Contents](#table-of-contents) ] | ||
|
||
## Notes | ||
|
||
### Environment | ||
|
||
This build was produced using the following environment: | ||
|
||
- Ubuntu 24.04 LTS (Desktop edition) | ||
- 10GB of system memory (RAM) | ||
- 6 cores of vCPU | ||
- Node 22 LTS and npm 10 | ||
- 35GB of storage | ||
|
||
Please ensure that this matches your environment! | ||
|
||
[ [Table of Contents](#table-of-contents) ] | ||
|
||
### Setting up Node and NPM | ||
|
||
```bash | ||
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash | ||
|
||
# Enable nvm in current shell | ||
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" | ||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" | ||
|
||
# Install v22 LTS | ||
nvm install v22.0.0 | ||
``` | ||
|
||
[ [Table of Contents](#table-of-contents) ] | ||
|
||
### Source code | ||
|
||
The main extension source code is located in `apps/extension/src`. We also use | ||
several local packages; their sources are in: | ||
|
||
- `packages/chains/src` | ||
- `packages/components/src` | ||
- `packages/hooks/src` | ||
- `packages/sdk/src` | ||
- `packages/storage/src` | ||
- `packages/types/src` | ||
- `packages/utils/src` | ||
- `packages/shared/lib` (shared package Rust code compiled to WebAssembly) | ||
- `packages/shared/src` (shared package TypeScript glue code) | ||
- `packages/crypto/lib` (crypto package Rust code compiled to WebAssembly) | ||
- `packages/crypto/src` (crypto package TypeScript glue code) | ||
|
||
[ [Table of Contents](#table-of-contents) ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e44a285
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Published on https://namada-interface-dev.netlify.app as production
🚀 Deployed on https://6759a8c1825202350088788e--namada-interface-dev.netlify.app