Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Commit

Permalink
maintenance
Browse files Browse the repository at this point in the history
  • Loading branch information
nikozalo committed Nov 13, 2020
1 parent 9dd0ad7 commit 0560314
Show file tree
Hide file tree
Showing 38 changed files with 179 additions and 750 deletions.
2 changes: 1 addition & 1 deletion Oasis/oasis-direct-proxy/oasis-direct-proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,4 +182,4 @@ In this guide you have learned how to use your proxy contract to execute Oasis D

## Help

- If you need help reach us at the #dev channel in [https://chat.makerdao.com/channel/dev](https://chat.makerdao.com/channel/dev)
- If you need help reach out in the #dev channel in [https://chat.makerdao.com/channel/dev](https://chat.makerdao.com/channel/dev)
26 changes: 6 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Developer Guides and Tutorials

Developers can build a variety of experiences using one or more components of the Maker Protocol. This repo contains guides and tutorials to help you understand various approaches to integrate with the Maker Protocol and our partners by interfacing with smart contracts, SDKs, APIs, and products.
Developers can build a variety of experiences using one or more components of the Maker Protocol. This repo contains guides and tutorials to help you understand various approaches to integrate with the Maker Protocol by interfacing with smart contracts, SDKs, APIs, and products.

All guides are organized in sections and by proficiency levels within each section.

## Dai

- [Dai Token](./dai/dai-token/dai-token.md)
- [Listing Dai or MKR](./exchanges/exchanges-guide/exchanges-guide.md)
- [Dai in Smart Contracts](./dai/dai-in-smart-contracts/dai-in-smart-contracts.md)
- [Tracking Dai Supply](./dai/dai-supply/dai-supply.md)
- [How to use Permit Function and Relayers to Pay Gas for Dai Transactions in Dai](./dai/how-to-use-permit-function/how-to-use-permit-function.md)

## Dai Savings Rate (DSR)

- [Dai Savings Rate integration guide](./dai/dsr-integration-guide/dsr-integration-guide.md)
- [DsrManager documentation](/dai/dsr-manager-docs/dsr-manager-docs.md)

## Vaults

Expand All @@ -32,15 +32,15 @@ All guides are organized in sections and by proficiency levels within each secti
- [Introduction and Overview of Multi-Collateral Dai: MCD101](./mcd/mcd-101/mcd-101.md)
- [Using MCD-CLI to create and close a Vault on Kovan](./mcd/mcd-cli/mcd-cli-guide/mcd-cli-guide.md)
- [Using Seth to create and close a Vault on Kovan](./mcd/mcd-seth/mcd-seth.md)
- [Upgrading to MCD - overview for different partners](./mcd/upgrading-to-multi-collateral-dai/upgrading-to-multi-collateral-dai.md)
- [Add a new collateral type to Maker Protocol - Kovan](./mcd/add-collateral-type-testnet/add-collateral-type-testnet.md)
- [Intro to the Rate mechanism](./mcd/intro-rate-mechanism/intro-rate-mechanism.md)

## Keepers (Collateral Auctions, Debt Auctions, Arbitrage)
## Keepers

- [Keeper Guides Repo](./keepers/README.md)
- [Auction Keeper Setup Guide](./keeper/../keepers/auction-keeper-bot-setup-guide/auction-keeper-bot-setup-guide.md)
- [Simple Arbitrage Keeper](./keeper/../keepers/simple-arbitrage-keeper/simple-arbitrage-keeper.md)
- [Market Makers](./market-makers/market-makers.md)

## Developer Tools

Expand All @@ -49,7 +49,7 @@ All guides are organized in sections and by proficiency levels within each secti
- [Working with DSProxy](./devtools/working-with-dsproxy/working-with-dsproxy.md)
- [How to build a Dai.js wallet plugin](./devtools/Dai.js/How-to-build-dai-js-wallet-plugin.md)

## Oasis Exchange
## OasisDEX Protocol

- [Intro to OasisDEX Protocol](./Oasis/intro-to-oasis/intro-to-oasis.md)
- [How to use Oasis Direct Proxy on OasisDEX Protocol](./Oasis/oasis-direct-proxy/oasis-direct-proxy.md)
Expand All @@ -60,30 +60,16 @@ All guides are organized in sections and by proficiency levels within each secti

- [Vote Proxy Setup: Air-gapped Machine](./governance/vote-proxy-setup-airgapped-machine/vote-proxy-setup-airgapped-machine.md)

## Partners

- [Setting up real money transfers using Wyre API](./partners/wyre-guide/wyre-guide.md)

### Gnosis Multisig Wallet

- [Migrating Sai to Dai using Gnosis Multisig Wallet UI](./gnosis-multisig/migrating-gnosis-multisig-guide/migrating-gnosis-multisig-guide.md)
- [Activating Dai Savings Rate on Dai in Gnosis Multisig Wallet](./gnosis-multisig/dsr-gnosis-multisig-guide/dsr-gnosis-multisig-guide.md)
- [Vote Proxy Setup with Gnosis Multisig Wallet](./gnosis-multisig/vote-proxy-setup-gnosis-multisig/vote-proxy-setup-gnosis-multisig.md)
- [Add Dai to DSR through DsrManager with Gnosis Multisig](./gnosis-multisig/dsr-gnosis-multisig-guide/dsr-manager-gnosis-multisig-guide.md)

## Partner compilations

In order to ensure that integration partners can get up and running quickly, relevant documentation for specific partner types have been compiled in a series of guides.

- [Upgrading to Multi-Collateral Dai](./mcd/upgrading-to-multi-collateral-dai/upgrading-to-multi-collateral-dai.md)
- [Exchanges](./exchanges/README.md)
- [Wallets](./wallets/wallets/wallets.md)
- [Remittance services](./remittance/remittance.md)
- [Market Makers](./market-makers/market-makers.md)

## Contribution guidelines

We welcome submissions of guides and tutorials that cover new types of integrations! Following these guidelines will help us maintain consistency,
Submissions of new guides and tutorials are very welcome! Following these guidelines will help us maintain consistency,

- Include all the sections present in this [sample guide](./sample/sample-guide/sample-guide.md)
- Create a folder with one markdown file using the same name
Expand Down
2 changes: 0 additions & 2 deletions dai/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,4 @@ The Dai stablecoin is a collateral-backed cryptocurrency whose value is stable r

[DSR Integration Guide](/dai/dsr-integration-guide/dsr-integration-guide-01.md)

[DsrManager documentation](/dai/dsr-manager-docs/README.md)

## Advanced
1 change: 0 additions & 1 deletion dai/dai-in-smart-contracts/dai-in-smart-contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,5 +234,4 @@ In this guide, we showcased how you can integrate the Dai token in a smart contr

## Help

- Contact integrations team - [email protected]
- Rocket chat - [#dev](https://chat.makerdao.com/channel/dev) channel
7 changes: 2 additions & 5 deletions dai/dai-token/dai-token.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@

## Overview

Dai is a decentralized, unbiased, collateral-backed cryptocurrency soft-pegged to the US Dollar. Resistant to hyperinflation due to its low volatility, Dai offers economic freedom and opportunity to anyone, anywhere.

The token contract conforms to the ERC20 token standard which allows wallets, exchanges, and other applications to easily integrate with minimal effort. This guide will be useful to developers integrating Dai in applications like wallets, exchanges, and smart contracts to get a better understanding of the token contract and its functionality.
Dai is a decentralized stablecoin built on Ethereum. The Dai token contract conforms to the ERC20 token standard which allows wallets, exchanges, and other applications to easily integrate with minimal effort. This guide will be useful to developers integrating Dai in applications like wallets, exchanges, and smart contracts to get a better understanding of the token contract and its functionality.

## Learning Objectives

Expand Down Expand Up @@ -191,5 +189,4 @@ In this guide, we briefly discussed the technical details of the Dai token contr

## Help

- Contact Integrations team - [email protected]
- Rocket chat - #dev channel
- Rocket chat - [#dev](https://chat.makerdao.com/channel/dev) channel
4 changes: 1 addition & 3 deletions dai/dsr-integration-guide/dsr-integration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,4 @@ In this guide, we covered the basics of DSR, and how to properly integrate DSR,

## Need help

- Contact Integrations team - [[email protected]](mailto:[email protected])

- Rocket chat - #dev channel
- Rocket chat - [#dev](https://chat.makerdao.com/channel/dev) channel
2 changes: 0 additions & 2 deletions dai/how-to-use-permit-function/how-to-use-permit-function.md
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,4 @@ In this guide we have shown you the building blocks of the Dai permit function a

For any questions reach us at:

- [[email protected]](mailto:[email protected])

- #dev channel in [chat.makerdao.com](https://chat.makerdao.com/)
9 changes: 4 additions & 5 deletions devtools/Dai.js/How-to-build-dai-js-wallet-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

## Overview

In this guide, we’ll walk you through building your own Dai.js plugin that integrates a wallet provider. As we know, there are many wallet providers out there. In order for these wallet providers to interact with the Maker suite of dapps (oasis.app, governance dashboard, migration app), they have to integrate through the Dai.js SDK. As this SDK is used in the Maker dapps, your wallet can be used to interact with the Maker Protocol.
This guide will walk you through building your own Dai.js plugin that integrates a wallet provider. There are many wallet providers out there, and in order for these wallet providers to interact with the Maker suite of dapps (oasis.app, governance dashboard, migration app), they have to integrate through the Dai.js SDK. As this SDK is used in the Maker dapps, your wallet can be used to interact with the Maker Protocol.

## Learning Objectives

Expand Down Expand Up @@ -72,7 +72,7 @@ Anytime the user will choose your account type to initialise the wallet from the

This is the main pattern for how to integrate a third party wallet into the Dai.js SDK. Next, you will see some examples of how different partners have integrated.

## Examples of partners integrating with the plugin
## Examples of integrating with the plugin

There are different levels of complexity with which a third wallet provider could integrate with the Dai.js SDK. The level of complexity depends on the compatibility of this third party wallet provider with the SDK. The more compatible the easier it is to integrate.

Expand Down Expand Up @@ -275,15 +275,14 @@ Last thing, in [/src/components/AccountSelection.js](https://github.com/makerdao

## Summary

In this guide we walked you through the process of creating a Dai.js wallet plugin and showed you the general pattern to integrate. As a rule of thumb, the more compatible your web3 provider is with the Dai.js SDK, the easier it will be to build the plugin. If it’s not compatible we showed you how to adapt the plugin to be able to communicate with the SDK. Lastly, we showed you a live implementation of how to integrate your plugin with oasis.app.
This guide explained the process of creating a Dai.js wallet plugin and showed you the general pattern to integrate. As a rule of thumb, the more compatible your web3 provider is with the Dai.js SDK, the easier it will be to build the plugin. If it’s not compatible the guide showed you how to adapt the plugin to be able to communicate with the SDK. Lastly, it covered a live implementation of how to integrate your plugin with oasis.app.

## Additional Resources

If you want to dive deeper into the web3 providers, have a look at Metamask’s [web3-provider-engine repo](https://github.com/MetaMask/web3-provider-engine).

## Help

For any help, you can reach us at:
For any help, you can reach out at:

- [#dev](https://chat.makerdao.com/channel/dev) chat in [chat.makerdao.com](https://chat.makerdao.com/channel/dev).
- Contact Integrations Team: <[email protected]>
22 changes: 11 additions & 11 deletions devtools/seth/seth-guide/seth-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@ Seth is a simple, but powerful command line tool created to interface with the E

## Getting started

In the following section we will go through the installation and setup of Seth. These steps only work on Unix-based systems (i.e. Linux and macOS), however on Windows, you can try with an emulator, like [cmder](http://cmder.net/) or [cygwin](https://www.cygwin.com/), the [linux subsystem](https://docs.microsoft.com/en-us/windows/wsl/install-win10) in Windows 10, a virtual machine or a container.
In the following section you will go through the installation and setup of Seth. These steps only work on Unix-based systems (i.e. Linux and macOS), however on Windows, you can try with an emulator, like [cmder](http://cmder.net/) or [cygwin](https://www.cygwin.com/), the [linux subsystem](https://docs.microsoft.com/en-us/windows/wsl/install-win10) in Windows 10, a virtual machine or a container.

## Installation

Seth can be installed as a part of the Dapp Tools suite, which is a collection of blockchain tools created with the Unix philosophy in mind. The most convenient way to do this, is to install Dapp Tools with the one line script provided on the [webpage](https://dapp.tools/). Here is how to do it:

From the Dapp Tools page:

> If you are running GNU/Linux or macOS you can take advantage of our all in one installer.
> If you are running GNU/Linux or macOS you can take advantage of the all in one installer.
`$ curl https://dapp.tools/install | sh`

This script downloads the Nix package manager, setups binary cache with Cachix and installs our most used tools.
This script downloads the Nix package manager, setups binary cache with Cachix and installs the most used tools.

## Manual install

Expand Down Expand Up @@ -81,7 +81,7 @@ Nix wouln't be able to be installed on the Catalina OS due to it being stricted

## Set up and configuring variables

Configuring Seth can be done with environment variables or command line options. Environment variables can be generally used in two ways: you can save them in a configuration file named .sethrc in specific locations, like your home folder, or just set them only for the current terminal session. In this guide we will use environment variables with the latter approach for simplicity’s sake, however for ease-of-use in the future, we strongly encourage to save the variables in your project folder. Follow [this example](https://github.com/dapphub/dapptools/tree/master/src/seth#example-sethrc-file) to do so.
Configuring Seth can be done with environment variables or command line options. Environment variables can be generally used in two ways: you can save them in a configuration file named .sethrc in specific locations, like your home folder, or just set them only for the current terminal session. In this guide you will use environment variables with the latter approach for simplicity’s sake, however for ease-of-use in the future, it is strongly encouraged to save the variables in your project folder. Follow [this example](https://github.com/dapphub/dapptools/tree/master/src/seth#example-sethrc-file) to do so.

### Using a local private network

Expand All @@ -97,7 +97,7 @@ Then in a separate terminal let’s create an empty password file:

`$ touch pass`

And let’s create our environment variables:
And let’s create your environment variables:

export ETH_PASSWORD=$PWD/pass
export ETH_KEYSTORE=~/.dapp/testnet/8545/keystore
Expand Down Expand Up @@ -148,7 +148,7 @@ This indicates that the transaction was successful.

### seth call - Reading contract storage

Since we don't have any contracts deployed to our private network, **let's use Kovan from now on**. Let’s use one of the simplest contracts possible: an ERC-20 token contract. In this example, we are going to use a test collateral token (BAT). You can save its address in a variable with the following command:
Since you don't have any contracts deployed to your private network, **let's use Kovan from now on**. Let’s use one of the simplest contracts possible: an ERC-20 token contract. In this example, you are going to use a test collateral token (BAT). You can save its address in a variable with the following command:

`$ export BAT=0x9f8cfb61d3b2af62864408dd703f9c3beb55dff7`

Expand Down Expand Up @@ -188,7 +188,7 @@ The output is:

`500000000000000000000`

Now, that's a rather large value we got. The reason for this is that the contract stores the balances in wei unit (10^-18), which is why we have to convert it to get the actual number of BAT we own:
Now, that's a rather large value you got. The reason for this is that the contract stores the balances in wei unit (10^-18), which is why you have to convert it to get the actual number of BAT you own:

`$ seth --from-wei $(seth --to-dec $(seth call $BAT 'balanceOf(address)' $ETH_FROM)) eth`

Expand All @@ -198,15 +198,15 @@ The output is:

### seth block - Retrieving block information

With seth block, we are capable of querying any information about an Ethereum block. Here is the usage from the help option `$ seth block --help`:
With seth block, you are capable of querying any information about an Ethereum block. Here is the usage from the help option `$ seth block --help`:

Usage: seth block [-j|--json] <block> [<field>]
Print a table of information about <block>.
If <field> is given, print only the value of that field.

Like any other Seth command, this command depends on Ethereum JSON RPC calls, which are part of the interface of any Ethereum client. You can dive into the corresponding documentation ([https://github.com/ethereum/wiki/wiki/JSON-RPC](https://github.com/ethereum/wiki/wiki/JSON-RPC)) to learn more about it.

What can come in handy is the fact that in place of a block number, we can also use earliest, latest or pending. So if we would like to query the current block gas limit (I have tried this with seth configured for the kovan testnet) we can do the following:
What can come in handy is the fact that in place of a block number, you can also use earliest, latest or pending. So if you would like to query the current block gas limit (I have tried this with seth configured for the kovan testnet) you can do the following:

`$ seth block latest gasLimit`

Expand Down Expand Up @@ -234,7 +234,7 @@ Output:

### seth receipt and seth tx

With seth receipt and seth tx, we can query every single detail imaginable about a transaction. They both take a transaction (tx) hash as an input parameter. The main difference between the two, is that the receipt, which contains the results of the transaction, is only constructed after the transaction gets mined, while the output of seth tx only contains the basic parameters of the transaction before it takes effect.
With seth receipt and seth tx, you can query every single detail imaginable about a transaction. They both take a transaction (tx) hash as an input parameter. The main difference between the two, is that the receipt, which contains the results of the transaction, is only constructed after the transaction gets mined, while the output of seth tx only contains the basic parameters of the transaction before it takes effect.

You can try them for example by first executing a transaction to have a transaction hash:

Expand All @@ -253,7 +253,7 @@ Now you can try the discussed commands (use your own tx hash from the previous t

`$ seth tx 0x58ba3980775741aecaf8435646a003bff3395d7d4e00c8f7a32ad1fa0ce64e01`

These both generate a pretty long output, but we can filter each query with an optional extra parameter. For example let's see, how accurate was our previous estimation for the gas consumption (it was perfectly accurate):
These both generate a pretty long output, but we can filter each query with an optional extra parameter. For example let's see, how accurate was your previous estimation for the gas consumption (it was perfectly accurate):

`$ seth receipt 0x58ba3980775741aecaf8435646a003bff3395d7d4e00c8f7a32ad1fa0ce64e01 gasUsed`

Expand Down
Loading

0 comments on commit 0560314

Please sign in to comment.