From 20cf98984d137487d1a213818ecb7278b1b17600 Mon Sep 17 00:00:00 2001 From: mikkel-pearl <79226700+mikkel-pearl@users.noreply.github.com> Date: Thu, 4 Jan 2024 19:43:29 -0700 Subject: [PATCH 1/4] Use query instead of body for Etherscan API --- packages/plugin-hardhat/src/utils/etherscan-api.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/plugin-hardhat/src/utils/etherscan-api.ts b/packages/plugin-hardhat/src/utils/etherscan-api.ts index fe4843027..3bc190a13 100644 --- a/packages/plugin-hardhat/src/utils/etherscan-api.ts +++ b/packages/plugin-hardhat/src/utils/etherscan-api.ts @@ -14,12 +14,9 @@ import { Etherscan } from '@nomicfoundation/hardhat-verify/etherscan'; * @returns The Etherscan API response */ export async function callEtherscanApi(etherscan: Etherscan, params: any): Promise { - const parameters = new URLSearchParams({ ...params, apikey: etherscan.apiKey }); - const response = await request(etherscan.apiUrl, { method: 'POST', - headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, - body: parameters.toString(), + query: params }); if (!(response.statusCode >= 200 && response.statusCode <= 299)) { From cb1a6967956c622120d8ba1874152f98b5bc5e2e Mon Sep 17 00:00:00 2001 From: mikkel-pearl <79226700+mikkel-pearl@users.noreply.github.com> Date: Thu, 4 Jan 2024 19:50:18 -0700 Subject: [PATCH 2/4] Use query instead of body for Etherscan API --- packages/plugin-hardhat/src/utils/etherscan-api.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/plugin-hardhat/src/utils/etherscan-api.ts b/packages/plugin-hardhat/src/utils/etherscan-api.ts index 3bc190a13..cd5236ba3 100644 --- a/packages/plugin-hardhat/src/utils/etherscan-api.ts +++ b/packages/plugin-hardhat/src/utils/etherscan-api.ts @@ -14,9 +14,10 @@ import { Etherscan } from '@nomicfoundation/hardhat-verify/etherscan'; * @returns The Etherscan API response */ export async function callEtherscanApi(etherscan: Etherscan, params: any): Promise { + const parameters = { ...params, apikey: etherscan.apiKey }; const response = await request(etherscan.apiUrl, { method: 'POST', - query: params + query: parameters }); if (!(response.statusCode >= 200 && response.statusCode <= 299)) { From fbfea1f532a3a04b27cb5f8b913c1274a39ea7bd Mon Sep 17 00:00:00 2001 From: Eric Lau Date: Tue, 9 Jan 2024 12:05:03 -0500 Subject: [PATCH 3/4] Fix lint --- packages/plugin-hardhat/src/utils/etherscan-api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugin-hardhat/src/utils/etherscan-api.ts b/packages/plugin-hardhat/src/utils/etherscan-api.ts index cd5236ba3..e11ec2994 100644 --- a/packages/plugin-hardhat/src/utils/etherscan-api.ts +++ b/packages/plugin-hardhat/src/utils/etherscan-api.ts @@ -17,7 +17,7 @@ export async function callEtherscanApi(etherscan: Etherscan, params: any): Promi const parameters = { ...params, apikey: etherscan.apiKey }; const response = await request(etherscan.apiUrl, { method: 'POST', - query: parameters + query: parameters, }); if (!(response.statusCode >= 200 && response.statusCode <= 299)) { From f4f807003bb18b3c448785bbc44cea3529164767 Mon Sep 17 00:00:00 2001 From: Eric Lau Date: Tue, 9 Jan 2024 12:59:51 -0500 Subject: [PATCH 4/4] Update changelog --- packages/plugin-hardhat/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/plugin-hardhat/CHANGELOG.md b/packages/plugin-hardhat/CHANGELOG.md index 2f45fae88..59f8cb795 100644 --- a/packages/plugin-hardhat/CHANGELOG.md +++ b/packages/plugin-hardhat/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## Unreleased + +- Support proxy verification on Snowtrace. ([#954](https://github.com/OpenZeppelin/openzeppelin-upgrades/pull/954)) + ## 3.0.1 (2023-12-20) - Update dependency on undici. ([#948](https://github.com/OpenZeppelin/openzeppelin-upgrades/pull/948))