From f74018d788d913ba38629ac01ec57eef52a28b5c Mon Sep 17 00:00:00 2001 From: Alan Verbner Date: Tue, 10 Aug 2021 13:57:46 -0300 Subject: [PATCH 001/102] chore: added hardhat-time-n-mine plugin --- docs/.vuepress/plugins.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/.vuepress/plugins.js b/docs/.vuepress/plugins.js index f76ee98ef8..d6a2aadc76 100644 --- a/docs/.vuepress/plugins.js +++ b/docs/.vuepress/plugins.js @@ -383,6 +383,15 @@ const plugins = [ "Prepare the contract artifacts and the TypeChain bindings for registry deployment.", tags: ["Deployment", "Tasks", "TypeChain"], }, + { + name: "hardhat-time-n-mine", + author: "Gonzalo Petraglia & Alan Verbner", + authorUrl: "https://github.com/atixlabs", + url: "https://github.com/atixlabs/hardhat-time-n-mine/tree/main", + description: + "Helper plugin to manipulate blocks timestamp and trigger mining. It can be used from the command line and in the tests.", + tags: ["Testing"], + }, ]; module.exports = plugins.map((p) => ({ From e01a3835adf29e18a712f32af683e45234bbeb3a Mon Sep 17 00:00:00 2001 From: Franco Victorio Date: Tue, 24 Aug 2021 16:33:12 -0300 Subject: [PATCH 002/102] Add troubleshooting section in hardhat-ethers --- packages/hardhat-ethers/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/hardhat-ethers/README.md b/packages/hardhat-ethers/README.md index f924d9de84..596419219a 100644 --- a/packages/hardhat-ethers/README.md +++ b/packages/hardhat-ethers/README.md @@ -114,3 +114,11 @@ const contractFactory = await this.env.ethers.getContractFactory("Example", { This allows you to create a contract factory for the `Example` contract and link its `ExampleLib` library references to the address `"0x..."`. To create a contract factory, all libraries must be linked. An error will be thrown informing you of any missing library. + +## Troubleshooting + +### Events are not being emitted + +Ethers.js polls the network to check if some event was emitted (except when a `WebSocketProvider` is used; see below). This polling is done every 4 seconds. If you have a script or test that is not emitting an event, it's likely that the execution is finishing before the event is detected by the polling mechanism. + +If you are connecting to a Hardhat node using a `WebSocketProvider`, events should be emitted immediately. But keep in mind that you'll have to create this provider manually, since Hardhat only supports configuring networks via http. That is, you can't add a `localhost` network with a URL like `ws://localhost:8545`. From 5d477592a9fab2d969216c771bad8866864036d7 Mon Sep 17 00:00:00 2001 From: Adam Spiers Date: Tue, 24 Aug 2021 13:55:28 +0100 Subject: [PATCH 003/102] Fully explain the benefit of chai.use Newbies won't immediately understand why chai.use is normally needed, therefore they also won't know why it's a benefit that hardhat-waffle takes care of this automatically. So document it explicitly. --- packages/hardhat-waffle/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/hardhat-waffle/README.md b/packages/hardhat-waffle/README.md index 0b5462837f..2114b14961 100644 --- a/packages/hardhat-waffle/README.md +++ b/packages/hardhat-waffle/README.md @@ -67,6 +67,6 @@ const { waffle } = require("hardhat"); const { deployContract } = waffle; ``` -Also, you don't need to call `chai.use`. +Also, you don't need to call `chai.use` in order to use [Waffle's Chai matchers](https://ethereum-waffle.readthedocs.io/en/latest/matchers.html). Note that by default, Hardhat saves its compilation output into `artifacts/` instead of `build/`. You can either use that directory in your tests, or [customize your Hardhat config](https://hardhat.org/config/#path-configuration). From 3b37ea6bbdd6ba967051b3e48a525ade0d583ea9 Mon Sep 17 00:00:00 2001 From: Petar Popovic Date: Wed, 25 Aug 2021 13:54:05 +0200 Subject: [PATCH 004/102] Update building-plugins.md Remove duplicated paragraph --- docs/advanced/building-plugins.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/advanced/building-plugins.md b/docs/advanced/building-plugins.md index bf60a871e8..beb49102de 100644 --- a/docs/advanced/building-plugins.md +++ b/docs/advanced/building-plugins.md @@ -10,8 +10,6 @@ When developing a plugin the main tools available to integrate new functionality Some examples of things you could achieve by creating a plugin are: running a linter when the `check` task runs, using different compiler versions for different files or generating an UML diagram for your contracts. -Some examples of things you could achieve by creating a plugin are running a linter when the `check` task runs, using different compiler versions for different files or generating an UML diagram for your contracts. - ## Extending the Hardhat Runtime Environment Let’s go through the process of creating a plugin that adds new functionality to the Hardhat Runtime Environment. By doing this, we make sure our new feature is available everywhere. This means your plugin users can access it from tasks, tests, scripts, and the Hardhat console. From 52538515b391e5d06c6f2eaf84390023bb012ee1 Mon Sep 17 00:00:00 2001 From: vikas1188 Date: Wed, 25 Aug 2021 21:00:37 +0530 Subject: [PATCH 005/102] Adding warning for users of Hardhat This has been seen that the current accounts in Hardhat are the same across EVERY user. We are adding warnings for the users while they go through the HH documentation. I guess the aptest place is where people generate them or see them the first time in the documentation. --- docs/getting-started/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/getting-started/README.md b/docs/getting-started/README.md index d84dcbdd29..8a0a2a27e1 100644 --- a/docs/getting-started/README.md +++ b/docs/getting-started/README.md @@ -104,6 +104,14 @@ If you take a look at the `hardhat.config.js` file, you will find the definition To run it, try `npx hardhat accounts`: +::: warning + +Below accounts are same across ALL the users who is or will use Hardhat ever. Don't send the mainnet Ethers on below addresses. Upon close inspection it has been found that users are knowingly or unknowingly sending mainnet Ethers on below addresses and getting scammed. We urge you to be very careful while adding these accounts in any wallet during the testing. Kindly delete the account once testing is done from your wallet. It will safeguard you from mistakenly sending any mainnet Ethers to it. + +Do not, we repeat, do not send mainnet Ethers to below test accounts. + +::: + ``` $ npx hardhat accounts 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 From 432b54f4f244523b979cdf60ffa372a50611e8a6 Mon Sep 17 00:00:00 2001 From: vikas1188 Date: Wed, 25 Aug 2021 21:14:50 +0530 Subject: [PATCH 006/102] Adding warning for users of Hardhat This has been seen that the current accounts in Hardhat are the same across EVERY user. We are adding warnings for the users while they go through the HH documentation. I guess the aptest place is where people generate them or see them the first time in the documentation. --- docs/hardhat-network/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/hardhat-network/README.md b/docs/hardhat-network/README.md index 632a596836..c9f50f7e29 100644 --- a/docs/hardhat-network/README.md +++ b/docs/hardhat-network/README.md @@ -30,6 +30,14 @@ Alternatively, Hardhat Network can run in a stand-alone fashion so that external npx hardhat node ``` +::: warning + +Below accounts are same across ALL the users who is or will use Hardhat ever. Don't send the mainnet Ethers on below addresses. Upon close inspection it has been found that users are knowingly or unknowingly sending mainnet Ethers on below addresses and getting scammed. We urge you to be very careful while adding these accounts in any wallet during the testing. Kindly delete the account once testing is done from your wallet. It will safeguard you from mistakenly sending any mainnet Ethers to it. + +Do not, we repeat, do not send mainnet Ethers to below test accounts. + +::: + This will start Hardhat Network, and expose it as a JSON-RPC and WebSocket server. Then, just connect your wallet or application to `http://localhost:8545`. From 39821f6f30c4aa0cc7a87e6689b985a19c3fdd62 Mon Sep 17 00:00:00 2001 From: vikas1188 Date: Thu, 26 Aug 2021 13:44:25 +0530 Subject: [PATCH 007/102] Update docs/getting-started/README.md Co-authored-by: F. Eugene Aumson --- docs/getting-started/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/getting-started/README.md b/docs/getting-started/README.md index 8a0a2a27e1..fd0000870c 100644 --- a/docs/getting-started/README.md +++ b/docs/getting-started/README.md @@ -106,7 +106,7 @@ To run it, try `npx hardhat accounts`: ::: warning -Below accounts are same across ALL the users who is or will use Hardhat ever. Don't send the mainnet Ethers on below addresses. Upon close inspection it has been found that users are knowingly or unknowingly sending mainnet Ethers on below addresses and getting scammed. We urge you to be very careful while adding these accounts in any wallet during the testing. Kindly delete the account once testing is done from your wallet. It will safeguard you from mistakenly sending any mainnet Ethers to it. +The account addresses above are deterministic: they are the same for *all* Hardhat users. Accordingly, the private keys for these addresses are well known, so there are probably bots monitoring these addresses on mainnet, waiting to withdraw any funds sent to them. Therefore, *do not send mainnet Ether to these addresses*. If you add any of these accounts to a wallet (eg Metamask), be very careful to avoid sending any mainnet Ether to it: consider naming the account something like "Hardhat - Unsafe", and be sure to delete the account from your wallet once you've finished testing. Do not, we repeat, do not send mainnet Ethers to below test accounts. From e4436e9e079823c82d05c090cde0eeb6bedd120d Mon Sep 17 00:00:00 2001 From: vikas1188 Date: Thu, 26 Aug 2021 13:44:52 +0530 Subject: [PATCH 008/102] Update docs/hardhat-network/README.md Co-authored-by: F. Eugene Aumson --- docs/hardhat-network/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hardhat-network/README.md b/docs/hardhat-network/README.md index c9f50f7e29..4609f2f5d5 100644 --- a/docs/hardhat-network/README.md +++ b/docs/hardhat-network/README.md @@ -32,7 +32,7 @@ npx hardhat node ::: warning -Below accounts are same across ALL the users who is or will use Hardhat ever. Don't send the mainnet Ethers on below addresses. Upon close inspection it has been found that users are knowingly or unknowingly sending mainnet Ethers on below addresses and getting scammed. We urge you to be very careful while adding these accounts in any wallet during the testing. Kindly delete the account once testing is done from your wallet. It will safeguard you from mistakenly sending any mainnet Ethers to it. +The account addresses above are deterministic: they are the same for *all* Hardhat users. Accordingly, the private keys for these addresses are well known, so there are probably bots monitoring these addresses on mainnet, waiting to withdraw any funds sent to them. Therefore, *do not send mainnet Ether to these addresses*. If you add any of these accounts to a wallet (eg Metamask), be very careful to avoid sending any mainnet Ether to it: consider naming the account something like "Hardhat - Unsafe", and be sure to delete the account from your wallet once you've finished testing. Do not, we repeat, do not send mainnet Ethers to below test accounts. From db47684ef400e4e7c1b8c0fc68ebafb7f381d7dd Mon Sep 17 00:00:00 2001 From: vikas1188 Date: Thu, 26 Aug 2021 13:45:00 +0530 Subject: [PATCH 009/102] Update docs/getting-started/README.md Co-authored-by: F. Eugene Aumson --- docs/getting-started/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/getting-started/README.md b/docs/getting-started/README.md index fd0000870c..6bea0f7772 100644 --- a/docs/getting-started/README.md +++ b/docs/getting-started/README.md @@ -108,7 +108,6 @@ To run it, try `npx hardhat accounts`: The account addresses above are deterministic: they are the same for *all* Hardhat users. Accordingly, the private keys for these addresses are well known, so there are probably bots monitoring these addresses on mainnet, waiting to withdraw any funds sent to them. Therefore, *do not send mainnet Ether to these addresses*. If you add any of these accounts to a wallet (eg Metamask), be very careful to avoid sending any mainnet Ether to it: consider naming the account something like "Hardhat - Unsafe", and be sure to delete the account from your wallet once you've finished testing. -Do not, we repeat, do not send mainnet Ethers to below test accounts. ::: From 7db32e4036c8a5293ac489e2ed16b0d026f5352c Mon Sep 17 00:00:00 2001 From: vikas1188 Date: Thu, 26 Aug 2021 13:45:06 +0530 Subject: [PATCH 010/102] Update docs/hardhat-network/README.md Co-authored-by: F. Eugene Aumson --- docs/hardhat-network/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/hardhat-network/README.md b/docs/hardhat-network/README.md index 4609f2f5d5..a94649730d 100644 --- a/docs/hardhat-network/README.md +++ b/docs/hardhat-network/README.md @@ -34,7 +34,6 @@ npx hardhat node The account addresses above are deterministic: they are the same for *all* Hardhat users. Accordingly, the private keys for these addresses are well known, so there are probably bots monitoring these addresses on mainnet, waiting to withdraw any funds sent to them. Therefore, *do not send mainnet Ether to these addresses*. If you add any of these accounts to a wallet (eg Metamask), be very careful to avoid sending any mainnet Ether to it: consider naming the account something like "Hardhat - Unsafe", and be sure to delete the account from your wallet once you've finished testing. -Do not, we repeat, do not send mainnet Ethers to below test accounts. ::: From 9ae71d6f6575aade9e4bdf121505e2293555f1b4 Mon Sep 17 00:00:00 2001 From: "F. Eugene Aumson" Date: Thu, 26 Aug 2021 11:54:08 -0600 Subject: [PATCH 011/102] Ran `yarn lint:fix` --- docs/getting-started/README.md | 3 +-- docs/hardhat-network/README.md | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/getting-started/README.md b/docs/getting-started/README.md index 6bea0f7772..38a523b0ad 100644 --- a/docs/getting-started/README.md +++ b/docs/getting-started/README.md @@ -106,8 +106,7 @@ To run it, try `npx hardhat accounts`: ::: warning -The account addresses above are deterministic: they are the same for *all* Hardhat users. Accordingly, the private keys for these addresses are well known, so there are probably bots monitoring these addresses on mainnet, waiting to withdraw any funds sent to them. Therefore, *do not send mainnet Ether to these addresses*. If you add any of these accounts to a wallet (eg Metamask), be very careful to avoid sending any mainnet Ether to it: consider naming the account something like "Hardhat - Unsafe", and be sure to delete the account from your wallet once you've finished testing. - +The account addresses above are deterministic: they are the same for _all_ Hardhat users. Accordingly, the private keys for these addresses are well known, so there are probably bots monitoring these addresses on mainnet, waiting to withdraw any funds sent to them. Therefore, _do not send mainnet Ether to these addresses_. If you add any of these accounts to a wallet (eg Metamask), be very careful to avoid sending any mainnet Ether to it: consider naming the account something like "Hardhat - Unsafe", and be sure to delete the account from your wallet once you've finished testing. ::: diff --git a/docs/hardhat-network/README.md b/docs/hardhat-network/README.md index a94649730d..a92d3c5141 100644 --- a/docs/hardhat-network/README.md +++ b/docs/hardhat-network/README.md @@ -32,8 +32,7 @@ npx hardhat node ::: warning -The account addresses above are deterministic: they are the same for *all* Hardhat users. Accordingly, the private keys for these addresses are well known, so there are probably bots monitoring these addresses on mainnet, waiting to withdraw any funds sent to them. Therefore, *do not send mainnet Ether to these addresses*. If you add any of these accounts to a wallet (eg Metamask), be very careful to avoid sending any mainnet Ether to it: consider naming the account something like "Hardhat - Unsafe", and be sure to delete the account from your wallet once you've finished testing. - +The account addresses above are deterministic: they are the same for _all_ Hardhat users. Accordingly, the private keys for these addresses are well known, so there are probably bots monitoring these addresses on mainnet, waiting to withdraw any funds sent to them. Therefore, _do not send mainnet Ether to these addresses_. If you add any of these accounts to a wallet (eg Metamask), be very careful to avoid sending any mainnet Ether to it: consider naming the account something like "Hardhat - Unsafe", and be sure to delete the account from your wallet once you've finished testing. ::: From 12873b17b161b14a1dc4e63e6b806df1d0d68f91 Mon Sep 17 00:00:00 2001 From: "F. Eugene Aumson" Date: Thu, 26 Aug 2021 12:15:31 -0600 Subject: [PATCH 012/102] Move warning to after account listing --- docs/getting-started/README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/getting-started/README.md b/docs/getting-started/README.md index 38a523b0ad..6623ec8dbd 100644 --- a/docs/getting-started/README.md +++ b/docs/getting-started/README.md @@ -104,12 +104,6 @@ If you take a look at the `hardhat.config.js` file, you will find the definition To run it, try `npx hardhat accounts`: -::: warning - -The account addresses above are deterministic: they are the same for _all_ Hardhat users. Accordingly, the private keys for these addresses are well known, so there are probably bots monitoring these addresses on mainnet, waiting to withdraw any funds sent to them. Therefore, _do not send mainnet Ether to these addresses_. If you add any of these accounts to a wallet (eg Metamask), be very careful to avoid sending any mainnet Ether to it: consider naming the account something like "Hardhat - Unsafe", and be sure to delete the account from your wallet once you've finished testing. - -::: - ``` $ npx hardhat accounts 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 @@ -134,6 +128,12 @@ $ npx hardhat accounts 0x8626f6940E2eb28930eFb4CeF49B2d1F2C9C1199 ``` +::: warning + +The account addresses above are deterministic: they are the same for _all_ Hardhat users. Accordingly, the private keys for these addresses are well known, so there are probably bots monitoring these addresses on mainnet, waiting to withdraw any funds sent to them. Therefore, _do not send mainnet Ether to these addresses_. If you add any of these accounts to a wallet (eg Metamask), be very careful to avoid sending any mainnet Ether to it: consider naming the account something like "Hardhat - Unsafe", and be sure to delete the account from your wallet once you've finished testing. + +::: + ### Compiling your contracts Next, if you take a look at `contracts/`, you should be able to find `Greeter.sol`: From ed65bfb0451afa1a31e52a0f3ab67e4d7b304eb6 Mon Sep 17 00:00:00 2001 From: "F. Eugene Aumson" Date: Thu, 26 Aug 2021 12:15:58 -0600 Subject: [PATCH 013/102] Move and rephrase warning for HH Network context --- docs/hardhat-network/README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/hardhat-network/README.md b/docs/hardhat-network/README.md index a92d3c5141..d1edc37c0c 100644 --- a/docs/hardhat-network/README.md +++ b/docs/hardhat-network/README.md @@ -30,18 +30,18 @@ Alternatively, Hardhat Network can run in a stand-alone fashion so that external npx hardhat node ``` -::: warning - -The account addresses above are deterministic: they are the same for _all_ Hardhat users. Accordingly, the private keys for these addresses are well known, so there are probably bots monitoring these addresses on mainnet, waiting to withdraw any funds sent to them. Therefore, _do not send mainnet Ether to these addresses_. If you add any of these accounts to a wallet (eg Metamask), be very careful to avoid sending any mainnet Ether to it: consider naming the account something like "Hardhat - Unsafe", and be sure to delete the account from your wallet once you've finished testing. - -::: - This will start Hardhat Network, and expose it as a JSON-RPC and WebSocket server. Then, just connect your wallet or application to `http://localhost:8545`. If you want to connect Hardhat to this node, you just need to run using `--network localhost`. +::: warning + +The account addresses and private keys shown in the output of `hardhat node` are deterministic: they are the same for _all_ Hardhat users. Accordingly, those private keys are well known, so there are probably bots monitoring these addresses on mainnet, waiting to withdraw any funds sent to them. Therefore, _do not send mainnet Ether to these addresses_. If you add any of these accounts to a wallet (eg Metamask), be very careful to avoid sending any mainnet Ether to it: consider naming the account something like "Hardhat - Unsafe", and be sure to delete the account from your wallet once you've finished testing. + +::: + ## Why would I want to use it? ### Solidity stack traces From b45c136af1c4e7268da9eb65bd7c7b142e892782 Mon Sep 17 00:00:00 2001 From: "F. Eugene Aumson" Date: Thu, 26 Aug 2021 13:37:20 -0600 Subject: [PATCH 014/102] Add sample output for `hardhat node` --- docs/hardhat-network/README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/hardhat-network/README.md b/docs/hardhat-network/README.md index d1edc37c0c..ebf66384e8 100644 --- a/docs/hardhat-network/README.md +++ b/docs/hardhat-network/README.md @@ -27,7 +27,17 @@ Hardhat Network is simply another network. If you wanted to be explicit, you cou Alternatively, Hardhat Network can run in a stand-alone fashion so that external clients can connect to it. This could be MetaMask, your Dapp front-end, or a script. To run Hardhat Network in this way, run: ``` -npx hardhat node +$ npx hardhat node +Started HTTP and WebSocket JSON-RPC server at http://127.0.0.1:8545/ + +Accounts +======== +Account #0: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 (10000 ETH) +Private Key: 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 + +Account #1: 0x70997970c51812dc3a010c7d01b50e0d17dc79c8 (10000 ETH) +Private Key: 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d +... ``` This will start Hardhat Network, and expose it as a JSON-RPC and WebSocket server. From 3308551c58f57a92bf2225a659bb8c65a6f9f1ec Mon Sep 17 00:00:00 2001 From: "F. Eugene Aumson" Date: Thu, 26 Aug 2021 13:38:00 -0600 Subject: [PATCH 015/102] Rm "and be sure to del the acct from your wallet" --- docs/getting-started/README.md | 2 +- docs/hardhat-network/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/getting-started/README.md b/docs/getting-started/README.md index 6623ec8dbd..d617b2d440 100644 --- a/docs/getting-started/README.md +++ b/docs/getting-started/README.md @@ -130,7 +130,7 @@ $ npx hardhat accounts ::: warning -The account addresses above are deterministic: they are the same for _all_ Hardhat users. Accordingly, the private keys for these addresses are well known, so there are probably bots monitoring these addresses on mainnet, waiting to withdraw any funds sent to them. Therefore, _do not send mainnet Ether to these addresses_. If you add any of these accounts to a wallet (eg Metamask), be very careful to avoid sending any mainnet Ether to it: consider naming the account something like "Hardhat - Unsafe", and be sure to delete the account from your wallet once you've finished testing. +The account addresses above are deterministic: they are the same for _all_ Hardhat users. Accordingly, the private keys for these addresses are well known, so there are probably bots monitoring these addresses on mainnet, waiting to withdraw any funds sent to them. Therefore, _do not send mainnet Ether to these addresses_. If you add any of these accounts to a wallet (eg Metamask), be very careful to avoid sending any mainnet Ether to it: consider naming the account something like "Hardhat - Unsafe". ::: diff --git a/docs/hardhat-network/README.md b/docs/hardhat-network/README.md index ebf66384e8..257a9d58e7 100644 --- a/docs/hardhat-network/README.md +++ b/docs/hardhat-network/README.md @@ -48,7 +48,7 @@ If you want to connect Hardhat to this node, you just need to run using `--netwo ::: warning -The account addresses and private keys shown in the output of `hardhat node` are deterministic: they are the same for _all_ Hardhat users. Accordingly, those private keys are well known, so there are probably bots monitoring these addresses on mainnet, waiting to withdraw any funds sent to them. Therefore, _do not send mainnet Ether to these addresses_. If you add any of these accounts to a wallet (eg Metamask), be very careful to avoid sending any mainnet Ether to it: consider naming the account something like "Hardhat - Unsafe", and be sure to delete the account from your wallet once you've finished testing. +The account addresses and private keys shown in the output of `hardhat node` are deterministic: they are the same for _all_ Hardhat users. Accordingly, those private keys are well known, so there are probably bots monitoring these addresses on mainnet, waiting to withdraw any funds sent to them. Therefore, _do not send mainnet Ether to these addresses_. If you add any of these accounts to a wallet (eg Metamask), be very careful to avoid sending any mainnet Ether to it: consider naming the account something like "Hardhat - Unsafe". ::: From b7c80e91b74115a94f6cf645d5e7d0fccdb95daf Mon Sep 17 00:00:00 2001 From: "F. Eugene Aumson" Date: Thu, 26 Aug 2021 13:45:57 -0600 Subject: [PATCH 016/102] Put "Do not send mainnet Ether" first and foremost --- docs/getting-started/README.md | 2 +- docs/hardhat-network/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/getting-started/README.md b/docs/getting-started/README.md index d617b2d440..baebb0d1fb 100644 --- a/docs/getting-started/README.md +++ b/docs/getting-started/README.md @@ -130,7 +130,7 @@ $ npx hardhat accounts ::: warning -The account addresses above are deterministic: they are the same for _all_ Hardhat users. Accordingly, the private keys for these addresses are well known, so there are probably bots monitoring these addresses on mainnet, waiting to withdraw any funds sent to them. Therefore, _do not send mainnet Ether to these addresses_. If you add any of these accounts to a wallet (eg Metamask), be very careful to avoid sending any mainnet Ether to it: consider naming the account something like "Hardhat - Unsafe". +_Do not send mainnet Ether to the addresses above._ Those addresses are deterministic: they are the same for _all_ Hardhat users. Accordingly, the private keys for these addresses are well known, so there are probably bots monitoring those addresses on mainnet, waiting to withdraw any funds sent to them. If you add any of these accounts to a wallet (eg Metamask), be very careful to avoid sending any mainnet Ether to them: consider naming the account something like "Hardhat - Unsafe" in order to prevent any mistakes. ::: diff --git a/docs/hardhat-network/README.md b/docs/hardhat-network/README.md index 257a9d58e7..f74b3596f3 100644 --- a/docs/hardhat-network/README.md +++ b/docs/hardhat-network/README.md @@ -48,7 +48,7 @@ If you want to connect Hardhat to this node, you just need to run using `--netwo ::: warning -The account addresses and private keys shown in the output of `hardhat node` are deterministic: they are the same for _all_ Hardhat users. Accordingly, those private keys are well known, so there are probably bots monitoring these addresses on mainnet, waiting to withdraw any funds sent to them. Therefore, _do not send mainnet Ether to these addresses_. If you add any of these accounts to a wallet (eg Metamask), be very careful to avoid sending any mainnet Ether to it: consider naming the account something like "Hardhat - Unsafe". +_Do not send mainnet Ether to the account addresses shown by `hardhat node`_. Those addresses and private keys are deterministic: they are the same for _all_ Hardhat users. Accordingly, those private keys are well known, so there are probably bots monitoring these addresses on mainnet, waiting to withdraw any funds sent to them. If you add any of those accounts to a wallet (eg Metamask), be very careful to avoid sending any mainnet Ether to them: consider naming the account something like "Hardhat - Unsafe" in order to prevent any mistakes. ::: From 648d6edf7ae47964fe53a5e400975b0b85e0ae04 Mon Sep 17 00:00:00 2001 From: Petar Popovic Date: Sat, 28 Aug 2021 17:10:10 +0200 Subject: [PATCH 017/102] Update mainnet-forking.md Change broken link from /hardhat-network/hardhat-network/#hardhat-network-initial-state to hardhat-network/#hardhat-network-initial-state --- docs/hardhat-network/guides/mainnet-forking.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hardhat-network/guides/mainnet-forking.md b/docs/hardhat-network/guides/mainnet-forking.md index 4564515e1e..9d9d4da2a5 100644 --- a/docs/hardhat-network/guides/mainnet-forking.md +++ b/docs/hardhat-network/guides/mainnet-forking.md @@ -96,7 +96,7 @@ await network.provider.request({ }); ``` -This will reset Hardhat Network, starting a new instance in the state described [here](../hardhat-network/README.md#hardhat-network-initial-state). +This will reset Hardhat Network, starting a new instance in the state described [here](../README.md#hardhat-network-initial-state). ## Troubleshooting From ec752b5d8c45549c76eeb36362bde0956656b1fb Mon Sep 17 00:00:00 2001 From: Petar Popovic Date: Sat, 28 Aug 2021 17:16:55 +0200 Subject: [PATCH 018/102] Update mainnet-forking.md Pass correct link this time --- docs/hardhat-network/guides/mainnet-forking.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hardhat-network/guides/mainnet-forking.md b/docs/hardhat-network/guides/mainnet-forking.md index 9d9d4da2a5..85017ae288 100644 --- a/docs/hardhat-network/guides/mainnet-forking.md +++ b/docs/hardhat-network/guides/mainnet-forking.md @@ -96,7 +96,7 @@ await network.provider.request({ }); ``` -This will reset Hardhat Network, starting a new instance in the state described [here](../README.md#hardhat-network-initial-state). +This will reset Hardhat Network, starting a new instance in the state described [here](../reference/#initial-state). ## Troubleshooting From 10c680ab23c744fa0f49bd10e3eb24defe60473b Mon Sep 17 00:00:00 2001 From: Bruno Barbieri Date: Wed, 1 Sep 2021 01:49:47 -0400 Subject: [PATCH 019/102] Fix typo --- docs/hardhat-network/guides/mainnet-forking.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hardhat-network/guides/mainnet-forking.md b/docs/hardhat-network/guides/mainnet-forking.md index 85017ae288..165bb75e7e 100644 --- a/docs/hardhat-network/guides/mainnet-forking.md +++ b/docs/hardhat-network/guides/mainnet-forking.md @@ -18,7 +18,7 @@ You can also configure Hardhat Network to always do this: networks: { hardhat: { forking: { - url: "https://eth-mainnet.alchemyapi.io/v2/"; + url: "https://eth-mainnet.alchemyapi.io/v2/", } } } From 7d6de4970fefe8fb7d8211845db3538876e0625e Mon Sep 17 00:00:00 2001 From: Samuel Diethelm Date: Wed, 1 Sep 2021 23:24:23 +0200 Subject: [PATCH 020/102] Fix typo "onces" should be "once" --- docs/tutorial/testing-contracts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial/testing-contracts.md b/docs/tutorial/testing-contracts.md index 00715f3096..1a4da25f1b 100644 --- a/docs/tutorial/testing-contracts.md +++ b/docs/tutorial/testing-contracts.md @@ -151,7 +151,7 @@ describe("Token contract", function () { [owner, addr1, addr2, ...addrs] = await ethers.getSigners(); // To deploy our contract, we just have to call Token.deploy() and await - // for it to be deployed(), which happens onces its transaction has been + // for it to be deployed(), which happens once its transaction has been // mined. hardhatToken = await Token.deploy(); }); From 72660229d4255c221a30c00e621cd61e52a851d6 Mon Sep 17 00:00:00 2001 From: Adam Spiers Date: Sat, 4 Sep 2021 11:30:02 +0100 Subject: [PATCH 021/102] Give Truffle recommendations consistent with existing deployment guide The Truffle migrations page was out of date, incorrectly claiming that no plugins yet exist which implement a deployment system for Hardhat. However since that was written, hardhat-deploy has emerged, and the same text in /guides/deploying.md was already updated accordingly. So update the paragraph in truffle-migration.md to match, and cross-link to /guides/deploying.md. This is relevant to the discussion in #381. --- docs/guides/truffle-migration.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/guides/truffle-migration.md b/docs/guides/truffle-migration.md index 512e621c3a..df93f4dfde 100644 --- a/docs/guides/truffle-migration.md +++ b/docs/guides/truffle-migration.md @@ -47,7 +47,9 @@ Once you've written your hardhat-truffle fixtures for your migrations and comple ### Deployment -When it comes to deploying, there are no plugins that implement a deployment system for Hardhat yet, but there's [an open issue](https://github.com/nomiclabs/hardhat/issues/381) with some ideas and we'd value your opinion on how to best design it. +When it comes to deploying, there are no official plugins that implement a deployment system for Hardhat yet, but there's [an open issue](https://github.com/nomiclabs/hardhat/issues/381) with some ideas and we'd value your opinion on how to best design it. + +In the meantime, we recommend [deploying your smart contracts using scripts](../guides/deploying.md), or using [the hardhat-deploy community plugin](https://github.com/wighawag/hardhat-deploy/tree/master). ### Truffle 4 and Web3.js' synchronous calls From e9dc9f1620f8ee25e6b323a9e5b5468743db15df Mon Sep 17 00:00:00 2001 From: Abhishek Mahanti Date: Sat, 4 Sep 2021 13:27:24 -0700 Subject: [PATCH 022/102] Update setting-up-the-environment.md Tiny fix: The tutorial page number was incorrect here. --- docs/tutorial/setting-up-the-environment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial/setting-up-the-environment.md b/docs/tutorial/setting-up-the-environment.md index 994bd81ed9..e2bce90a32 100644 --- a/docs/tutorial/setting-up-the-environment.md +++ b/docs/tutorial/setting-up-the-environment.md @@ -2,7 +2,7 @@ prev: false --- -# 1. Setting up the environment +# 2. Setting up the environment Most Ethereum libraries and tools are written in JavaScript, and so is **Hardhat**. If you're not familiar with Node.js, it's a JavaScript runtime built on Chrome's V8 JavaScript engine. It's the most popular solution to run JavaScript outside of a web browser and **Hardhat** is built on top of it. From 28aa8bbdf9cbc713ba3820943157e90835070f59 Mon Sep 17 00:00:00 2001 From: Patricio Palladino Date: Wed, 8 Sep 2021 20:04:46 -0300 Subject: [PATCH 023/102] Add Remix to the list of tools that support console.log --- docs/hardhat-network/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hardhat-network/README.md b/docs/hardhat-network/README.md index f74b3596f3..1d478a9c08 100644 --- a/docs/hardhat-network/README.md +++ b/docs/hardhat-network/README.md @@ -107,7 +107,7 @@ Hardhat Network allows you to print logging messages and contract variables by c To use it, you simply import `hardhat/console.sol` and call it. It implements the same formatting options that can be found in Node.js' [`console.log`](https://nodejs.org/dist/latest-v12.x/docs/api/console.html#console_console_log_data_args), which in turn uses [`util.format`](https://nodejs.org/dist/latest-v12.x/docs/api/util.html#util_util_format_format_args). For example: `console.log("Changing owner from %s to %s", currentOwner, newOwner)`. -It always works, regardless of the call or transaction failing or being successful. And, because it's implemented in standard Solidity, it works with _any_ tool or library, emitting log entries where it's fully supported — Hardhat Network and Tenderly — and falling back gracefully to a no-op everywhere else — Remix, Waffle, Truffle, etc — though it does consume a small amount of gas on live networks. +It always works, regardless of the call or transaction failing or being successful. And, because it's implemented in standard Solidity, it works with _any_ tool or library, emitting log entries where it's fully supported — Hardhat Network, Remix, and Tenderly — and falling back gracefully to a no-op everywhere else — Remix, Waffle, Truffle, etc — though it does consume a small amount of gas on live networks. You can see an example in the Sample Project. Follow the steps in [Quick Start](/getting-started/README.md#quick-start) to try it out. You can also refer to more details in [the reference documentation](./reference/README.md#consolelog). From 455928ba2f1d3e71261875c6a4901e9a0a60b80b Mon Sep 17 00:00:00 2001 From: Jinyang Liu Date: Thu, 23 Sep 2021 07:51:52 +0800 Subject: [PATCH 024/102] docs: list hardhat-proxy in plugins list --- docs/.vuepress/plugins.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/.vuepress/plugins.js b/docs/.vuepress/plugins.js index a590c76f72..56c027517a 100644 --- a/docs/.vuepress/plugins.js +++ b/docs/.vuepress/plugins.js @@ -393,6 +393,15 @@ const plugins = [ "Helper plugin to manipulate blocks timestamp and trigger mining. It can be used from the command line and in the tests.", tags: ["Testing"], }, + { + name: "hardhat-proxy", + author: "Jinyang Liu", + authorUrl: "https://github.com/jinyang1994", + url: "https://github.com/jinyang1994/hardhat-proxy/tree/main", + description: + "This plugin brings the proxy contract to Hardhat, which allows you to manage the proxy contract in a simple way.", + tags: ["Proxy Contract", "Tasks", "Scripts"], + }, ]; module.exports = plugins.map((p) => ({ From 5352f6baf65ca720ec000602f3ffea6108c9fa70 Mon Sep 17 00:00:00 2001 From: Fabio Ferreira Date: Fri, 10 Sep 2021 08:46:05 +0100 Subject: [PATCH 025/102] List plugin that transfers Link token between accounts --- docs/.vuepress/plugins.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/.vuepress/plugins.js b/docs/.vuepress/plugins.js index 56c027517a..5660afe2a1 100644 --- a/docs/.vuepress/plugins.js +++ b/docs/.vuepress/plugins.js @@ -402,6 +402,15 @@ const plugins = [ "This plugin brings the proxy contract to Hardhat, which allows you to manage the proxy contract in a simple way.", tags: ["Proxy Contract", "Tasks", "Scripts"], }, + { + name: "hardhat-fund-link", + author: "Applied Blockchain", + authorUrl: "https://github.com/appliedblockchain", + url: "https://github.com/appliedblockchain/chainlink-consumer/tree/master/plugins/fund-link", + description: + "Transfers Link token amount between accounts.", + tags: ["Chainlink", "Link"], + } ]; module.exports = plugins.map((p) => ({ From 99ee9f8fd755da7a742074048cf87de8a9437aab Mon Sep 17 00:00:00 2001 From: Fabio Ferreira Date: Mon, 27 Sep 2021 17:39:05 +0100 Subject: [PATCH 026/102] Fix lint issues --- docs/.vuepress/plugins.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/.vuepress/plugins.js b/docs/.vuepress/plugins.js index 5660afe2a1..9ac7eb6306 100644 --- a/docs/.vuepress/plugins.js +++ b/docs/.vuepress/plugins.js @@ -406,11 +406,11 @@ const plugins = [ name: "hardhat-fund-link", author: "Applied Blockchain", authorUrl: "https://github.com/appliedblockchain", - url: "https://github.com/appliedblockchain/chainlink-consumer/tree/master/plugins/fund-link", - description: - "Transfers Link token amount between accounts.", + url: + "https://github.com/appliedblockchain/chainlink-consumer/tree/master/plugins/fund-link", + description: "Transfers Link token amount between accounts.", tags: ["Chainlink", "Link"], - } + }, ]; module.exports = plugins.map((p) => ({ From 89cfa6373a4a2abe473d2219fcb4b5e22ef06dca Mon Sep 17 00:00:00 2001 From: 0xGorilla <84932007+0xGorilla@users.noreply.github.com> Date: Wed, 29 Sep 2021 09:34:23 +0200 Subject: [PATCH 027/102] Add smock to plugin list --- docs/.vuepress/plugins.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/.vuepress/plugins.js b/docs/.vuepress/plugins.js index 9ac7eb6306..eae234f137 100644 --- a/docs/.vuepress/plugins.js +++ b/docs/.vuepress/plugins.js @@ -411,6 +411,14 @@ const plugins = [ description: "Transfers Link token amount between accounts.", tags: ["Chainlink", "Link"], }, + { + name: "@defi-wonderland/smock", + author: "DeFi Wonderland and Optimism PBC", + authorUrl: "https://github.com/defi-wonderland", + url: "https://github.com/defi-wonderland/smock/tree/main", + description: "The Solidity mocking library", + tags: ["Testing", "Mocking"], + }, ]; module.exports = plugins.map((p) => ({ From 45f2086694368f2ee150319bd96fc28c152e6ccd Mon Sep 17 00:00:00 2001 From: 0xGorilla <84932007+0xGorilla@users.noreply.github.com> Date: Thu, 30 Sep 2021 11:07:22 +0200 Subject: [PATCH 028/102] docs: deleted previous smock plugin --- docs/.vuepress/plugins.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/docs/.vuepress/plugins.js b/docs/.vuepress/plugins.js index eae234f137..5b44a2fb20 100644 --- a/docs/.vuepress/plugins.js +++ b/docs/.vuepress/plugins.js @@ -288,15 +288,6 @@ const plugins = [ "Allow loading network configs for Hardhat projects in home file", tags: ["Networks", "Config"], }, - { - name: "@eth-optimism/smock", - author: "Optimism", - authorUrl: "https://github.com/ethereum-optimism", - url: "https://github.com/ethereum-optimism/smock/tree/master", - description: - "smock is a utility package that can generate mock Solidity contracts written entirely in JavaScript.", - tags: ["Testing", "Mocking", "Buidler plugin"], - }, { name: "@eth-optimism/plugins/hardhat/compiler", npmPackage: "@eth-optimism/plugins", @@ -416,7 +407,7 @@ const plugins = [ author: "DeFi Wonderland and Optimism PBC", authorUrl: "https://github.com/defi-wonderland", url: "https://github.com/defi-wonderland/smock/tree/main", - description: "The Solidity mocking library", + description: "The Solidity mocking library. Smock is a utility package that can generate mock Solidity contracts written entirely in JavaScript.", tags: ["Testing", "Mocking"], }, ]; From fb28a72bc4a6d67bc63b5db8b8386273c46e0bb5 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Fri, 1 Oct 2021 15:34:02 -0400 Subject: [PATCH 029/102] Drop a stray double quote --- .../hardhat-core/src/internal/core/config/config-loading.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/hardhat-core/src/internal/core/config/config-loading.ts b/packages/hardhat-core/src/internal/core/config/config-loading.ts index 0916d780bd..6190d40ae0 100644 --- a/packages/hardhat-core/src/internal/core/config/config-loading.ts +++ b/packages/hardhat-core/src/internal/core/config/config-loading.ts @@ -254,7 +254,7 @@ function checkUnsupportedSolidityConfig(resolvedConfig: HardhatConfig) { unsupportedVersions.length === 1 ? "is" : "are" } not fully supported yet. You can still use Hardhat, but some features, like stack traces, might not work correctly. -Learn more at https://hardhat.org/reference/solidity-support" +Learn more at https://hardhat.org/reference/solidity-support ` ) ); From 0bdfc7d1e2606f146c2e76b30f61ee1fe003b3cb Mon Sep 17 00:00:00 2001 From: Franco Zeoli Date: Mon, 11 Oct 2021 08:19:01 -0300 Subject: [PATCH 030/102] Update user list on website --- .../theme/components/HHWhosUsingHardhat.vue | 397 +++++++++++++----- .../img/company_logos/2x/logo-1inch@2x.png | Bin 0 -> 6969 bytes .../img/company_logos/2x/logo-augur@2x.png | Bin 0 -> 6455 bytes .../company_logos/2x/logo-chainlink@2x.png | Bin 0 -> 4052 bytes .../img/company_logos/2x/logo-dharma@2x.png | Bin 0 -> 7260 bytes .../img/company_logos/2x/logo-ens@2x.png | Bin 0 -> 5469 bytes .../img/company_logos/2x/logo-gnosis@2x.png | Bin 0 -> 4699 bytes .../img/company_logos/2x/logo-hegic@2x.png | Bin 0 -> 7808 bytes .../img/company_logos/2x/logo-livepeer@2x.png | Bin 0 -> 7194 bytes .../img/company_logos/2x/logo-loopring@2x.png | Bin 0 -> 3202 bytes .../img/company_logos/2x/logo-reflexer@2x.png | Bin 0 -> 4659 bytes .../company_logos/2x/logo-sushiswap@2x.png | Bin 0 -> 15466 bytes .../img/company_logos/2x/logo-uniswap@2x.png | Bin 0 -> 6375 bytes .../img/company_logos/2x/logo-yearn@2x.png | Bin 0 -> 8407 bytes .../img/company_logos/2x/logo-zksync@2x.png | Bin 0 -> 4245 bytes .../company_logos/mobile/logo-1inch@2x.png | Bin 0 -> 6969 bytes .../company_logos/mobile/logo-Balancer@2x.png | Bin 2338 -> 3218 bytes .../company_logos/mobile/logo-Lodestar@2x.png | Bin 1784 -> 2448 bytes .../company_logos/mobile/logo-OpenGSN@2x.png | Bin 850 -> 1327 bytes .../company_logos/mobile/logo-Optimism@2x.png | Bin 2633 -> 2589 bytes .../img/company_logos/mobile/logo-Opyn@2x.png | Bin 1367 -> 1459 bytes .../company_logos/mobile/logo-Status@2x.png | Bin 1546 -> 1598 bytes .../img/company_logos/mobile/logo-aave@2x.png | Bin 1010 -> 1187 bytes .../img/company_logos/mobile/logo-aone@2x.png | Bin 1893 -> 2650 bytes .../company_logos/mobile/logo-augur@2x.png | Bin 0 -> 6455 bytes .../company_logos/mobile/logo-celer@2x.png | Bin 899 -> 1283 bytes .../img/company_logos/mobile/logo-celo@2x.png | Bin 1323 -> 2010 bytes .../mobile/logo-chainlink@2x.png | Bin 0 -> 4052 bytes .../company_logos/mobile/logo-connext@2x.png | Bin 1750 -> 2099 bytes .../mobile/logo-decentraland@2x.png | Bin 1816 -> 2929 bytes .../company_logos/mobile/logo-dharma@2x.png | Bin 0 -> 7260 bytes .../img/company_logos/mobile/logo-ens@2x.png | Bin 0 -> 5469 bytes .../company_logos/mobile/logo-gnosis@2x.png | Bin 0 -> 4699 bytes .../company_logos/mobile/logo-hegic@2x.png | Bin 0 -> 7808 bytes .../company_logos/mobile/logo-horizon@2x.png | Bin 1188 -> 1668 bytes .../mobile/logo-instadapp@2x.png | Bin 1290 -> 1836 bytes .../company_logos/mobile/logo-kleros@2x.png | Bin 1783 -> 2560 bytes .../company_logos/mobile/logo-kyber@2x.png | Bin 1537 -> 2415 bytes .../company_logos/mobile/logo-livepeer@2x.png | Bin 0 -> 7194 bytes .../company_logos/mobile/logo-loopring@2x.png | Bin 0 -> 3202 bytes .../mobile/logo-mainframe@2x.png | Bin 1632 -> 2113 bytes .../company_logos/mobile/logo-melon@2x.png | Bin 1725 -> 2233 bytes .../mobile/logo-molochdao@2x.png | Bin 1257 -> 1854 bytes .../company_logos/mobile/logo-mstable@2x.png | Bin 1754 -> 2348 bytes .../company_logos/mobile/logo-mycrypto@2x.png | Bin 1895 -> 2160 bytes .../mobile/logo-openzeppelin@2x.png | Bin 2299 -> 2544 bytes .../company_logos/mobile/logo-pieado@2x.png | Bin 1981 -> 2700 bytes .../img/company_logos/mobile/logo-poap@2x.png | Bin 1990 -> 2175 bytes .../img/company_logos/mobile/logo-pool@2x.png | Bin 1331 -> 1626 bytes .../company_logos/mobile/logo-reflexer@2x.png | Bin 0 -> 4659 bytes .../img/company_logos/mobile/logo-set@2x.png | Bin 1482 -> 1518 bytes .../company_logos/mobile/logo-skale@2x.png | Bin 926 -> 1290 bytes .../mobile/logo-sushiswap@2x.png | Bin 0 -> 15466 bytes .../mobile/logo-synthetix@2x.png | Bin 989 -> 1027 bytes .../img/company_logos/mobile/logo-uma@2x.png | Bin 500 -> 624 bytes .../company_logos/mobile/logo-uniswap@2x.png | Bin 0 -> 6375 bytes .../company_logos/mobile/logo-unlock@2x.png | Bin 1245 -> 1616 bytes .../company_logos/mobile/logo-yearn@2x.png | Bin 0 -> 8407 bytes .../company_logos/mobile/logo-zksync@2x.png | Bin 0 -> 4245 bytes 59 files changed, 283 insertions(+), 114 deletions(-) create mode 100644 docs/.vuepress/theme/img/company_logos/2x/logo-1inch@2x.png create mode 100644 docs/.vuepress/theme/img/company_logos/2x/logo-augur@2x.png create mode 100644 docs/.vuepress/theme/img/company_logos/2x/logo-chainlink@2x.png create mode 100644 docs/.vuepress/theme/img/company_logos/2x/logo-dharma@2x.png create mode 100644 docs/.vuepress/theme/img/company_logos/2x/logo-ens@2x.png create mode 100644 docs/.vuepress/theme/img/company_logos/2x/logo-gnosis@2x.png create mode 100644 docs/.vuepress/theme/img/company_logos/2x/logo-hegic@2x.png create mode 100644 docs/.vuepress/theme/img/company_logos/2x/logo-livepeer@2x.png create mode 100644 docs/.vuepress/theme/img/company_logos/2x/logo-loopring@2x.png create mode 100644 docs/.vuepress/theme/img/company_logos/2x/logo-reflexer@2x.png create mode 100644 docs/.vuepress/theme/img/company_logos/2x/logo-sushiswap@2x.png create mode 100644 docs/.vuepress/theme/img/company_logos/2x/logo-uniswap@2x.png create mode 100644 docs/.vuepress/theme/img/company_logos/2x/logo-yearn@2x.png create mode 100644 docs/.vuepress/theme/img/company_logos/2x/logo-zksync@2x.png create mode 100644 docs/.vuepress/theme/img/company_logos/mobile/logo-1inch@2x.png create mode 100644 docs/.vuepress/theme/img/company_logos/mobile/logo-augur@2x.png create mode 100644 docs/.vuepress/theme/img/company_logos/mobile/logo-chainlink@2x.png create mode 100644 docs/.vuepress/theme/img/company_logos/mobile/logo-dharma@2x.png create mode 100644 docs/.vuepress/theme/img/company_logos/mobile/logo-ens@2x.png create mode 100644 docs/.vuepress/theme/img/company_logos/mobile/logo-gnosis@2x.png create mode 100644 docs/.vuepress/theme/img/company_logos/mobile/logo-hegic@2x.png create mode 100644 docs/.vuepress/theme/img/company_logos/mobile/logo-livepeer@2x.png create mode 100644 docs/.vuepress/theme/img/company_logos/mobile/logo-loopring@2x.png create mode 100644 docs/.vuepress/theme/img/company_logos/mobile/logo-reflexer@2x.png create mode 100644 docs/.vuepress/theme/img/company_logos/mobile/logo-sushiswap@2x.png create mode 100644 docs/.vuepress/theme/img/company_logos/mobile/logo-uniswap@2x.png create mode 100644 docs/.vuepress/theme/img/company_logos/mobile/logo-yearn@2x.png create mode 100644 docs/.vuepress/theme/img/company_logos/mobile/logo-zksync@2x.png diff --git a/docs/.vuepress/theme/components/HHWhosUsingHardhat.vue b/docs/.vuepress/theme/components/HHWhosUsingHardhat.vue index 527a8fa6bb..97d02c0c52 100644 --- a/docs/.vuepress/theme/components/HHWhosUsingHardhat.vue +++ b/docs/.vuepress/theme/components/HHWhosUsingHardhat.vue @@ -3,7 +3,6 @@ .padded-container h1.section-title Trusted by top teams section.banner-container.banner-container-desktop - .marquee-container(v-for="group of desktopUsers") .marquee-content .marquee @@ -136,6 +135,66 @@ import UmaMobileImage from "../img/company_logos/mobile/logo-uma@2x.png"; import UnlockDesktopImage from "../img/company_logos/2x/logo-unlock@2x.png"; import UnlockMobileImage from "../img/company_logos/mobile/logo-unlock@2x.png"; +// Mainframe +import MainframeDesktopImage from "../img/company_logos/2x/logo-mainframe@2x.png"; +import MainframeMobileImage from "../img/company_logos/mobile/logo-mainframe@2x.png"; + +// ChainLink +import ChainlinkDesktopImage from "../img/company_logos/2x/logo-chainlink@2x.png"; +import ChainlinkMobileImage from "../img/company_logos/mobile/logo-chainlink@2x.png"; + +// Gnosis +import GnosisDesktopImage from "../img/company_logos/2x/logo-gnosis@2x.png"; +import GnosisMobileImage from "../img/company_logos/mobile/logo-gnosis@2x.png"; + +// SushiSwap +import SushiSwapDesktopImage from "../img/company_logos/2x/logo-sushiswap@2x.png"; +import SushiSwapMobileImage from "../img/company_logos/mobile/logo-sushiswap@2x.png"; + +// ENS +import ENSDesktopImage from "../img/company_logos/2x/logo-ens@2x.png"; +import ENSMobileImage from "../img/company_logos/mobile/logo-ens@2x.png"; + +// Yearn +import YearnDesktopImage from "../img/company_logos/2x/logo-yearn@2x.png"; +import YearnMobileImage from "../img/company_logos/mobile/logo-yearn@2x.png"; + +// Reflexer +import ReflexerDesktopImage from "../img/company_logos/2x/logo-reflexer@2x.png"; +import ReflexerMobileImage from "../img/company_logos/mobile/logo-reflexer@2x.png"; + +// Dharma +import DharmaDesktopImage from "../img/company_logos/2x/logo-dharma@2x.png"; +import DharmaMobileImage from "../img/company_logos/mobile/logo-dharma@2x.png"; + +// 1Inch +import _1InchDesktopImage from "../img/company_logos/2x/logo-1inch@2x.png"; +import _1InchMobileImage from "../img/company_logos/mobile/logo-1inch@2x.png"; + +// Uniswap +import UniswapDesktopImage from "../img/company_logos/2x/logo-uniswap@2x.png"; +import UniswapMobileImage from "../img/company_logos/mobile/logo-uniswap@2x.png"; + +// Hegic +import HegicDesktopImage from "../img/company_logos/2x/logo-hegic@2x.png"; +import HegicMobileImage from "../img/company_logos/mobile/logo-hegic@2x.png"; + +// Augur +import AugurDesktopImage from "../img/company_logos/2x/logo-augur@2x.png"; +import AugurMobileImage from "../img/company_logos/mobile/logo-augur@2x.png"; + +// ZkSync +import ZkSyncDesktopImage from "../img/company_logos/2x/logo-zksync@2x.png"; +import ZkSyncMobileImage from "../img/company_logos/mobile/logo-zksync@2x.png"; + +// Livepeer +import LivepeerDesktopImage from "../img/company_logos/2x/logo-livepeer@2x.png"; +import LivepeerMobileImage from "../img/company_logos/mobile/logo-livepeer@2x.png"; + +// Loopring +import LoopringDesktopImage from "../img/company_logos/2x/logo-loopring@2x.png"; +import LoopringMobileImage from "../img/company_logos/mobile/logo-loopring@2x.png"; + export default { name: "HHWhosUsingHardhat", data() { @@ -143,10 +202,11 @@ export default { return { users: [ { - company: "Decentraland", - href: "https://decentraland.org/", - desktopImage: DecentralandDesktopImage, - mobileImage: DecentralandMobileImage, + company: "Lodestar", + image_filename: "company_logos/mobile/logo-Lodestar@2x.png", + href: "#", + desktopImage: LodestarDesktopImage, + mobileImage: LodestarMobileImage, }, { company: "Connext", @@ -156,11 +216,32 @@ export default { mobileImage: ConnextMobileImage, }, { - company: "Aragon One", - image_filename: "company_logos/mobile/logo-aone@2x.png", - href: "https://aragon.one/", - desktopImage: AragonDesktopImage, - mobileImage: AragonMobileImage, + company: "Set", + image_filename: "company_logos/mobile/logo-set@2x.png", + href: "#", + desktopImage: SetDesktopImage, + mobileImage: SetMobileImage, + }, + { + company: "Opyn", + image_filename: "company_logos/mobile/logo-Opyn@2x.png", + href: "#", + desktopImage: OpynDesktopImage, + mobileImage: OpynMobileImage, + }, + { + company: "Balancer", + image_filename: "company_logos/mobile/logo-Balancer@2x.png", + href: "#", + desktopImage: BalancerDesktopImage, + mobileImage: BalancerMobileImage, + }, + { + company: "Moloch Dao", + image_filename: "company_logos/mobile/logo-molochdao@2x.png", + href: "#", + desktopImage: MolochDesktopImage, + mobileImage: MolochMobileImage, }, { company: "Kyber Network", @@ -170,54 +251,38 @@ export default { mobileImage: KyberMobileImage, }, { - company: "AAVE", - image_filename: "company_logos/mobile/logo-aave@2x.png", + company: "OpenZeppelin", + image_filename: "company_logos/mobile/logo-openzeppelin@2x.png", href: "#", - desktopImage: AaveDesktopImage, - mobileImage: AaveMobileImage, + desktopImage: OpenZeppelinDesktopImage, + mobileImage: OpenZeppelinMobileImage, }, { - company: "Synthetix", - image_filename: "company_logos/mobile/logo-synthetix@2x.png", + company: "PieDao", + image_filename: "company_logos/mobile/logo-pieado@2x.png", href: "#", - desktopImage: SynthetixDesktopImage, - mobileImage: SynthetixMobileImage, + desktopImage: PieDaoDesktopImage, + mobileImage: PieDaoMobileImage, }, { - company: "PoolTogether", - image_filename: "company_logos/mobile/logo-pool@2x.png", + company: "Optimism", + image_filename: "company_logos/mobile/logo-Optimism@2x.png", href: "#", - desktopImage: PoolTogetherDesktopImage, - mobileImage: PoolTogetherMobileImage, - }, - { - company: "Celer", - image_filename: "company_logos/mobile/logo-celer@2x.png", - href: "https://www.celer.network/", - desktopImage: CelerDesktopImage, - mobileImage: CelerMobileImage, - }, - { - company: "Skale", - image_filename: "company_logos/mobile/logo-skale@2x.png", - href: "https://skale.network/", - desktopImage: SkaleDesktopImage, - mobileImage: SkaleMobileImage, + desktopImage: OptimismDesktopImage, + mobileImage: OptimismMobileImage, }, - // SECOND LINE { - company: "Set", - image_filename: "company_logos/mobile/logo-set@2x.png", - href: "#", - desktopImage: SetDesktopImage, - mobileImage: SetMobileImage, + company: "Decentraland", + href: "https://decentraland.org/", + desktopImage: DecentralandDesktopImage, + mobileImage: DecentralandMobileImage, }, { - company: "InstaDapp", - image_filename: "company_logos/mobile/logo-instadapp@2x.png", - href: "#", - desktopImage: InstadappDesktopImage, - mobileImage: InstadappMobileImage, + company: "Aragon One", + image_filename: "company_logos/mobile/logo-aone@2x.png", + href: "https://aragon.one/", + desktopImage: AragonDesktopImage, + mobileImage: AragonMobileImage, }, { company: "Kleros", @@ -227,12 +292,20 @@ export default { mobileImage: KlerosMobileImage, }, { - company: "Balancer", - image_filename: "company_logos/mobile/logo-Balancer@2x.png", + company: "mStable", + image_filename: "company_logos/mobile/logo-mstable@2x.png", href: "#", - desktopImage: BalancerDesktopImage, - mobileImage: BalancerMobileImage, + desktopImage: MStableDesktopImage, + mobileImage: MStableMobileImage, + }, + { + company: "Celo", + image_filename: "company_logos/mobile/logo-celo@2x.png", + href: "#", + desktopImage: CeloDesktopImage, + mobileImage: CeloMobileImage, }, + // SECOND LINE { company: "MyCrypto", image_filename: "company_logos/mobile/logo-mycrypto@2x.png", @@ -241,48 +314,96 @@ export default { mobileImage: MyCryptoMobileImage, }, { - company: "Horizon", - image_filename: "company_logos/mobile/logo-horizon@2x.png", + company: "POAP", + image_filename: "company_logos/mobile/logo-poap@2x.png", href: "#", - desktopImage: HorizonDesktopImage, - mobileImage: HorizonMobileImage, + desktopImage: PoapDesktopImage, + mobileImage: PoapMobileImage, }, + // { + // company: "Melon", + // image_filename: "company_logos/mobile/logo-melon@2x.png", + // href: "#", + // desktopImage: MelonDesktopImage, + // mobileImage: MelonMobileImage, + // }, { - company: "Lodestar", - image_filename: "company_logos/mobile/logo-Lodestar@2x.png", + company: "AAVE", + image_filename: "company_logos/mobile/logo-aave@2x.png", href: "#", - desktopImage: LodestarDesktopImage, - mobileImage: LodestarMobileImage, + desktopImage: AaveDesktopImage, + mobileImage: AaveMobileImage, }, { - company: "mStable", - image_filename: "company_logos/mobile/logo-mstable@2x.png", + company: "OpenGSN", + image_filename: "company_logos/mobile/logo-OpenGSN@2x.png", href: "#", - desktopImage: MStableDesktopImage, - mobileImage: MStableMobileImage, + desktopImage: OpenGSNDesktopImage, + mobileImage: OpenGSNMobileImage, }, { - company: "Melon", - image_filename: "company_logos/mobile/logo-melon@2x.png", + company: "Synthetix", + image_filename: "company_logos/mobile/logo-synthetix@2x.png", href: "#", - desktopImage: MelonDesktopImage, - mobileImage: MelonMobileImage, + desktopImage: SynthetixDesktopImage, + mobileImage: SynthetixMobileImage, }, { - company: "Moloch Dao", - image_filename: "company_logos/mobile/logo-molochdao@2x.png", + company: "Unlock", + image_filename: "company_logos/mobile/logo-unlock@2x.png", href: "#", - desktopImage: MolochDesktopImage, - mobileImage: MolochMobileImage, + desktopImage: UnlockDesktopImage, + mobileImage: UnlockMobileImage, }, { - company: "Celo", - image_filename: "company_logos/mobile/logo-celo@2x.png", + company: "Status", + image_filename: "company_logos/mobile/logo-Status@2x.png", href: "#", - desktopImage: CeloDesktopImage, - mobileImage: CeloMobileImage, + desktopImage: StatusDesktopImage, + mobileImage: StatusMobileImage, + }, + { + company: "PoolTogether", + image_filename: "company_logos/mobile/logo-pool@2x.png", + href: "#", + desktopImage: PoolTogetherDesktopImage, + mobileImage: PoolTogetherMobileImage, }, - // THIRD LINE + { + company: "InstaDapp", + image_filename: "company_logos/mobile/logo-instadapp@2x.png", + href: "#", + desktopImage: InstadappDesktopImage, + mobileImage: InstadappMobileImage, + }, + // { + // company: "Mainframe", + // image_filename: "company_logos/mobile/logo-mainframe@2x.png", + // href: "#", + // desktopImage: MainframeDesktopImage, + // mobileImage: MainframeMobileImage, + // }, + { + company: "Horizon", + image_filename: "company_logos/mobile/logo-horizon@2x.png", + href: "#", + desktopImage: HorizonDesktopImage, + mobileImage: HorizonMobileImage, + }, + // { + // company: "Skale", + // image_filename: "company_logos/mobile/logo-skale@2x.png", + // href: "https://skale.network/", + // desktopImage: SkaleDesktopImage, + // mobileImage: SkaleMobileImage, + // }, + // { + // company: "Celer", + // image_filename: "company_logos/mobile/logo-celer@2x.png", + // href: "https://www.celer.network/", + // desktopImage: CelerDesktopImage, + // mobileImage: CelerMobileImage, + // }, { company: "UMA", image_filename: "company_logos/mobile/logo-uma@2x.png", @@ -290,71 +411,114 @@ export default { desktopImage: UmaDesktopImage, mobileImage: UmaMobileImage, }, + // THIRD LINE { - company: "OpenGSN", - image_filename: "company_logos/mobile/logo-OpenGSN@2x.png", + company: "Chainlink", + image_filename: "company_logos/mobile/logo-chainlink@2x.png", href: "#", - desktopImage: OpenGSNDesktopImage, - mobileImage: OpenGSNMobileImage, + desktopImage: ChainlinkDesktopImage, + mobileImage: ChainlinkMobileImage, }, { - company: "OpenZeppelin", - image_filename: "company_logos/mobile/logo-openzeppelin@2x.png", + company: "Gnosis", + image_filename: "company_logos/mobile/logo-gnosis@2x.png", href: "#", - desktopImage: OpenZeppelinDesktopImage, - mobileImage: OpenZeppelinMobileImage, + desktopImage: GnosisDesktopImage, + mobileImage: GnosisMobileImage, }, { - company: "Optimism", - image_filename: "company_logos/mobile/logo-Optimism@2x.png", + company: "SushiSwap", + image_filename: "company_logos/mobile/logo-sushiswap@2x.png", href: "#", - desktopImage: OptimismDesktopImage, - mobileImage: OptimismMobileImage, + desktopImage: SushiSwapDesktopImage, + mobileImage: SushiSwapMobileImage, }, { - company: "Opyn", - image_filename: "company_logos/mobile/logo-Opyn@2x.png", + company: "ENS", + image_filename: "company_logos/mobile/logo-ens@2x.png", href: "#", - desktopImage: OpynDesktopImage, - mobileImage: OpynMobileImage, + desktopImage: ENSDesktopImage, + mobileImage: ENSMobileImage, }, { - company: "PieDao", - image_filename: "company_logos/mobile/logo-pieado@2x.png", + company: "Yearn", + image_filename: "company_logos/mobile/logo-yearn@2x.png", href: "#", - desktopImage: PieDaoDesktopImage, - mobileImage: PieDaoMobileImage, + desktopImage: YearnDesktopImage, + mobileImage: YearnMobileImage, }, { - company: "POAP", - image_filename: "company_logos/mobile/logo-poap@2x.png", + company: "Reflexer", + image_filename: "company_logos/mobile/logo-reflexer@2x.png", href: "#", - desktopImage: PoapDesktopImage, - mobileImage: PoapMobileImage, + desktopImage: ReflexerDesktopImage, + mobileImage: ReflexerMobileImage, + }, + { + company: "Uniswap", + image_filename: "company_logos/mobile/logo-uniswap@2x.png", + href: "#", + desktopImage: UniswapDesktopImage, + mobileImage: UniswapMobileImage, }, { - company: "Status", - image_filename: "company_logos/mobile/logo-Status@2x.png", + company: "Dharma", + image_filename: "company_logos/mobile/logo-dharma@2x.png", href: "#", - desktopImage: StatusDesktopImage, - mobileImage: StatusMobileImage, + desktopImage: DharmaDesktopImage, + mobileImage: DharmaMobileImage, }, { - company: "Unlock", - image_filename: "company_logos/mobile/logo-unlock@2x.png", + company: "1Inch", + image_filename: "company_logos/mobile/logo-1inch@2x.png", href: "#", - desktopImage: UnlockDesktopImage, - mobileImage: UnlockMobileImage, + desktopImage: _1InchDesktopImage, + mobileImage: _1InchMobileImage, + }, + { + company: "HEGIC", + image_filename: "company_logos/mobile/logo-hegic@2x.png", + href: "#", + desktopImage: HegicDesktopImage, + mobileImage: HegicMobileImage, + }, + // { + // company: "Augur", + // image_filename: "company_logos/mobile/logo-augur@2x.png", + // href: "#", + // desktopImage: AugurDesktopImage, + // mobileImage: AugurMobileImage, + // }, + { + company: "zkSync", + image_filename: "company_logos/mobile/logo-zkSync@2x.png", + href: "#", + desktopImage: ZkSyncDesktopImage, + mobileImage: ZkSyncMobileImage, + }, + { + company: "Livepeer", + image_filename: "company_logos/mobile/logo-livepeer@2x.png", + href: "#", + desktopImage: LivepeerDesktopImage, + mobileImage: LivepeerMobileImage, + }, + { + company: "Loopring", + image_filename: "company_logos/mobile/logo-loopring@2x.png", + href: "#", + desktopImage: LoopringDesktopImage, + mobileImage: LoopringMobileImage, }, ], }; }, computed: { desktopUsers() { - return splitInChunks(this.users, 10); + return splitInChunks(this.users, 15); }, mobileUsers() { - return splitInChunks(this.users, 6); + return splitInChunks(this.users, 9); }, }, }; @@ -369,8 +533,10 @@ function splitInChunks(arr, chunkSize) {