Skip to content

Repository files navigation

Safe Web Core

LicenseTestsGitHub package.json version (branch)GitPOAP Badge

The default Safe web interface.

Contributing

Contributions, be it a bug report or a pull request, are very welcome. Please check our contribution guidelines beforehand.

Getting started with local development

Environment variables

Create a .env file with environment variables. You can use the .env.example file as a reference.

Here's the list of all the required and optional variables:

Env variableDescription
NEXT_PUBLIC_IS_PRODUCTIONoptionalSet to true to build a minified production app
NEXT_PUBLIC_GATEWAY_URL_PRODUCTIONoptionalThe base URL for the Safe Client Gateway
NEXT_PUBLIC_GATEWAY_URL_STAGINGoptionalThe base CGW URL on staging
NEXT_PUBLIC_SAFE_VERSIONoptionalThe latest version of the Safe contract, defaults to 1.3.0
NEXT_PUBLIC_INFURA_TOKENrequiredInfura RPC API token
NEXT_PUBLIC_SAFE_APPS_INFURA_TOKENoptionalInfura token for Safe Apps, falls back to NEXT_PUBLIC_INFURA_TOKEN
NEXT_PUBLIC_WC_BRIDGEoptionalWalletConnect bridge URL, falls back to the public WC bridge
NEXT_PUBLIC_TENDERLY_ORG_NAMEoptionalTenderly org name for Transaction Simulation
NEXT_PUBLIC_TENDERLY_PROJECT_NAMEoptionalTenderly project name
NEXT_PUBLIC_TENDERLY_SIMULATE_ENDPOINT_URLoptionalTenderly simulation URL
NEXT_PUBLIC_BEAMER_IDoptionalBeamer is a news feed for in-app announcements
NEXT_PUBLIC_GOOGLE_TAG_MANAGER_IDoptionalGTM project id
NEXT_PUBLIC_GOOGLE_TAG_MANAGER_DEVELOPMENT_AUTHoptionalDev GTM key
NEXT_PUBLIC_GOOGLE_TAG_MANAGER_LATEST_AUTHoptionalPreview GTM key
NEXT_PUBLIC_GOOGLE_TAG_MANAGER_LIVE_AUTHoptionalProduction GTM key
NEXT_PUBLIC_SENTRY_DSNoptionalSentry id for tracking runtime errors

If you don't provide some of the optional vars, the corresponding features will be disabled in the UI.

Running the app locally

Install the dependencies:

yarn

Run the development server:

yarn start

Open http://localhost:3000 with your browser to see the app.

Lint

ESLint:

yarn lint --fix

Prettier:

yarn prettier

Tests

Unit tests:

yarn test --watch

Cypress tests

Build and generarate a static site:

yarn build && yarn export

Serve the static files:

yarn serve

Launch the Cypress UI:

yarn cypress:open

You can then choose which e2e tests to run.

Component template

To create a new component from a template:

yarn cmp MyNewComponent

Frameworks

About

The new Safe web interface

Resources

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages