Skip to content

Commit

Permalink
Update undici dependency (#948)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericglau authored Dec 19, 2023
1 parent 9c8a12d commit 11e37eb
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 5 deletions.
4 changes: 4 additions & 0 deletions packages/plugin-hardhat/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Unreleased

- Update dependency on undici. ([#948](https://github.com/OpenZeppelin/openzeppelin-upgrades/pull/948))

## 3.0.0 (2023-12-11)

- Deploy proxies from OpenZeppelin Contracts 5.0. ([#919](https://github.com/OpenZeppelin/openzeppelin-upgrades/pull/919))
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-hardhat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"debug": "^4.1.1",
"ethereumjs-util": "^7.1.5",
"proper-lockfile": "^4.1.1",
"undici": "^5.14.0"
"undici": "^5.28.2"
},
"peerDependencies": {
"@nomicfoundation/hardhat-ethers": "^3.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-hardhat/src/utils/etherscan-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export async function callEtherscanApi(etherscan: Etherscan, params: any): Promi
const responseBodyJson = await response.body.json();
debug('Etherscan response', JSON.stringify(responseBodyJson));

return responseBodyJson;
return responseBodyJson as EtherscanResponseBody;
}

/**
Expand Down Expand Up @@ -64,7 +64,7 @@ interface EtherscanConfig {
interface EtherscanResponseBody {
status: string;
message: string;
result: any;
result: unknown;
}

export const RESPONSE_OK = '1';
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-hardhat/src/verify-proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ async function getEventResponse(
const responseBody = await callEtherscanApi(etherscan, params);

if (responseBody.status === RESPONSE_OK) {
const result = responseBody.result;
const result = responseBody.result as EtherscanEventResponse[];
return result[0];
} else if (responseBody.message === 'No records found' || responseBody.message === 'No logs found') {
debug(`no result found for event topic ${topic} at address ${address}`);
Expand Down Expand Up @@ -697,7 +697,7 @@ async function linkProxyWithImplementationAbi(

if (responseBody.status === RESPONSE_OK) {
// initial call was OK, but need to send a status request using the returned guid to get the actual verification status
const guid = responseBody.result;
const guid = responseBody.result as string;
responseBody = await checkProxyVerificationStatus(etherscan, guid);

while (responseBody.result === 'Pending in queue') {
Expand Down
12 changes: 12 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,11 @@
"@ethersproject/properties" "^5.7.0"
"@ethersproject/strings" "^5.7.0"

"@fastify/busboy@^2.0.0":
version "2.1.0"
resolved "https://registry.yarnpkg.com/@fastify/busboy/-/busboy-2.1.0.tgz#0709e9f4cb252351c609c6e6d8d6779a8d25edff"
integrity sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==

"@frangio/servbot@^0.2.5":
version "0.2.5"
resolved "https://registry.yarnpkg.com/@frangio/servbot/-/servbot-0.2.5.tgz#d4524c15c8a34fcdde36037b84407c4c60b4cf16"
Expand Down Expand Up @@ -12506,6 +12511,13 @@ undici@^5.14.0:
dependencies:
busboy "^1.6.0"

undici@^5.28.2:
version "5.28.2"
resolved "https://registry.yarnpkg.com/undici/-/undici-5.28.2.tgz#fea200eac65fc7ecaff80a023d1a0543423b4c91"
integrity sha512-wh1pHJHnUeQV5Xa8/kyQhO7WFa8M34l026L5P/+2TYiakvGy5Rdc8jWZVyG7ieht/0WgJLEd3kcU5gKx+6GC8w==
dependencies:
"@fastify/busboy" "^2.0.0"

unfetch@^4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/unfetch/-/unfetch-4.2.0.tgz#7e21b0ef7d363d8d9af0fb929a5555f6ef97a3be"
Expand Down

0 comments on commit 11e37eb

Please sign in to comment.