forked from mouseless0x/foundry
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(fmt): emit stmt grouping (foundry-rs#4430)
- Loading branch information
Showing
3 changed files
with
59 additions
and
6 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,31 @@ | ||
// config: line_length = 80 | ||
event NewEvent( | ||
address beneficiary, uint256 index, uint64 timestamp, uint64 endTimestamp | ||
); | ||
|
||
function emitEvent() { | ||
emit NewEvent( | ||
beneficiary, | ||
_vestingBeneficiaries.length - 1, | ||
uint64(block.timestamp), | ||
endTimestamp | ||
); | ||
|
||
emit NewEvent( | ||
/* beneficiary */ | ||
beneficiary, | ||
/* index */ | ||
_vestingBeneficiaries.length - 1, | ||
/* timestamp */ | ||
uint64(block.timestamp), | ||
/* end timestamp */ | ||
endTimestamp | ||
); | ||
|
||
emit NewEvent( | ||
beneficiary, // beneficiary | ||
_vestingBeneficiaries.length - 1, // index | ||
uint64(block.timestamp), // timestamp | ||
endTimestamp // end timestamp | ||
); | ||
} |
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,24 @@ | ||
event NewEvent(address beneficiary, uint256 index, uint64 timestamp, uint64 endTimestamp); | ||
|
||
function emitEvent() { | ||
emit NewEvent( | ||
beneficiary, | ||
_vestingBeneficiaries.length - 1, | ||
uint64(block.timestamp), | ||
endTimestamp | ||
); | ||
|
||
emit | ||
NewEvent( | ||
/* beneficiary */ beneficiary, | ||
/* index */ _vestingBeneficiaries.length - 1, | ||
/* timestamp */ uint64(block.timestamp), | ||
/* end timestamp */ endTimestamp); | ||
|
||
emit NewEvent( | ||
beneficiary, // beneficiary | ||
_vestingBeneficiaries.length - 1, // index | ||
uint64(block.timestamp), // timestamp | ||
endTimestamp // end timestamp | ||
); | ||
} |