Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
8 changes: 4 additions & 4 deletions contracts/SpokePool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ abstract contract SpokePool is SpokePoolInterface, Testable, Lockable, MultiCall
bytes depositorSignature
);
event FilledRelay(
bytes32 indexed relayHash,
uint256 amount,
uint256 totalFilledAmount,
uint256 fillAmount,
uint256 repaymentChainId,
uint256 originChainId,
uint256 destinationChainId,
uint64 relayerFeePct,
uint64 appliedRelayerFeePct,
uint64 realizedLpFeePct,
uint32 depositId,
address destinationToken,
Expand Down Expand Up @@ -795,19 +795,19 @@ abstract contract SpokePool is SpokePoolInterface, Testable, Lockable, MultiCall
bytes32 relayHash,
uint256 fillAmount,
uint256 repaymentChainId,
uint64 relayerFeePct,
uint64 appliedRelayerFeePct,
RelayData memory relayData,
bool isSlowRelay
) internal {
emit FilledRelay(
relayHash,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed this to get around a stack too deep error but also realized we don't use relayHash in the current client code so its a reasonable delete

relayData.amount,
relayFills[relayHash],
fillAmount,
repaymentChainId,
relayData.originChainId,
relayData.destinationChainId,
relayerFeePct,
relayData.relayerFeePct,
appliedRelayerFeePct,
relayData.realizedLpFeePct,
relayData.depositId,
relayData.destinationToken,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@across-protocol/contracts-v2",
"version": "0.0.41",
"version": "0.0.42",
"author": "UMA Team",
"license": "AGPL-3.0",
"repository": {
Expand Down
30 changes: 25 additions & 5 deletions test/SpokePool.Relay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ describe("SpokePool Relayer Logic", async function () {
await expect(spokePool.connect(relayer).fillRelay(...getFillRelayParams(relayData, consts.amountToRelay)))
.to.emit(spokePool, "FilledRelay")
.withArgs(
relayHash,
relayData.amount,
consts.amountToRelayPreFees,
consts.amountToRelayPreFees,
consts.repaymentChainId,
toBN(relayData.originChainId),
toBN(relayData.destinationChainId),
relayData.relayerFeePct,
relayData.relayerFeePct,
relayData.realizedLpFeePct,
toBN(relayData.depositId),
relayData.destinationToken,
Expand Down Expand Up @@ -243,10 +243,30 @@ describe("SpokePool Relayer Logic", async function () {
relayData.originChainId,
depositor
);
await spokePool
.connect(relayer)
.fillRelayWithUpdatedFee(
...getFillRelayUpdatedFeeParams(relayData, consts.amountToRelay, consts.modifiedRelayerFeePct, signature)
await expect(
spokePool
.connect(relayer)
.fillRelayWithUpdatedFee(
...getFillRelayUpdatedFeeParams(relayData, consts.amountToRelay, consts.modifiedRelayerFeePct, signature)
)
)
.to.emit(spokePool, "FilledRelay")
.withArgs(
relayData.amount,
consts.amountToRelayPreModifiedFees,
consts.amountToRelayPreModifiedFees,
consts.repaymentChainId,
toBN(relayData.originChainId),
toBN(relayData.destinationChainId),
relayData.relayerFeePct,
consts.modifiedRelayerFeePct, // Applied relayer fee % should be diff from original fee %.
relayData.realizedLpFeePct,
toBN(relayData.depositId),
relayData.destinationToken,
relayer.address,
relayData.depositor,
relayData.recipient,
false
);

// The collateral should have transferred from relayer to recipient.
Expand Down