Skip to content

Commit

Permalink
Fix Bridge contract artifact for Sepolia (#811)
Browse files Browse the repository at this point in the history
While fetching contract events, the start block for the searched range
is taken based on the contract creation block. This is the
`receipt.blockNumber` field living in the contract artifact. However,
this field may be overwritten by the Hardhat Upgrades plugin and point
to the deployment block of the recent contract implementation, not the
transparent proxy.

This was the case for the Sepolia `Bridge` artifact. Contract events
like `NewWalletRegistered` were taken starting from the recent
implementation deployment block which occurred much later than the
`Bridge` proxy deployment. In effect, it was not possible to fetch all
`Bridge` wallets ever created.

Here we fix that problem.
  • Loading branch information
michalinacienciala committed Apr 18, 2024
2 parents eb69bd6 + ef164e2 commit 503f8ae
Showing 1 changed file with 51 additions and 15 deletions.
66 changes: 51 additions & 15 deletions typescript/src/lib/ethereum/artifacts/sepolia/Bridge.json
Original file line number Diff line number Diff line change
Expand Up @@ -2759,33 +2759,69 @@
"type": "function"
}
],
"transactionHash": "0xe239619b368853a39ada7704bc2dd6bf848ed50782e8ae3acc642c03e2988eda",
"transactionHash": "0xa4ec0ca4e87fb3569ac34272e4b4398e283063825d61a9c9c786a7b7f72e07fb",
"receipt": {
"to": "0x39f60B25C4598Caf7e922d6fC063E9002db45845",
"to": null,
"from": "0x68ad60CC5e8f3B7cC53beaB321cf0e6036962dBc",
"contractAddress": null,
"transactionIndex": 72,
"gasUsed": "38760",
"logsBloom": "0x00000000000000000000000000000000408000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000020000020000000000020000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0x508ed9421a7af02b1f7759a50ba6730ec0490963c5fe79da2b8185824b140529",
"transactionHash": "0xe239619b368853a39ada7704bc2dd6bf848ed50782e8ae3acc642c03e2988eda",
"contractAddress": "0x9b1a7fE5a16A15F2f9475C5B231750598b113403",
"transactionIndex": 31,
"gasUsed": "972366",
"logsBloom": "0x00000000000000000000000000000000408000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000800000008000000000000000000000000000001000000000000000000800000000000000000000000000000000000000000000000001000000000000000000080000000000000820000000000000000000000000000000400000020000000000000000000000000000000000020000000000000000000040000000000000400000000000000000000000000000000000000000800000000000000000000000000000000000000000000",
"blockHash": "0xb6a6c187a255cdcb078dcb0fce165df240d8adeed7b3e0280d65d562fb6490bd",
"transactionHash": "0xa4ec0ca4e87fb3569ac34272e4b4398e283063825d61a9c9c786a7b7f72e07fb",
"logs": [
{
"transactionIndex": 72,
"blockNumber": 5340702,
"transactionHash": "0xe239619b368853a39ada7704bc2dd6bf848ed50782e8ae3acc642c03e2988eda",
"transactionIndex": 31,
"blockNumber": 4553028,
"transactionHash": "0xa4ec0ca4e87fb3569ac34272e4b4398e283063825d61a9c9c786a7b7f72e07fb",
"address": "0x9b1a7fE5a16A15F2f9475C5B231750598b113403",
"topics": [
"0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b",
"0x000000000000000000000000c1cee2b8dfcc4d3bd315f2cd44a9ee77ec3b808e"
"0x0000000000000000000000002a2b232b189fc03bd918d547e74635cca1bbfa0c"
],
"data": "0x",
"logIndex": 79,
"blockHash": "0xb6a6c187a255cdcb078dcb0fce165df240d8adeed7b3e0280d65d562fb6490bd"
},
{
"transactionIndex": 31,
"blockNumber": 4553028,
"transactionHash": "0xa4ec0ca4e87fb3569ac34272e4b4398e283063825d61a9c9c786a7b7f72e07fb",
"address": "0x9b1a7fE5a16A15F2f9475C5B231750598b113403",
"topics": [
"0x5f56bee8cffbe9a78652a74a60705edede02af10b0bbb888ca44b79a0d42ce80"
],
"data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000068ad60cc5e8f3b7cc53beab321cf0e6036962dbc",
"logIndex": 80,
"blockHash": "0x508ed9421a7af02b1f7759a50ba6730ec0490963c5fe79da2b8185824b140529"
"blockHash": "0xb6a6c187a255cdcb078dcb0fce165df240d8adeed7b3e0280d65d562fb6490bd"
},
{
"transactionIndex": 31,
"blockNumber": 4553028,
"transactionHash": "0xa4ec0ca4e87fb3569ac34272e4b4398e283063825d61a9c9c786a7b7f72e07fb",
"address": "0x9b1a7fE5a16A15F2f9475C5B231750598b113403",
"topics": [
"0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"
],
"data": "0x0000000000000000000000000000000000000000000000000000000000000001",
"logIndex": 81,
"blockHash": "0xb6a6c187a255cdcb078dcb0fce165df240d8adeed7b3e0280d65d562fb6490bd"
},
{
"transactionIndex": 31,
"blockNumber": 4553028,
"transactionHash": "0xa4ec0ca4e87fb3569ac34272e4b4398e283063825d61a9c9c786a7b7f72e07fb",
"address": "0x9b1a7fE5a16A15F2f9475C5B231750598b113403",
"topics": [
"0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f"
],
"data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000039f60b25c4598caf7e922d6fc063e9002db45845",
"logIndex": 82,
"blockHash": "0xb6a6c187a255cdcb078dcb0fce165df240d8adeed7b3e0280d65d562fb6490bd"
}
],
"blockNumber": 5340702,
"cumulativeGasUsed": "9325415",
"blockNumber": 4553028,
"cumulativeGasUsed": "6118880",
"status": 1,
"byzantium": true
},
Expand Down

0 comments on commit 503f8ae

Please sign in to comment.