Skip to content

Commit

Permalink
(hub): remove event FlowEdgeEffected and simplify StreamCompleted eve…
Browse files Browse the repository at this point in the history
…nt; again for compile size
  • Loading branch information
benjaminbollen committed Aug 7, 2024
1 parent b6bb758 commit e75a290
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions src/hub/Hub.sol
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,8 @@ contract Hub is Circles, TypeDefinitions, IHubErrors {

event Stopped(address indexed avatar);

event FlowEdgeEffected(uint16 flowEdgeId, uint16 streamSinkId);
event StreamCompleted(
address indexed operator,
address indexed from,
address indexed to,
uint256[] ids,
uint256[] amounts,
uint16 streamSinkId
address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] amounts
);

// Modifiers
Expand Down Expand Up @@ -840,10 +834,6 @@ contract Hub is Circles, TypeDefinitions, IHubErrors {
);
}

// emit the flow edge's index and the associated stream sink id
// so that terminal flow edges can be matched with streams
emit FlowEdgeEffected(index / 3, _flow[i].streamSinkId);

index = index + 3;
}

Expand Down Expand Up @@ -898,7 +888,7 @@ contract Hub is Circles, TypeDefinitions, IHubErrors {

// emit the stream completed event which expresses the effective "ERC1155:BatchTransfer" event
// for the stream as part of a batch of path transfers.
emit StreamCompleted(msg.sender, _flowVertices[_streams[i].sourceCoordinate], receiver, ids, amounts, i + 1);
emit StreamCompleted(msg.sender, _flowVertices[_streams[i].sourceCoordinate], receiver, ids, amounts);
}

return nettedFlow;
Expand Down

0 comments on commit e75a290

Please sign in to comment.