Skip to content

Latest commit

 

History

History
113 lines (78 loc) · 3.51 KB

FIREFOX_README.md

File metadata and controls

113 lines (78 loc) · 3.51 KB

NOTICE FOR FIREFOX ADD-ON REVIEWERS

This is the monorepo which contains the source code for Namada Extension. Please follow the instructions exactly as they are described below.

Table of Contents

Build instructions

NOTE The add-on submission was built in the following environment:

  • Ubuntu Desktop 24.04 LTS ARM64 - Please ensure your environment matches this to produce an identical build!
  • Docker version 27.x

Follow these instructions to build with Docker:

  1. Verify that Docker 27+ is installed in your system before proceeding with the build:
docker --version
  1. From the source code root, build the Docker image:
docker build . --target firefox -t namada-keychain-firefox -f docker/extension/Dockerfile
  1. Wait for the build to complete, and then copy the files from the container by executing the following command in the source code root:
docker run --rm -v ./apps/extension/build:/shared namada-keychain-firefox cp -r /app/apps/extension/build/. /shared/
  1. The resulting extension is the ZIP file in apps/extension/build/firefox.

[ Table of Contents ]

Notes

Installing Docker

If Docker is not currently installed in your environment, please refer to the instructions of the official Docker documentation.

The steps we took to install Docker on Ubuntu Desktop 24.04 ARM64 are as follows:

  1. Remove any pre-existing Docker-related packages:
for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done
  1. Setup Docker repository and install keyring
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
  1. Install Docker packages:
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
  1. Post-install - Add docker group to user:
# If docker group doesn't currently exist:
sudo groupadd docker

# Add current user to docker group:
sudo usermod -aG docker $USER
  1. Log out, then log back in for group to take effect! This is to ensure that you don't need to run our Docker commands as root via sudo.

[ 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 ]