-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c1ad3c9
commit de10baf
Showing
11 changed files
with
237 additions
and
517 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ library BoltzValidator { | |
function validate( | ||
EnvelopingTypes.DeployRequest calldata relayRequest, | ||
address contractAddr | ||
) internal { | ||
) internal returns (NativeSwap.PublicClaimInfo memory) { | ||
bytes4 method = bytes4(keccak256(bytes(relayRequest.request.data[:4]))); | ||
NativeSwap.PublicClaimInfo memory claim; | ||
Check warning Code scanning / Slither Uninitialized local variables Medium
BoltzValidator.validate(EnvelopingTypes.DeployRequest,address).claim is a local variable never initialized
|
||
|
||
|
@@ -40,11 +40,6 @@ library BoltzValidator { | |
revert("Method not allowed"); | ||
} | ||
|
||
require( | ||
relayRequest.request.tokenAmount <= claim.amount, | ||
"Claiming value lower than fees" | ||
); | ||
|
||
NativeSwap swap = NativeSwap(relayRequest.request.to); | ||
|
||
bytes32 preimageHash = sha256(abi.encodePacked(claim.preimage)); | ||
|
@@ -58,5 +53,7 @@ library BoltzValidator { | |
); | ||
|
||
require(swap.swaps(hashValue), "Verifier: swap has no RBTC"); | ||
|
||
return claim; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.