-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix ICE when emitting event from another contract
- Loading branch information
1 parent
f466e1e
commit 1286081
Showing
11 changed files
with
841 additions
and
17 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
112 changes: 112 additions & 0 deletions
112
test/libsolidity/ABIJson/event_emitted_from_foreign_contract.sol
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,112 @@ | ||
interface I { | ||
event Event(uint256 value); | ||
} | ||
contract C { | ||
event Event(address indexed sender); | ||
} | ||
contract D { | ||
event Event(address indexed sender); | ||
function test(address sender) public { | ||
emit I.Event(1); | ||
emit C.Event(msg.sender); | ||
emit Event(msg.sender); | ||
} | ||
} | ||
// ---- | ||
// :C | ||
// [ | ||
// { | ||
// "anonymous": false, | ||
// "inputs": | ||
// [ | ||
// { | ||
// "indexed": true, | ||
// "internalType": "address", | ||
// "name": "sender", | ||
// "type": "address" | ||
// } | ||
// ], | ||
// "name": "Event", | ||
// "type": "event" | ||
// } | ||
// ] | ||
// | ||
// | ||
// :D | ||
// [ | ||
// { | ||
// "anonymous": false, | ||
// "inputs": | ||
// [ | ||
// { | ||
// "indexed": false, | ||
// "internalType": "uint256", | ||
// "name": "value", | ||
// "type": "uint256" | ||
// } | ||
// ], | ||
// "name": "Event", | ||
// "type": "event" | ||
// }, | ||
// { | ||
// "anonymous": false, | ||
// "inputs": | ||
// [ | ||
// { | ||
// "indexed": true, | ||
// "internalType": "address", | ||
// "name": "sender", | ||
// "type": "address" | ||
// } | ||
// ], | ||
// "name": "Event", | ||
// "type": "event" | ||
// }, | ||
// { | ||
// "anonymous": false, | ||
// "inputs": | ||
// [ | ||
// { | ||
// "indexed": true, | ||
// "internalType": "address", | ||
// "name": "sender", | ||
// "type": "address" | ||
// } | ||
// ], | ||
// "name": "Event", | ||
// "type": "event" | ||
// }, | ||
// { | ||
// "inputs": | ||
// [ | ||
// { | ||
// "internalType": "address", | ||
// "name": "sender", | ||
// "type": "address" | ||
// } | ||
// ], | ||
// "name": "test", | ||
// "outputs": [], | ||
// "stateMutability": "nonpayable", | ||
// "type": "function" | ||
// } | ||
// ] | ||
// | ||
// | ||
// :I | ||
// [ | ||
// { | ||
// "anonymous": false, | ||
// "inputs": | ||
// [ | ||
// { | ||
// "indexed": false, | ||
// "internalType": "uint256", | ||
// "name": "value", | ||
// "type": "uint256" | ||
// } | ||
// ], | ||
// "name": "Event", | ||
// "type": "event" | ||
// } | ||
// ] |
Oops, something went wrong.