From 8b849832395bf7e8fc9b23a8f5deaa22a640f234 Mon Sep 17 00:00:00 2001 From: Mischa Tuffield Date: Wed, 13 Oct 2021 07:16:33 +0100 Subject: [PATCH 1/3] This silences the compile issue with the unused value parameter in the permit function --- contracts/DAITokenWrapper.sol | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/contracts/DAITokenWrapper.sol b/contracts/DAITokenWrapper.sol index 60d47789..dc288b00 100644 --- a/contracts/DAITokenWrapper.sol +++ b/contracts/DAITokenWrapper.sol @@ -38,7 +38,6 @@ contract DAITokenWrapper is * @notice Conforms to EIP-2612. Calls permit on token, which may or may not have a permit function that conforms to EIP-2612 * @param _tokenOwner Address of the token owner who is approving tokens to be transferred by spender * @param _spender Address of the party who is transferring tokens on owner's behalf - * @param _value Number of tokens to be transferred * @param _deadline Time after which this permission to transfer is no longer valid * @param _v Part of the owner's signatue * @param _r Part of the owner's signatue @@ -47,7 +46,7 @@ contract DAITokenWrapper is function permit( address _tokenOwner, address _spender, - uint256 _value, + uint256, uint256 _deadline, uint8 _v, bytes32 _r, From c887a51d5425b29b327b8442eb9d983745c1226b Mon Sep 17 00:00:00 2001 From: Mischa Tuffield Date: Wed, 13 Oct 2021 07:51:06 +0100 Subject: [PATCH 2/3] This updates the readme with details on how to use hardhat to fork --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 6b12652e..2ea72319 100644 --- a/README.md +++ b/README.md @@ -121,6 +121,23 @@ otherwise, create a JSON file creating accounts in the same format as ./go "tests:unit[,]" ``` +#### Forking Rinkeby to localnode + +It is possible to fork the state of the Rinkeby chain to have it deployed locally. +The following hardhat commands will achieve this: + +```shell script +npx hardhat node --fork https://eth-rinkeby.alchemyapi.io/v2/<> +``` + +You can then deploy using the command + +```shell script +npx hardhat deploy --network localhost  (edited)  +``` + +This makes the BOSON test token deployed on Rinkeby (0xEDa08eF1c6ff51Ca7Fd681295797102c1B84606c) available to your local hardhat chain + #### Coverage We use [solidity-coverage](https://github.com/sc-forks/solidity-coverage) to From fc5cc92b48c843560b13ad0aa5f52df2c0217147 Mon Sep 17 00:00:00 2001 From: Heather S Date: Wed, 13 Oct 2021 11:28:27 +0200 Subject: [PATCH 3/3] Update NPM version and Rinkeby forking info --- README.md | 39 ++++++++++++++++++++------------------- docs/setup/linux.md | 2 +- docs/setup/osx.md | 2 +- 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 2ea72319..8d953e5e 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ tools installed. At a minimum, you'll need: * Node (12.20) -* NPM (> 6) +* NPM (7) * Ruby (2.7) * Bundler (> 2) * Git @@ -90,9 +90,27 @@ If preferred by those who are familiar with Hardhat, the standard Hardhat comman In a separate terminal, contracts can be deployed using ```shell - npx hardhat --network [customNetworkName] deploy + npx hardhat --network localhost deploy ``` +#### Forking Rinkeby to localnode + +It is possible to fork the state of the Rinkeby chain to have it deployed locally. +The following hardhat commands will achieve this: + +```shell script +npx hardhat node --fork https://eth-rinkeby.alchemyapi.io/v2/<> +``` +Alchemy is recommended by Hardhat over Infura because it's free accounts provide archived data, which is required for successful forking. + +You can then deploy from a separate terminal using the command + +```shell script +npx hardhat deploy --network localhost +``` + +This makes the BOSON test token deployed on Rinkeby (0xEDa08eF1c6ff51Ca7Fd681295797102c1B84606c) and the official DAI token +deployed on Rinkeby (0x6A9865aDE2B6207dAAC49f8bCba9705dEB0B0e6D) available to your local hardhat chain. --- ### Test @@ -121,23 +139,6 @@ otherwise, create a JSON file creating accounts in the same format as ./go "tests:unit[,]" ``` -#### Forking Rinkeby to localnode - -It is possible to fork the state of the Rinkeby chain to have it deployed locally. -The following hardhat commands will achieve this: - -```shell script -npx hardhat node --fork https://eth-rinkeby.alchemyapi.io/v2/<> -``` - -You can then deploy using the command - -```shell script -npx hardhat deploy --network localhost  (edited)  -``` - -This makes the BOSON test token deployed on Rinkeby (0xEDa08eF1c6ff51Ca7Fd681295797102c1B84606c) available to your local hardhat chain - #### Coverage We use [solidity-coverage](https://github.com/sc-forks/solidity-coverage) to diff --git a/docs/setup/linux.md b/docs/setup/linux.md index 61fea7ea..06ded379 100644 --- a/docs/setup/linux.md +++ b/docs/setup/linux.md @@ -8,7 +8,7 @@ on your development machine: * git * direnv * Node (12.20) -* NPM (> 6) +* NPM (7) * Ruby (2.7) * Bundler (> 2) diff --git a/docs/setup/osx.md b/docs/setup/osx.md index 4c6e97ce..c15935f6 100644 --- a/docs/setup/osx.md +++ b/docs/setup/osx.md @@ -8,7 +8,7 @@ on your development machine: * git * direnv * Node (12.20) -* NPM (> 6) +* NPM (7) * Ruby (2.7) * Bundler (> 2)