From bf411b776dd7bb19a808e242a5d92bc38ea50635 Mon Sep 17 00:00:00 2001 From: Artem Payvin Date: Fri, 30 Sep 2022 13:38:46 +0100 Subject: [PATCH 1/2] Add interfaces --- .../mainnet/DepositBoxes/IDepositBoxERC1155.sol | 14 ++++++++++++++ .../mainnet/DepositBoxes/IDepositBoxERC20.sol | 6 ++++++ .../mainnet/DepositBoxes/IDepositBoxERC721.sol | 6 ++++++ 3 files changed, 26 insertions(+) diff --git a/contracts/mainnet/DepositBoxes/IDepositBoxERC1155.sol b/contracts/mainnet/DepositBoxes/IDepositBoxERC1155.sol index a43b4b8..866f3cc 100644 --- a/contracts/mainnet/DepositBoxes/IDepositBoxERC1155.sol +++ b/contracts/mainnet/DepositBoxes/IDepositBoxERC1155.sol @@ -26,12 +26,26 @@ import "../IDepositBox.sol"; interface IDepositBoxERC1155 is IDepositBox { function depositERC1155(string calldata schainName, address erc1155OnMainnet, uint256 id, uint256 amount) external; + function depositERC1155Direct( + string calldata schainName, + address erc1155OnMainnet, + uint256 id, + uint256 amount, + address receiver + ) external; function depositERC1155Batch( string calldata schainName, address erc1155OnMainnet, uint256[] calldata ids, uint256[] calldata amounts ) external; + function depositERC1155BatchDirect( + string calldata schainName, + address erc1155OnMainnet, + uint256[] calldata ids, + uint256[] calldata amounts, + address receiver + ) external; function addERC1155TokenByOwner(string calldata schainName, address erc1155OnMainnet) external; function getFunds( string calldata schainName, diff --git a/contracts/mainnet/DepositBoxes/IDepositBoxERC20.sol b/contracts/mainnet/DepositBoxes/IDepositBoxERC20.sol index 5386f2b..c26eee0 100644 --- a/contracts/mainnet/DepositBoxes/IDepositBoxERC20.sol +++ b/contracts/mainnet/DepositBoxes/IDepositBoxERC20.sol @@ -29,6 +29,12 @@ interface IDepositBoxERC20 is IDepositBox { function depositERC20(string calldata schainName, address erc20OnMainnet, uint256 amount) external; function doTransfer(address token, address receiver, uint256 amount) external; function escalate(uint256 transferId) external; + function depositERC20Direct( + string calldata schainName, + address erc20OnMainnet, + uint256 amount, + address receiver + ) external; function getFunds(string calldata schainName, address erc20OnMainnet, address receiver, uint amount) external; function rejectTransfer(uint transferId) external; function retrieve() external; diff --git a/contracts/mainnet/DepositBoxes/IDepositBoxERC721.sol b/contracts/mainnet/DepositBoxes/IDepositBoxERC721.sol index 8ddd363..8fb7386 100644 --- a/contracts/mainnet/DepositBoxes/IDepositBoxERC721.sol +++ b/contracts/mainnet/DepositBoxes/IDepositBoxERC721.sol @@ -26,6 +26,12 @@ import "../IDepositBox.sol"; interface IDepositBoxERC721 is IDepositBox { function depositERC721(string calldata schainName, address erc721OnMainnet, uint256 tokenId) external; + function depositERC721Direct( + string calldata schainName, + address erc721OnMainnet, + uint256 tokenId, + address receiver + ) external; function addERC721TokenByOwner(string calldata schainName, address erc721OnMainnet) external; function getFunds(string calldata schainName, address erc721OnMainnet, address receiver, uint tokenId) external; function getSchainToERC721(string calldata schainName, address erc721OnMainnet) external view returns (bool); From f6f89e63e799f9d02fe449630316811a26d8fff4 Mon Sep 17 00:00:00 2001 From: Artem Payvin Date: Fri, 30 Sep 2022 13:49:57 +0100 Subject: [PATCH 2/2] Add function to DepositBoxEth --- contracts/mainnet/DepositBoxes/IDepositBoxEth.sol | 1 + 1 file changed, 1 insertion(+) diff --git a/contracts/mainnet/DepositBoxes/IDepositBoxEth.sol b/contracts/mainnet/DepositBoxes/IDepositBoxEth.sol index 866444d..28bda7f 100644 --- a/contracts/mainnet/DepositBoxes/IDepositBoxEth.sol +++ b/contracts/mainnet/DepositBoxes/IDepositBoxEth.sol @@ -27,6 +27,7 @@ import "../IDepositBox.sol"; interface IDepositBoxEth is IDepositBox { receive() external payable; function deposit(string memory schainName) external payable; + function depositDirect(string memory schainName, address receiver) external payable; function getMyEth() external; function getFunds(string calldata schainName, address payable receiver, uint amount) external; function enableActiveEthTransfers(string calldata schainName) external;