go-ethereum/accounts/abi/bind/testdata/v2/events/contract.sol

37 lines
771 B
Solidity
Raw Normal View History

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;
contract C {
2024-11-27 08:17:13 -06:00
event basic1(
uint256 indexed id,
uint256 data
);
event basic2(
bool indexed flag,
uint256 data
);
2024-11-27 08:17:13 -06:00
// TODO: consider log test where data is hashed? maybe not necessary for v2 coverage
function EmitOne() public {
emit basic1(
uint256(1),
uint256(2));
}
// emit multiple events, different types
function EmitMulti() public {
emit basic1(
uint256(1),
uint256(2));
emit basic1(
uint256(3),
uint256(4));
emit basic2(
false,
uint256(1));
}
constructor() {
// do something with these
}
}