Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rmeissner/sapp-tx-builder
https://github.com/rmeissner/sapp-tx-builder
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/rmeissner/sapp-tx-builder
- Owner: rmeissner
- Created: 2020-04-29T11:55:55.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-01-06T01:26:35.000Z (almost 4 years ago)
- Last Synced: 2023-08-01T08:07:06.086Z (over 1 year ago)
- Language: TypeScript
- Size: 1.82 MB
- Stars: 1
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Transaction Builder Safe App
### Running this project
```bash=
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:
```js=
headers: {
"Access-Control-Allow-Origin": "\*",
"Access-Control-Allow-Methods": "GET",
"Access-Control-Allow-Headers": "X-Requested-With, content-type, Authorization"
},
```### Deploy to IPFS
This requires that you have `ipfs` installed (see https://gist.github.com/MiguelBel/b3b5f711aa8d9362afa5f16e4e972461)
```bash=
yarn build
ipfs add -r build
```### Notes: How to setup a Safe app from scratch
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` and `iconPath` to `manifest.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`