-
yarn add @gnosis.pm/safe-contracts -
Optional for testing
yarn add eth-lightwallet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| contract Enum { | |
| enum Operation { | |
| Call, | |
| DelegateCall | |
| } | |
| } | |
| contract MasterCopy { | |
| event ChangedMasterCopy(address masterCopy); |
Create Safe app with typescript support using yarn as a package manager.
npx create-react-app sapps_getting_started --typescriptcd sapps_getting_startedyarn add https://github.com/gnosis/safe-apps-sdk- add
descriptionandiconPathtomanifest.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
initSdkwith[/.*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)
- Add
.env.developmentwith
HTTPS=true
PORT=3002
- Add http-proxy-middleware
yarn add http-proxy-middleware- Add
setupProxy.jsin./srcwith
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import EIP712Domain from "eth-typed-data"; | |
| import BigNumber from "bignumber.js"; | |
| import * as ethUtil from 'ethereumjs-util'; | |
| import { ethers } from "ethers"; | |
| import axios from "axios"; | |
| /* | |
| * Safe relay service example | |
| * * * * * * * * * * * * * * * * * * * */ |
This guide outlines how to create a template that can be used with https://rimeissner.dev/transaction-templates/
A template is a json file that has a root object with the properties name, inputs, txs.
The inputs are used together with the txs to generated the final transactions. Also a simple interface with input fiels is generated for the specified inputs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: Unlicense | |
| pragma solidity >=0.7.0 <0.9.0; | |
| // src/SafeDeployer141.sol | |
| contract SafeDeployer141 { | |
| // These addresses must be predeployed on worldchain to ensure that wallet address calc is deterministic | |
| address public SAFE_PROXY_FACTORY_ADDRESS = 0x4e1DCf7AD4e460CfD30791CCC4F9c8a4f820ec67; | |
| address public SAFE_L2_SINGLETON_ADDRESS = 0x29fcB43b46531BcA003ddC8FCB67FFE91900C762; |