Skip to content

Commit

Permalink
Merge branch 'master' into cdesch-master
Browse files Browse the repository at this point in the history
  • Loading branch information
fvictorio committed Mar 19, 2021
2 parents 40d8e2d + 949b8f0 commit 25d78e0
Show file tree
Hide file tree
Showing 89 changed files with 9,350 additions and 1,804 deletions.
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Thank you for using Hardhat and taking the time to open an issue!

**Note that this issue tracker is not a support channel.**

- For help with Hardhat and Hardhat network, please use our [Discord server](https://hardhat.org/discord).
- For help with ethers.js, please go to [its Github Discussions](https://github.com/ethers-io/ethers.js/discussions).

If you are reporting a bug, please include reproduction steps. The best way to do this
is to include a [Minimal Reproducible Example](https://stackoverflow.com/help/minimal-reproducible-example).
If you can't do that, then include a link to your repo, and the steps to reproduce the problem. The easiest it
is to reproduce your problem, the faster we are going to be able to fix it.

If you are submitting a feature request, please take the time to clearly describe your use case, and not only
your proposed solution.
1 change: 1 addition & 0 deletions config/typescript/@types/merkle-patricia-tree/index.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
declare module "merkle-patricia-tree/secure";
declare module "merkle-patricia-tree";
23 changes: 23 additions & 0 deletions config/typescript/@types/mnemonist/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
declare module "mnemonist/heap" {
type HeapComparator<T> = (a: T, b: T) => number;

export class MaxHeap<T> {

// Members
size: number;

// Constructor
constructor(comparator?: HeapComparator<T>);

// Methods
clear(): void;
push(item: T): number;
peek(): T | undefined;
pop(): T | undefined;
replace(item: T): T | undefined;
pushpop(item: T): T | undefined;
toArray(): Array<T>;
consume(): Array<T>;
inspect(): any;
}
}
7 changes: 7 additions & 0 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,13 @@ module.exports = {
["/errors/", "Error codes", 0],
],
},
{
title: "Reference",
collapsable: false,
children: [
["/reference/solidity-support.html", "Solidity support", 0],
],
},
"/buidler-documentation.html",
{
title: "Plugins",
Expand Down
40 changes: 24 additions & 16 deletions docs/.vuepress/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const plugins = [
author: "Nomic Labs",
authorUrl: "https://twitter.com/nomiclabs",
url:
"https://github.com/nomiclabs/buidler/tree/master/packages/hardhat-ethers",
"https://github.com/nomiclabs/hardhat/tree/master/packages/hardhat-ethers",
description: "Injects ethers.js into the Hardhat Runtime Environment",
tags: ["Ethers.js", "Testing", "Tasks", "Scripts"],
},
Expand All @@ -13,7 +13,7 @@ const plugins = [
author: "Nomic Labs",
authorUrl: "https://twitter.com/nomiclabs",
url:
"https://github.com/nomiclabs/buidler/tree/master/packages/hardhat-waffle",
"https://github.com/nomiclabs/hardhat/tree/master/packages/hardhat-waffle",
description:
"Adds a Waffle-compatible provider to the Hardhat Runtime Environment and automatically initializes the Waffle Chai matchers",
tags: ["Waffle", "Testing"],
Expand All @@ -23,7 +23,7 @@ const plugins = [
author: "Nomic Labs",
authorUrl: "https://twitter.com/nomiclabs",
url:
"https://github.com/nomiclabs/buidler/tree/master/packages/hardhat-truffle4",
"https://github.com/nomiclabs/hardhat/tree/master/packages/hardhat-truffle4",
description: "Integration with TruffleContract from Truffle 4",
tags: ["Truffle", "Testing"],
},
Expand All @@ -32,7 +32,7 @@ const plugins = [
author: "Nomic Labs",
authorUrl: "https://twitter.com/nomiclabs",
url:
"https://github.com/nomiclabs/buidler/tree/master/packages/hardhat-truffle5",
"https://github.com/nomiclabs/hardhat/tree/master/packages/hardhat-truffle5",
description: "Integration with TruffleContract from Truffle 5",
tags: ["Truffle", "Testing"],
},
Expand All @@ -41,7 +41,7 @@ const plugins = [
author: "Nomic Labs",
authorUrl: "https://twitter.com/nomiclabs",
url:
"https://github.com/nomiclabs/buidler/tree/master/packages/hardhat-web3",
"https://github.com/nomiclabs/hardhat/tree/master/packages/hardhat-web3",
description: "Injects Web3 1.x into the Hardhat Runtime Environment",
tags: ["Web3.js", "Testing", "Tasks", "Scripts"],
},
Expand All @@ -50,7 +50,7 @@ const plugins = [
author: "Nomic Labs",
authorUrl: "https://twitter.com/nomiclabs",
url:
"https://github.com/nomiclabs/buidler/tree/master/packages/hardhat-web3-legacy",
"https://github.com/nomiclabs/hardhat/tree/master/packages/hardhat-web3-legacy",
description: "Injects Web3 0.20.x into the Hardhat Runtime Environment",
tags: ["Web3.js", "Legacy", "Testing", "Tasks", "Scripts"],
},
Expand All @@ -59,7 +59,7 @@ const plugins = [
author: "Nomic Labs",
authorUrl: "https://twitter.com/nomiclabs",
url:
"https://github.com/nomiclabs/buidler/tree/master/packages/hardhat-etherscan",
"https://github.com/nomiclabs/hardhat/tree/master/packages/hardhat-etherscan",
description: "Automatically verify contracts on Etherscan",
tags: ["Etherscan", "Verification"],
},
Expand All @@ -68,7 +68,7 @@ const plugins = [
author: "Nomic Labs",
authorUrl: "https://twitter.com/nomiclabs",
url:
"https://github.com/nomiclabs/buidler/tree/master/packages/hardhat-ganache",
"https://github.com/nomiclabs/hardhat/tree/master/packages/hardhat-ganache",
description: "Hardhat plugin for managing Ganache",
tags: ["Ganache", "Testing network"],
},
Expand All @@ -77,7 +77,7 @@ const plugins = [
author: "Nomic Labs",
authorUrl: "https://twitter.com/nomiclabs",
url:
"https://github.com/nomiclabs/buidler/tree/master/packages/hardhat-solpp",
"https://github.com/nomiclabs/hardhat/tree/master/packages/hardhat-solpp",
description:
"Automatically run the solpp preprocessor before each compilation",
tags: ["Solpp", "Preprocessor"],
Expand All @@ -87,7 +87,7 @@ const plugins = [
author: "Nomic Labs",
authorUrl: "https://twitter.com/nomiclabs",
url:
"https://github.com/nomiclabs/buidler/tree/master/packages/hardhat-solhint",
"https://github.com/nomiclabs/hardhat/tree/master/packages/hardhat-solhint",
description: "Easily run solhint to lint your Solidity code",
tags: ["Solhint", "Linter"],
},
Expand All @@ -96,7 +96,7 @@ const plugins = [
author: "Nomic Labs",
authorUrl: "https://twitter.com/nomiclabs",
url:
"https://github.com/nomiclabs/buidler/tree/master/packages/hardhat-vyper",
"https://github.com/nomiclabs/hardhat/tree/master/packages/hardhat-vyper",
description: "Adds support to compile Vyper smart contracts",
tags: ["Vyper", "Compiler"],
},
Expand Down Expand Up @@ -258,14 +258,14 @@ const plugins = [
tags: ["Compiling", "Documentation", "Buidler plugin"],
},
{
name: "buidler-local-networks-config-plugin",
name: "hardhat-local-networks-config-plugin",
author: "Facu Spagnuolo",
authorUrl: "https://twitter.com/facuspagnuolo",
url:
"https://github.com/facuspagnuolo/buidler-local-networks-config-plugin/tree/master",
"https://github.com/facuspagnuolo/hardhat-local-networks-config-plugin/tree/master",
description:
"Allow loading network configs for Buidler projects in home file",
tags: ["Networks", "Config", "Buidler plugin"],
"Allow loading network configs for Hardhat projects in home file",
tags: ["Networks", "Config"],
},
{
name: "@eth-optimisim/smock",
Expand Down Expand Up @@ -299,11 +299,19 @@ const plugins = [
author: "Symfoni",
authorUrl: "https://github.com/symfoni/",
url:
"https://github.com/symfoni/hardhat-plugins/tree/hardhat/packages/hardhat-react",
"https://github.com/symfoni/symfoni-monorepo/tree/master/packages/hardhat-react",
description:
"A Hardhat plugin that generates a React hook component from your smart contracts. Hot reloaded into your React app. Deployed or not deployed. And everything typed and initialized.",
tags: ["Ethers", "React", "Deploy", "Typechain", "Frontend", "Web3modal"],
},
{
name: "hardhat-tracer",
author: "Soham Zemse",
authorUrl: "https://github.com/zemse/",
url: "https://github.com/zemse/hardhat-tracer/tree/master",
description: "See emitted events during your hardhat tests in the console",
tags: ["Events", "Logs", "Trace", "Console", "Testing"],
},
];

module.exports = plugins.map((p) => ({
Expand Down
1 change: 1 addition & 0 deletions docs/.vuepress/public/privacy-policy.html

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions docs/.vuepress/theme/components/HHFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ footer
span Supported by
.logo
.separator
.copyright Copyright 2020 Nomic Labs LLC

.legal
a Copyright 2020 Nomic Labs LLC |
a(href="/privacy-policy.html") Privacy Policy
</template>

<script>
Expand Down Expand Up @@ -77,13 +80,17 @@ footer
background #4B4D4D
margin 24px auto
.copyright
.legal
font-size 15px
color #9B9FA8
font-family 'Chivo'
@media (max-width: 1000px)
margin-bottom 40px
font-size 12px
a
font-family inherit
color inherit
*
color black
Expand Down
3 changes: 0 additions & 3 deletions docs/.vuepress/theme/layouts/Landing.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ div
slot(name="page-bottom", slot="bottom")

HHFooter(v-if="this.$page.frontmatter.home")
HHMigrationModal
</template>

<script>
Expand All @@ -39,12 +38,10 @@ import HHFooter from "../components/HHFooter";
import HHHome from "../components/HHHome";
import HHPage from "../components/HHPage";
import HHSidebar from "../components/HHSidebar";
import HHMigrationModal from "../components/HHMigrationModal";
export default {
name: "Layout",
components: {
HHMigrationModal,
HHTopBar,
HHNavbar,
HHHero,
Expand Down
12 changes: 5 additions & 7 deletions docs/.vuepress/theme/layouts/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,21 @@
@touchend="onTouchEnd"
>
<Navbar v-if="shouldShowNavbar" @toggle-sidebar="toggleSidebar" />

<div class="sidebar-mask" @click="toggleSidebar(false)"></div>

<Sidebar :items="sidebarItems" @toggle-sidebar="toggleSidebar">
<slot name="sidebar-top" slot="top" />
<slot name="sidebar-bottom" slot="bottom" />
</Sidebar>

<Home v-if="$page.frontmatter.home" />

<Page v-else :sidebar-items="sidebarItems">
<slot name="page-top" slot="top" />
<slot name="page-bottom" slot="bottom" />
</Page>
</div>
<HHMigrationModal />
</div>
</template>

Expand All @@ -34,10 +33,9 @@ import Navbar from "../components/Navbar.vue";
import Page from "../components/Page.vue";
import Sidebar from "../components/Sidebar.vue";
import { resolveSidebarItems } from "../util";
import HHMigrationModal from "../components/HHMigrationModal";
export default {
components: {HHMigrationModal, Home, Page, Sidebar, Navbar },
components: { Home, Page, Sidebar, Navbar },
data() {
return {
Expand Down
2 changes: 1 addition & 1 deletion docs/_redirects
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ https://www.usehardhat.com/* https://hardhat.org/:splat 301!
/links/stack-traces / 302
/reportbug https://github.com/nomiclabs/hardhat/issues/new 302
/console-log /hardhat-network/#console-log 302
/discord https://discord.gg/uVgdpAb 302
/discord https://discord.gg/TETZs2KK4k 302
/hre /advanced/hardhat-runtime-environment.html 302

## Hardhat migration
Expand Down
4 changes: 2 additions & 2 deletions docs/config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = {
hardhat: {
},
rinkeby: {
url: "https://rinkeby.infura.io/v3/123abc123abc123abc123abc123abcde",
url: "https://eth-mainnet.alchemyapi.io/v2/123abc123abc123abc123abc123abcde",
accounts: [privateKey1, privateKey2, ...]
}
},
Expand Down Expand Up @@ -110,7 +110,7 @@ You can set the following fields on the `hardhat` config:
### JSON-RPC based networks

These are networks that connect to an external node. Nodes can be running in your computer, like Ganache, or remotely,
like Infura.
like Alchemy or Infura.

This kind of networks are configured with objects with the following fields:

Expand Down
4 changes: 4 additions & 0 deletions docs/guides/waffle-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ We are requiring `Chai` which is an assertions library. These asserting function

This is why we're using the `hardhat-waffle` plugin, which makes it easier to assert values from Ethereum. Check out [this section](https://ethereum-waffle.readthedocs.io/en/latest/matchers.html) in Waffle's documentation for the entire list of Ethereum-specific matchers.

::: warning
Some Waffle matchers return a Promise rather than executing immediately. If you're making a call or sending a transaction, make sure to check Waffle's documentation, and `await` these Promises. Otherwise your tests may pass without running all checks.
:::

```js
describe("Greeter", function () {
it("Should return the new greeting once it's changed", async function () {
Expand Down
Loading

0 comments on commit 25d78e0

Please sign in to comment.