Skip to content

Commit f22d90e

Browse files
committed
fix(gateway): fix calldata size calculation for bridging cost
1 parent 81b688b commit f22d90e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

contracts/src/gateway/BaseForeignGateway.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ abstract contract BaseForeignGateway is IL1Bridge, IForeignGateway {
8585
// as that is a factor for the bridging cost.
8686
// Calldata size of relayCreateDispute:
8787
// relayCreateDispute methodId +
88-
// (createDispute methodId + uint256 _choices + bytes _extraData)
89-
// 4 + 4 + 32 + dynamic
90-
uint256 calldatasize = 40 + _extraData.length;
88+
// (createDispute methodId + bytes32 disputeHash + uint256 _choices + bytes _extraData)
89+
// 4 + 4 + 32 + 32 + dynamic
90+
uint256 calldatasize = 82 + _extraData.length;
9191

9292
uint256 bridgeCost = this.getSubmissionPrice(calldatasize);
9393
return bridgeCost + internalArbitrationCost;

0 commit comments

Comments
 (0)