Skip to content

Commit

Permalink
Merge branch 'rethnet/main' into feat/rethnet-nodejs
Browse files Browse the repository at this point in the history
  • Loading branch information
fvictorio committed Oct 27, 2022
2 parents 8c475da + 7027e82 commit 7087f34
Show file tree
Hide file tree
Showing 14 changed files with 101 additions and 33 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release
on:
push:
branches:
- $default-branch
- main

jobs:
release:
Expand All @@ -26,6 +26,6 @@ jobs:
run: yarn

- name: Create Release Pull Request
uses: changesets/action@master
uses: changesets/action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ An issue being assigned does not mean that we are actively working on addressing

## Project structure

This repository is a monorepo handled with [Yarn workspaces](https://classic.yarnpkg.com/en/docs/workspaces/).
This repository is a monorepo handled with [Yarn v1](https://classic.yarnpkg.com/lang/en/) and [Yarn workspaces](https://classic.yarnpkg.com/en/docs/workspaces/).

There's a folder for each subproject in `packages/`. All of them are plugins, except for `/packages/hardhat-core` which is the main project (i.e. the one that's published as [hardhat](https://npmjs.com/package/hardhat) in npm).

Expand Down
53 changes: 53 additions & 0 deletions docs/src/content/hardhat-runner/plugins/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,43 @@ const communityPlugins: IPlugin[] = [
description: "Generate a static documentation site from NatSpec comments",
tags: ["Documentation", "NatSpec"],
},
{
name: "@solidstate/hardhat-4byte-uploader",
author: "Nick Barry",
authorUrl: "https://github.com/ItsNickBarry",
description:
"Upload local function selectors to the Ethereum Selector Database",
tags: ["Bytecode", "ABI"],
},
{
name: "@solidstate/hardhat-test-short-circuit",
author: "Nick Barry",
authorUrl: "https://github.com/ItsNickBarry",
description:
"Stop Hardhat test execution on demand and print output from completed tests",
tags: ["Testing", "Mocha"],
},
{
name: "@solidstate/hardhat-txn-dot-xyz",
author: "Nick Barry",
authorUrl: "https://github.com/ItsNickBarry",
description: "Generate and execute on-chain transactions via txn.xyz",
tags: ["Signing", "Scripts"],
},
{
name: "@solidstate/hardhat-bytecode-exporter",
author: "Nick Barry",
authorUrl: "https://github.com/ItsNickBarry",
description: "Automatically export contract bytecode on compilation",
tags: ["Bytecode", "Compiling"],
},
{
name: "@solidstate/hardhat-accounts",
author: "Nick Barry",
authorUrl: "https://github.com/ItsNickBarry",
description: "Output list of available accounts and their balances",
tags: ["Accounts", "Balances"],
},
{
name: "hardhat-watcher",
author: "Xander Deseyn",
Expand Down Expand Up @@ -298,6 +335,14 @@ const communityPlugins: IPlugin[] = [
"Hardhat plugin to deploy your smart contracts across multiple EVM chains with the same deterministic address.",
tags: ["Deployment", "CREATE2", "Tasks"],
},
{
name: "@tovarishfin/hardhat-yul",
author: "tovarishfin",
authorUrl: "https://codylamson.com",
description:
"An updated and working Hardhat plugin to compile the Yul and Yul+ languages into solc compatible artifacts. Works with .yul and .yulp file extensions",
tags: ["Yul", "Assembly", "Compiler", "Yul+"],
},
{
name: "@controlcpluscontrolv/hardhat-yul",
author: "ControlCplusControlV",
Expand Down Expand Up @@ -555,6 +600,14 @@ const communityPlugins: IPlugin[] = [
"Define your project's deployment in a simple manifest, then deploy and share it anywhere. Inspired by Docker, Terraform, and npm. https://usecannon.com/",
tags: ["Tooling", "Deployment", "Testing"],
},
{
name: "hardhat-etherscan-contract-cloner",
author: "Tuckson",
authorUrl: "https://github.com/TucksonDev",
description:
"Hardhat plugin for cloning verified contracts from any supported network using Etherscan's API.",
tags: ["Etherscan", "Clone", "Smart contract"],
},
{
name: "hardhat-interact",
author: "Synthetix Core Contributors",
Expand Down
6 changes: 6 additions & 0 deletions packages/hardhat-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# hardhat

## 2.12.1

### Patch Changes

- 145b12c7d: Fixed a problem that was preventing Hardhat from being used in Alpine Linux.

## 2.12.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/hardhat-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hardhat",
"version": "2.12.0",
"version": "2.12.1",
"author": "Nomic Labs LLC",
"license": "MIT",
"homepage": "https://hardhat.org",
Expand Down
22 changes: 11 additions & 11 deletions packages/hardhat-core/src/internal/solidity/compiler/downloader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import fsExtra from "fs-extra";
import debug from "debug";
import os from "os";
import { execFile } from "child_process";
import { promisify } from "util";

import { download } from "../../util/download";
import { assertHardhatInvariant, HardhatError } from "../../core/errors";
import { ERRORS } from "../../core/errors-list";
Expand Down Expand Up @@ -345,17 +347,15 @@ export class CompilerDownloader implements ICompilerDownloader {
await fsExtra.createFile(this._getCompilerDoesntWorkFile(build));
}

private _checkNativeSolc(build: CompilerBuild) {
private async _checkNativeSolc(build: CompilerBuild) {
const solcPath = this._getCompilerBinaryPathFromBuild(build);
return new Promise((resolve) => {
try {
const process = execFile(solcPath, ["--version"]);
process.on("exit", (code) => {
resolve(code === 0);
});
} catch {
resolve(false);
}
});
const execFileP = promisify(execFile);

try {
await execFileP(solcPath, ["--version"]);
return true;
} catch {
return false;
}
}
}
6 changes: 6 additions & 0 deletions packages/hardhat-ethers/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @nomiclabs/hardhat-ethers

## 2.2.1

### Patch Changes

- 136f25a9e: `getContractAt` doesn't throw anymore if the given address is not a contract.

## 2.2.0

### Minor Changes
Expand Down
2 changes: 0 additions & 2 deletions packages/hardhat-ethers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ The [`Contract`s](https://docs.ethers.io/v5/single-page/#/v5/api/contract/contra

If there is no signer available, `getContractAt` returns [read-only](https://docs.ethers.io/v5/single-page/#/v5/api/contract/contract/-%23-Contract--readonly) contracts.

If the address provided to `getContractAt` is not the address of a contract account, an error will be thrown.

## Usage

There are no additional steps you need to take for this plugin to work.
Expand Down
2 changes: 1 addition & 1 deletion packages/hardhat-ethers/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nomiclabs/hardhat-ethers",
"version": "2.2.0",
"version": "2.2.1",
"description": "Hardhat plugin for ethers",
"homepage": "https://github.com/nomiclabs/hardhat/tree/master/packages/hardhat-ethers",
"repository": "github:nomiclabs/hardhat",
Expand Down
7 changes: 0 additions & 7 deletions packages/hardhat-ethers/src/internal/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,13 +303,6 @@ export async function getContractAt(
address: string,
signer?: ethers.Signer
) {
if ((await hre.ethers.provider.getCode(address)) === "0x") {
throw new NomicLabsHardhatPluginError(
pluginName,
`${address} is not a contract account.`
);
}

if (typeof nameOrAbi === "string") {
const artifact = await hre.artifacts.readArtifact(nameOrAbi);

Expand Down
8 changes: 3 additions & 5 deletions packages/hardhat-ethers/test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -710,12 +710,10 @@ describe("Ethers plugin", function () {
});

describe("by name and address", function () {
it("Should throw if address does not belong to a contract", async function () {
it("Should not throw if address does not belong to a contract", async function () {
const address = await signers[0].getAddress();
return assert.isRejected(
this.env.ethers.getContractAt("Greeter", address),
`${address} is not a contract account.`
);
// shouldn't throw
await this.env.ethers.getContractAt("Greeter", address);
});

it("Should return an instance of a contract", async function () {
Expand Down
7 changes: 7 additions & 0 deletions packages/hardhat-etherscan/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @nomiclabs/hardhat-etherscan

## 3.1.2

### Patch Changes

- eb3f7a7bd: - Added Arbitrum Goerli to the list of supported networks.
- Fixed the Optimism Goerli URLs.

## 3.1.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/hardhat-etherscan/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nomiclabs/hardhat-etherscan",
"version": "3.1.1",
"version": "3.1.2",
"description": "Hardhat plugin for verifying contracts on etherscan",
"repository": "github:nomiclabs/hardhat",
"homepage": "https://github.com/nomiclabs/hardhat/tree/master/packages/hardhat-etherscan",
Expand Down
11 changes: 9 additions & 2 deletions packages/hardhat-etherscan/src/ChainConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ export const chainConfig: ChainConfig = {
optimisticGoerli: {
chainId: 420,
urls: {
apiURL: "https://api-goerli-optimistic.etherscan.io/api",
browserURL: "https://goerli-optimistic.etherscan.io/",
apiURL: "https://api-goerli-optimism.etherscan.io/api",
browserURL: "https://goerli-optimism.etherscan.io/",
},
},
polygon: {
Expand All @@ -121,6 +121,13 @@ export const chainConfig: ChainConfig = {
browserURL: "https://arbiscan.io/",
},
},
arbitrumGoerli: {
chainId: 421613,
urls: {
apiURL: "https://api-goerli.arbiscan.io/api",
browserURL: "https://goerli.arbiscan.io/",
},
},
arbitrumTestnet: {
chainId: 421611,
urls: {
Expand Down

0 comments on commit 7087f34

Please sign in to comment.