Transaction Builder Safe App
yarn
yarn start
This will run a local instance of the Safe app. To test it properly you need to run a local instance of the https://github.com/gnosis/safe-react repository.
Furthermore you need to configure the local http server to allow cors
Modify this file node_modules/react-scripts/config/webpackDevServer.config.js
by adding these lines:
headers: {
"Access-Control-Allow-Origin": "\*",
"Access-Control-Allow-Methods": "GET",
"Access-Control-Allow-Headers": "X-Requested-With, content-type, Authorization"
},
This requires that you have ipfs
installed (see https://gist.github.com/MiguelBel/b3b5f711aa8d9362afa5f16e4e972461)
yarn build
ipfs add -r build
Create Safe app with typescript support using yarn as a package manager.
npx create-react-app sapps_getting_started --typescript
cd sapps_getting_started
yarn add https://github.com/gnosis/safe-apps-sdk
- add
description
andiconPath
tomanifest.json
(see https://github.com/gnosis/safe-apps-sdk) - Setup cors as mentioned in the readme of https://github.com/gnosis/safe-react-apps
- Call
initSdk
with[/.*localhost.*/]
- this allows to use your local safe-react instance - Add listeners (see https://github.com/gnosis/safe-apps-sdk)
- Install ipfs (https://gist.github.com/MiguelBel/b3b5f711aa8d9362afa5f16e4e972461)
ipfs init
yarn build
- Make sure that the ipfs deamon is running
ipfs deamon
ipfs add -r build