Skip to content

Commit

Permalink
try to fix slither
Browse files Browse the repository at this point in the history
  • Loading branch information
Foivos committed Apr 15, 2024
1 parent d129e58 commit db280ee
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion contracts/TokenHandler.sol
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ contract TokenHandler is ITokenHandler, ITokenManagerType, ReentrancyGuard, Crea
* @param metadataVersion The metadata version is used to determine how to pay for gas.
* @param gasValue how much gas to pay.
*/
// slither-disable-next-line locked-ether arbitrary-send-eth
// slither-disable-next-line locked-ether
function callContract(
string calldata destinationChain,
string calldata destinationAddress,
Expand All @@ -195,6 +195,7 @@ contract TokenHandler is ITokenHandler, ITokenManagerType, ReentrancyGuard, Crea
) external payable {
if (gasValue > 0) {
if (metadataVersion == MetadataVersion.CONTRACT_CALL) {
// slither-disable-next-line arbitrary-send-eth
IAxelarGasService(gasService).payNativeGasForContractCall{ value: gasValue }(
address(this),
destinationChain,
Expand All @@ -203,6 +204,7 @@ contract TokenHandler is ITokenHandler, ITokenManagerType, ReentrancyGuard, Crea
tx.origin
);
} else if (metadataVersion == MetadataVersion.EXPRESS_CALL) {
// slither-disable-next-line arbitrary-send-eth
IAxelarGasService(gasService).payNativeGasForExpressCall{ value: gasValue }(
address(this),
destinationChain,
Expand Down Expand Up @@ -240,6 +242,7 @@ contract TokenHandler is ITokenHandler, ITokenManagerType, ReentrancyGuard, Crea
) external payable {
if (gasValue > 0) {
if (metadataVersion == MetadataVersion.CONTRACT_CALL) {
// slither-disable-next-line arbitrary-send-eth
IAxelarGasService(gasService).payNativeGasForContractCallWithToken{ value: gasValue }(
address(this),
destinationChain,
Expand All @@ -250,6 +253,7 @@ contract TokenHandler is ITokenHandler, ITokenManagerType, ReentrancyGuard, Crea
tx.origin
);
} else if (metadataVersion == MetadataVersion.EXPRESS_CALL) {
// slither-disable-next-line arbitrary-send-eth
IAxelarGasService(gasService).payNativeGasForExpressCallWithToken{ value: gasValue }(
address(this),
destinationChain,
Expand Down

0 comments on commit db280ee

Please sign in to comment.