-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Eth Event Receipt Logs: use event index for logs (#12269)
* use event index for receipt logs * tests * increment event count if there is an address mismatch * itests for receipt logs consistency * update ChangeLog * changes as per review * do not increment event count if address resolution fails * Apply suggestions from code review Co-authored-by: Rod Vagg <[email protected]> * address review --------- Co-authored-by: Rod Vagg <[email protected]>
- Loading branch information
1 parent
6994580
commit 4f63a08
Showing
9 changed files
with
307 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
6080604052348015600e575f80fd5b5061058b8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610034575f3560e01c806305734db71461003857806398e8da0014610054575b5f80fd5b610052600480360381019061004d91906102c0565b61005e565b005b61005c61013a565b005b8173ffffffffffffffffffffffffffffffffffffffff167fd76645dad5a7864a79954383dacf5c3f9cf3bf86d0a21241fcbae7b08cbbcb9660405160405180910390a2807f42d45d4e904b929a49443ad704c27633daae11d6ff7a0d0dedc9dbe70004d7d76040516100cf90610358565b60405180910390a27f5c362dbc3ba7b340d21482342acacf25f578611b2e5a4f136ff1a280ac0d9408828260405160200161010b9291906103db565b6040516020818303038152906040528051906020012060405161012e919061041e565b60405180910390a15050565b3373ffffffffffffffffffffffffffffffffffffffff167fb30247b59cead5e1c696f81be8486379fbc9d20feae266f6df16fcc2143ad355426040516101809190610446565b60405180910390a27f0c49df121e06fc3a0f60cfc2c9b92fce5c5232e223b63a51a780d4e8aae0132d6040516101b5906104a9565b60405180910390a17f38ee5a08acae32a0ccec0eef68b73ba44f4b09e2f3df37062af8e885a7fd23af602a6040516101ed9190610509565b60405180910390a17fd0916c673494f5a60c9f5d12c864ebec8398c930a7f2b57e0665c2feb63448846001604051610225919061053c565b60405180910390a1565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61025c82610233565b9050919050565b61026c81610252565b8114610276575f80fd5b50565b5f8135905061028781610263565b92915050565b5f819050919050565b61029f8161028d565b81146102a9575f80fd5b50565b5f813590506102ba81610296565b92915050565b5f80604083850312156102d6576102d561022f565b5b5f6102e385828601610279565b92505060206102f4858286016102ac565b9150509250929050565b5f82825260208201905092915050565b7f5468726565206576656e74732066756e6374696f6e2063616c6c6564000000005f82015250565b5f610342601c836102fe565b915061034d8261030e565b602082019050919050565b5f6020820190508181035f83015261036f81610336565b9050919050565b5f8160601b9050919050565b5f61038c82610376565b9050919050565b5f61039d82610382565b9050919050565b6103b56103b082610252565b610393565b82525050565b5f819050919050565b6103d56103d08261028d565b6103bb565b82525050565b5f6103e682856103a4565b6014820191506103f682846103c4565b6020820191508190509392505050565b5f819050919050565b61041881610406565b82525050565b5f6020820190506104315f83018461040f565b92915050565b6104408161028d565b82525050565b5f6020820190506104595f830184610437565b92915050565b7f466f7572206576656e74732066756e6374696f6e2063616c6c656400000000005f82015250565b5f610493601b836102fe565b915061049e8261045f565b602082019050919050565b5f6020820190508181035f8301526104c081610487565b9050919050565b5f819050919050565b5f819050919050565b5f6104f36104ee6104e9846104c7565b6104d0565b61028d565b9050919050565b610503816104d9565b82525050565b5f60208201905061051c5f8301846104fa565b92915050565b5f8115159050919050565b61053681610522565b82525050565b5f60208201905061054f5f83018461052d565b9291505056fea26469706673582212207d4001220d45b88d2efb387a0bb0c06f00739212df2c528db0db9850a48046c064736f6c63430008190033 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity >=0.8.17; | ||
|
||
contract MultipleEventEmitter { | ||
// Define events | ||
event Event1(address indexed sender, uint256 timestamp); | ||
event Event2(string message); | ||
event Event3(uint256 value); | ||
event Event4(bool flag); | ||
event Event5(address indexed recipient); | ||
event Event6(uint256 indexed id, string data); | ||
event Event7(bytes32 hash); | ||
|
||
// Function that emits four events | ||
function emitFourEvents() public { | ||
emit Event1(msg.sender, block.timestamp); | ||
emit Event2("Four events function called"); | ||
emit Event3(42); | ||
emit Event4(true); | ||
} | ||
|
||
// Function that emits three events | ||
function emitThreeEvents(address _recipient, uint256 _id) public { | ||
emit Event5(_recipient); | ||
emit Event6(_id, "Three events function called"); | ||
emit Event7(keccak256(abi.encodePacked(_recipient, _id))); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.