Skip to content

A repository for applications for Safe Web Interface

License

Notifications You must be signed in to change notification settings

DistributedCollective/safe-react-apps

 
 

Repository files navigation

Safe Apps

Logo

license build tests

This project its a mono-repo of safe apps. Initially forked from safe-global/safe-react-apps. Links to source: Staging and Production

List of safe apps supported by Protofire

We currently support only those EVM chain-agnostic dapps we see can bring tangible value to the projects we maintain and their users.

The Transaction Builder allows users to compose lists of transactions, execute them in a single batch to save gas, and export the list as a template for later re-use. The tool guarantees the atomicity of the execution; If any transaction fails, every transaction on the list will revert. Use case: Payroll, list of custom transactions, document complex Defi workflows, create templates for recurrent workflows

CSV Airdrop App

Send arbitrarily many distinct tokens, to arbitrarily many distinct accounts with various different values from a CSV file in a single transaction. Use case: Payroll, easier than Transaction Builder for spreadsheet users.

Drain Account safe app provides a quick and easy way to drain every asset associated with the account on a given network. Useful to drain funds from compromised safes. Use case: emergency use in case of compromised security of a safe and its assets

Wallet Connect safe apps allows safe users to connect a Safe with dApps supporting wallet connect's protocol. Once a WC safe app is open, the user can open a dapp on a different tab/browser/device and connect to it by pasting the connection URL or scanning the dapp's QR code. Use cases: connect safe to other dApps


Install

Install dependencies

yarn install

Configure

Configure your .env file starting from .env.example one. You will find the necessary example on each app folder. Fill the provided example values with the necessary information. Don't forget to add your infura API key. If no example file is provided inside the app folder the .env file is not needed.

Build

We use yarn workspaces to handle different apps inside this project. All apps are built with this command:

yarn build

Run locally

You can also run each app locally using the following commands:

yarn start:drain-safe
yarn start:ramp-network
yarn start:tx-builder
yarn start:wallet-connect

Contracts

This project contains some test contracts to check all solidity types in the tx-builder Safe App.

You can deploy your own tests contracts using the following command:

yarn workspace tx-builder contract:deploy-all <network>

you can invoke a read method using the command line:

yarn workspace tx-builder contract:read-method --network <network> --address <address> --method <method>

Project structure

In ./apps you can find one folder per each integration app Gnosis develops.

Also, each app must expose a manifest.json in order to be accepted by the Safe, you can find it in their ./public folder. Besides the manifest.json file we also include the app Icon.

This will allow the Safe to consume these resources like so: https://apps.gnosis-safe.protofire.io//tx-builder/manifest.json

How to Develop a third-party App

Documentation about how to develop and integrate your third-party app can be found here.

For developers

Inside each app folder you can find a config-overrides.js that shows how to modify headers with the next information. This is necessary for your app to work properly.

headers: {
    "Access-Control-Allow-Origin": "\*",
    "Access-Control-Allow-Methods": "GET",
    "Access-Control-Allow-Headers": "X-Requested-With, content-type, Authorization"
},

Environments

These apps are deployed in the following environments.

Run e2e tests

This repo provides e2e tests using Cypress. Ideally to be used on CI can also be handy to check locally that everything works as expected. To run them it will be necessary to provide the following ENV parameters, that can be filled in a .env file at the root of the project

Example:

CYPRESS_WEB_BASE_URL=https://app.safe.global
CYPRESS_CHAIN_ID=1
CYPRESS_NETWORK_PREFIX=rin
CYPRESS_TESTING_SAFE_ADDRESS=0x0000000000000000000000000000000000000000
CYPRESS_CLIENT_GATEWAY_BASE_URL=https://safe-client.safe.global

Make sure to enter the desired values, for example a Safe address that you own

Deprecated Apps

Latest code version from deprecated apps can be found in the following links:

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

A repository for applications for Safe Web Interface

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 66.7%
  • HTML 24.3%
  • JavaScript 5.6%
  • Solidity 3.1%
  • Other 0.3%