From 0175b3efe0e8db2dd0308e24596d7bce2c65a701 Mon Sep 17 00:00:00 2001 From: VladStarostenko <38181661+VladStarostenko@users.noreply.github.com> Date: Mon, 25 May 2020 16:45:35 +0300 Subject: [PATCH] Fix documentation (#278) --- docs/source/basic-testing.rst | 6 +++--- docs/source/ens.rst | 22 ++++++++++++---------- waffle-ens/README.md | 16 ++++++++-------- waffle-provider/README.md | 4 ++-- 4 files changed, 25 insertions(+), 23 deletions(-) diff --git a/docs/source/basic-testing.rst b/docs/source/basic-testing.rst index f3b74d8a3..ddd5c179d 100644 --- a/docs/source/basic-testing.rst +++ b/docs/source/basic-testing.rst @@ -58,7 +58,7 @@ You can also get an empty random wallet by calling: Setup ENS --------- -To setup basic ENS use provider's function `setupENS()`. +To setup basic ENS use the provider's function :code:`setupENS()`. .. code-block:: ts @@ -67,9 +67,9 @@ To setup basic ENS use provider's function `setupENS()`. const provider = new MockProvider(); await provider.setupENS(); -By default this method use last `wallet` from provider's wallets, but you can pass your own `wallet` as argument for `setupENS(wallet)`. +This method employs the last of the provider's :code:`wallets` by default, but you can pass your own :code:`wallet` as an argument for :code:`setupENS(wallet)`. -Also `setupENS()` method sets ENS address to provider's networks. +Also :code:`setupENS()` method saves ENS address in the provider's networks. Read more about ENS functions here :ref:`ens`. diff --git a/docs/source/ens.rst b/docs/source/ens.rst index f99ea6920..c73667825 100644 --- a/docs/source/ens.rst +++ b/docs/source/ens.rst @@ -1,3 +1,5 @@ +.. _ens: + ENS === @@ -22,7 +24,7 @@ Also, if you use :code:`MockProvider`, you can use :code:`setupENS()` function i Creating top level domain ------------------------- -Use :code:`createTopLevelDomain` function to creating top level domain: +Use :code:`createTopLevelDomain` function to create a top level domain: .. code-block:: ts @@ -31,35 +33,35 @@ Use :code:`createTopLevelDomain` function to creating top level domain: Creating sub domain ------------------- -Use :code:`createSubDomain` function to creating sub domain: +Use :code:`createSubDomain` function for creating a sub domain: .. code-block:: ts await ensBuilder.createSubDomain('ethworks.test'); -Also, it's possible to create sub domain recursively, if top domain doesn't exist, by specifying the appropriate option: +Also, it's possible to create a sub domain recursively, if the top domain doesn't exist, by specifying the appropriate option: .. code-block:: ts -await ens.createSubDomain('waffle.ethworks.tld', {recursive: true}); + await ens.createSubDomain('waffle.ethworks.tld', {recursive: true}); Setting address --------------- -Use :code:`setAddress` function for setting address for domain: +Use :code:`setAddress` function for setting address for the domain: .. code-block:: ts -await ensBuilder.setAddress('vlad.ethworks.test', '0x001...03'); + await ensBuilder.setAddress('vlad.ethworks.test', '0x001...03'); -Also, it's possible to set address for domain recursively, if domain doesn't exist, by specifying the appropriate option: +Also, it's possible to set an address for domain recursively, if the domain doesn't exist, by specifying the appropriate option: .. code-block:: ts -await ens.setAddress('vlad.waffle.ethworks.tld', '0x001...03', {recursive: true}); + await ens.setAddress('vlad.waffle.ethworks.tld', '0x001...03', {recursive: true}); -Use :code:`setAddressWithReverse` function for setting address for the domain and make this domain reverse. Add recursive option if domain doesn't exist: +Use :code:`setAddressWithReverse` function for setting address for the domain and make this domain reverse. Add recursive option if the domain doesn't exist: .. code-block:: ts -await ens.setAddressWithReverse('vlad.ethworks.tld', wallet, {recursive: true}); + await ens.setAddressWithReverse('vlad.ethworks.tld', wallet, {recursive: true}); diff --git a/waffle-ens/README.md b/waffle-ens/README.md index 90f4059d0..23a37b4cd 100644 --- a/waffle-ens/README.md +++ b/waffle-ens/README.md @@ -5,7 +5,7 @@ # @ethereum-waffle/ens -A simple ens builder for testing with ENS. +A simple `ENS` for testing. ## Installation @@ -16,7 +16,7 @@ yarn add --dev ethereum-waffle npm install --save-dev ethereum-waffle ``` -If you want to use this package directly please install it via: +If you want to use this package directly, please install it via: ``` yarn add --dev @ethereum-waffle/ens npm install --save-dev @ethereum-waffle/ens @@ -37,7 +37,7 @@ To create `ENS`, you should submit your `wallet`, available in `MockProvider` cl You can read more about ENS [in the ENS's documentation](https://docs.ens.domains/). ### Examples: -Creating of ENS: +Creating ENS: ```ts import {MockProvider} from '@ethereum-waffle/provider'; import {deployENS, ENS} from '@ethereum-waffle/ens'; @@ -49,19 +49,19 @@ const ens: ENS = await deployENS(wallet); ### Usage -Use `createTopLevelDomain` function to creating top level domain: +Use `createTopLevelDomain` function to create a top level domain: ```ts await ens.createTopLevelDomain('test'); ``` -Use `createSubDomain` function to creating sub domain: +Use `createSubDomain` function for creating a sub domain: ```ts await ens.createSubDomain('ethworks.test'); ``` -Also, it's possible to create sub domain recursively, if top domain doesn't exist, by specifying the appropriate option: +Also, it's possible to create a sub domain recursively, if the top domain doesn't exist, by specifying the appropriate option: ```ts await ens.createSubDomain('ethworks.tld', {recursive: true}); @@ -72,13 +72,13 @@ Use `setAddress` function for setting address for the domain: ```ts await ens.setAddress('vlad.ethworks.test', '0x001...03'); ``` -Also, it's possible to set address for the domain recursively, if domain doesn't exist, by specifying the appropriate option: +Also, it's possible to set an address for the domain recursively, if the domain doesn't exist, by specifying the appropriate option: ```ts await ens.setAddress('vlad.ethworks.tld', '0x001...03', {recursive: true}); ``` -Use `setAddressWithReverse` function for setting address for the domain and make this domain reverse. Add recursive option if domain doesn't exist: +Use `setAddressWithReverse` function for setting address for the domain and make this domain reverse. Add recursive option if the domain doesn't exist: ```ts await ens.setAddressWithReverse('vlad.ethworks.tld', wallet, {recursive: true}); diff --git a/waffle-provider/README.md b/waffle-provider/README.md index c342d890d..3f12708f4 100644 --- a/waffle-provider/README.md +++ b/waffle-provider/README.md @@ -51,8 +51,8 @@ describe('waffle tests', async () => { }) ``` -Use `setupENS` function to set up your `ens` and setting ens address to provider's networks. The function accepts -the `wallet` as an argument, and if you call it without an argument, it will use last `wallet` from `MockProvider`. +Use `setupENS` function to set up your `ens` and setting ens address to the provider's networks. The function accepts +the `wallet` as an argument, and if you call it without an argument, it will use the last `wallet` from `MockProvider`. ```ts import {expect} from 'chai';