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)) diff --git a/packages/plugin-hardhat/src/utils/etherscan-api.ts b/packages/plugin-hardhat/src/utils/etherscan-api.ts index fe4843027..e11ec2994 100644 --- a/packages/plugin-hardhat/src/utils/etherscan-api.ts +++ b/packages/plugin-hardhat/src/utils/etherscan-api.ts @@ -14,12 +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 = new URLSearchParams({ ...params, apikey: etherscan.apiKey }); - + const parameters = { ...params, apikey: etherscan.apiKey }; const response = await request(etherscan.apiUrl, { method: 'POST', - headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, - body: parameters.toString(), + query: parameters, }); if (!(response.statusCode >= 200 && response.statusCode <= 299)) {