Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(protocol): also add rewardPerGas into BlockProposedEvent #14124

Merged
merged 8 commits into from
Jul 8, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/protocol/contracts/L1/TaikoEvents.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ abstract contract TaikoEvents {
uint256 indexed id,
address indexed assignedProver,
uint64 blockFee,
uint32 rewardPerGas,
TaikoData.BlockMetadata meta
);

Expand Down
9 changes: 8 additions & 1 deletion packages/protocol/contracts/L1/libs/LibProposing.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ library LibProposing {
uint256 indexed id,
address indexed assignedProver,
uint64 blockFee,
uint32 rewardPerGas,
TaikoData.BlockMetadata meta
);

Expand Down Expand Up @@ -139,7 +140,13 @@ library LibProposing {
revert L1_INSUFFICIENT_TOKEN();
}

emit BlockProposed(state.numBlocks, blk.assignedProver, blockFee, meta);
emit BlockProposed(
state.numBlocks,
blk.assignedProver,
blockFee,
blk.rewardPerGas,
meta
);

unchecked {
++state.numBlocks;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ title: TaikoEvents
### BlockProposed

```solidity
event BlockProposed(uint256 id, address assignedProver, uint64 blockFee, struct TaikoData.BlockMetadata meta)
event BlockProposed(uint256 id, address assignedProver, uint64 blockFee, uint32 rewardPerGas, struct TaikoData.BlockMetadata meta)
```

### BlockProven
Expand Down