From f757a9de52c4f97558fc602970d3dea957e28fda Mon Sep 17 00:00:00 2001 From: Amir Bandeali Date: Tue, 6 Aug 2019 15:51:59 -0700 Subject: [PATCH] Add devdoc comments to IAssetData --- .../contracts/src/interfaces/IAssetData.sol | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/contracts/asset-proxy/contracts/src/interfaces/IAssetData.sol b/contracts/asset-proxy/contracts/src/interfaces/IAssetData.sol index 6611ef7147..cdce7ab1fb 100644 --- a/contracts/asset-proxy/contracts/src/interfaces/IAssetData.sol +++ b/contracts/asset-proxy/contracts/src/interfaces/IAssetData.sol @@ -26,15 +26,26 @@ pragma experimental ABIEncoderV2; // This argument is ABI encoded as one of the methods of this interface. interface IAssetData { + /// @dev Function signature for encoding ERC20 assetData. + /// @param tokenAddress Address of ERC20Token contract. function ERC20Token(address tokenAddress) external; + /// @dev Function signature for encoding ERC721 assetData. + /// @param tokenAddress Address of ERC721 token contract. + /// @param tokenId Id of ERC721 token to be transferred. function ERC721Token( address tokenAddress, uint256 tokenId ) external; + /// @dev Function signature for encoding ERC1155 assetData. + /// @param tokenAddress Address of ERC1155 token contract. + /// @param tokenIds Array of ids of tokens to be transferred. + /// @param tokenValues Array of values that correspond to each token id to be transferred. + /// Note that each value will be multiplied by the amount being filled in the order before transferring. + /// @param callbackData Extra data to be passed to receiver's `onERC1155Received` callback function. function ERC1155Assets( address tokenAddress, uint256[] calldata tokenIds, @@ -43,12 +54,20 @@ interface IAssetData { ) external; + /// @dev Function signature for encoding MultiAsset assetData. + /// @param amounts Array of amounts that correspond to each asset to be transferred. + /// Note that each value will be multiplied by the amount being filled in the order before transferring. + /// @param nestedAssetData Array of assetData fields that will be be dispatched to their correspnding AssetProxy contract. function MultiAsset( uint256[] calldata amounts, bytes[] calldata nestedAssetData ) external; + /// @dev Function signature for encoding StaticCall assetData. + /// @param callTarget Contract that will execute the staticcall. + /// @param staticCallData Data that will be executed via staticcall on the callTarget contract. + /// @param callResultHash Keccak256 hash of the expected staticcall return data. function StaticCall( address callTarget, bytes calldata staticCallData,