Skip to content

Commit

Permalink
Merge pull request #103 from gnosis/update-docs
Browse files Browse the repository at this point in the history
Update v2.0.0 documentation
  • Loading branch information
cag authored Sep 2, 2020
2 parents 9f19bd0 + 7022ec3 commit c74fed1
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import CPK from 'contract-proxy-kit'
* web3.js 1.2
* web3.js 2.0 alpha
* ethers.js 4.0
* ethers.js 5.0

### CPK.create

Expand Down Expand Up @@ -93,6 +94,7 @@ const cpk = await CPK.create({

Please refer to the `migrations/` folder of this package for information on how to deploy the required contracts on a network, and note that these addresses must be available for the connected network in order for *CPK* creation to be successful.

<!---
#### Transaction relayer configuration
By default, the CPK will not use any transaction relayer. However, the [Safe Relay Service](https://github.com/gnosis/safe-relay-service) can be used to submit all the transactions when the optional property `transactionManager` is passed to the CPK constructor with an instance of the class `SafeRelayTransactionManager`.
Expand All @@ -108,9 +110,10 @@ const cpk = await CPK.create({
The URL of the [Safe Relay Service](https://github.com/gnosis/safe-relay-service) is different depending on the network:
- Mainnet: https://safe-relay.gnosis.io/
- Rinkeby: https://safe-relay.rinkeby.gnosis.io/

--->
### CPK#getOwnerAccount


This may be used to figure out which account the proxy considers the owner account. It returns a Promise which resolves to the owner account:

```js
Expand Down Expand Up @@ -321,6 +324,16 @@ Run the tests against the local network:
yarn test
```

## Run your app as a Safe App

*CPK* uses the [Safe Apps SDK](https://github.com/gnosis/safe-apps-sdk), making your app available to be run in an iframe inside the [Safe Web UI](https://gnosis-safe.io/).

Once your app is ready to be deployed make sure to follow these [steps to run your app as a Safe app](https://github.com/gnosis/safe-apps-sdk#testing-in-the-safe-multisig-application). Apart from that, no extra configuration is needed.

When running your app inside the *Safe Web UI*, the configuration used to instantiate the *CPK* will be ignored because the responsability to send transactions is now tranferred to the *Safe Web UI* and the wallet connected to it.

If needed, the method `CPK.isSafeApp()` is available to check if the app using the *CPK* is running as a Safe app or not.

## In-depth Guide

The Contract Proxy Kit operates primarily using the following technologies:
Expand Down

0 comments on commit c74fed1

Please sign in to comment.