Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(its): remove unnecessary use of payable in functions #298

Merged
merged 11 commits into from
Nov 11, 2024
2 changes: 1 addition & 1 deletion contracts/InterchainTokenService.sol
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ contract InterchainTokenService is
uint256 amount,
bytes memory data,
uint256 gasValue
) external payable whenNotPaused {
) external whenNotPaused {
ahramy marked this conversation as resolved.
Show resolved Hide resolved
if (data.length == 0) revert EmptyData();
amount = _takeToken(tokenId, msg.sender, amount, false);

Expand Down
4 changes: 2 additions & 2 deletions contracts/TokenHandler.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ contract TokenHandler is ITokenHandler, ITokenManagerType, ReentrancyGuard, Crea
* @return address the address of the token.
*/
// slither-disable-next-line locked-ether
ahramy marked this conversation as resolved.
Show resolved Hide resolved
function giveToken(bytes32 tokenId, address to, uint256 amount) external payable returns (uint256, address) {
function giveToken(bytes32 tokenId, address to, uint256 amount) external returns (uint256, address) {
ahramy marked this conversation as resolved.
Show resolved Hide resolved
address tokenManager = _create3Address(tokenId);

(uint256 tokenManagerType, address tokenAddress) = ITokenManagerProxy(tokenManager).getImplementationTypeAndTokenAddress();
Expand Down Expand Up @@ -108,7 +108,7 @@ contract TokenHandler is ITokenHandler, ITokenManagerType, ReentrancyGuard, Crea
* @return address The address of the token corresponding to the input tokenId.
*/
// slither-disable-next-line locked-ether
function transferTokenFrom(bytes32 tokenId, address from, address to, uint256 amount) external payable returns (uint256, address) {
function transferTokenFrom(bytes32 tokenId, address from, address to, uint256 amount) external returns (uint256, address) {
address tokenManager = _create3Address(tokenId);
(uint256 tokenManagerType, address tokenAddress) = ITokenManagerProxy(tokenManager).getImplementationTypeAndTokenAddress();

Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IInterchainTokenService.sol
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ interface IInterchainTokenService is
uint256 amount,
bytes calldata data,
uint256 gasValue
) external payable;
) external;

/**
* @notice Sets the flow limits for multiple tokens.
Expand Down
4 changes: 2 additions & 2 deletions contracts/interfaces/ITokenHandler.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ interface ITokenHandler {
* @return uint256 The amount of token actually given, which could be different for certain token type.
* @return address the address of the token.
*/
function giveToken(bytes32 tokenId, address to, uint256 amount) external payable returns (uint256, address);
function giveToken(bytes32 tokenId, address to, uint256 amount) external returns (uint256, address);

/**
* @notice This function takes token from a specified address to the token manager.
Expand All @@ -41,7 +41,7 @@ interface ITokenHandler {
* @return address The address of the token corresponding to the input tokenId.
*/
// slither-disable-next-line locked-ether
function transferTokenFrom(bytes32 tokenId, address from, address to, uint256 amount) external payable returns (uint256, address);
function transferTokenFrom(bytes32 tokenId, address from, address to, uint256 amount) external returns (uint256, address);

/**
* @notice This function prepares a token manager after it is deployed
Expand Down
Loading