Skip to content

Commit

Permalink
erc1155 amount check; solc upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
dmosites committed Jan 5, 2024
1 parent 05d3b4b commit 53546fb
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion source/swap/contracts/Swap.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.23;

import "@openzeppelin/contracts/access/Ownable2Step.sol";
import "@openzeppelin/contracts/utils/cryptography/EIP712.sol";
Expand Down
3 changes: 2 additions & 1 deletion source/swap/contracts/adapters/ERC1155Adapter.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.17;
pragma solidity 0.8.23;

import "../interfaces/IAdapter.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
Expand Down Expand Up @@ -46,6 +46,7 @@ contract ERC1155Adapter is IAdapter {
uint256 id,
address token
) external {
if (amount == 0) revert InvalidArgument("amount");
IERC1155(token).safeTransferFrom(from, to, id, amount, "0x00");
}
}
2 changes: 1 addition & 1 deletion source/swap/contracts/adapters/ERC20Adapter.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.17;
pragma solidity 0.8.23;

import "../interfaces/IAdapter.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
Expand Down
2 changes: 1 addition & 1 deletion source/swap/contracts/adapters/ERC721Adapter.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.17;
pragma solidity 0.8.23;

import "../interfaces/IAdapter.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
Expand Down
2 changes: 1 addition & 1 deletion source/swap/contracts/interfaces/IAdapter.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.17;
pragma solidity 0.8.23;

struct Party {
address wallet; // Wallet address of the party
Expand Down
2 changes: 1 addition & 1 deletion source/swap/contracts/interfaces/ISwap.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.23;

import "./IAdapter.sol";

Expand Down

0 comments on commit 53546fb

Please sign in to comment.