Skip to content

Commit afe7f9f

Browse files
committed
fix: add comment on not being able to revert
1 parent 842445d commit afe7f9f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

contracts/l2/discovery/L2GNS.sol

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ contract L2GNS is GNS, L2GNSV1Storage, IL2GNS {
136136
uint256 roundingError;
137137
uint256 tokens = transferData.tokens;
138138
{
139+
// This can't revert because the bridge ensures that _tokensIn is > 0,
140+
// and the minimum curation in L2 is 1 wei GRT
139141
uint256 tokensAfter = curation.tokensToSignalToTokensNoTax(
140142
_subgraphDeploymentID,
141143
tokens
@@ -317,6 +319,8 @@ contract L2GNS is GNS, L2GNSV1Storage, IL2GNS {
317319
IL2Curation curation = IL2Curation(address(curation()));
318320
uint256 roundingError;
319321
if (transferData.l2Done && !subgraphData.disabled) {
322+
// This can't revert because the bridge ensures that _tokensIn is > 0,
323+
// and the minimum curation in L2 is 1 wei GRT
320324
uint256 tokensAfter = curation.tokensToSignalToTokensNoTax(
321325
subgraphData.subgraphDeploymentID,
322326
_tokensIn

0 commit comments

Comments
 (0)