Add devdoc comments to IAssetData

This commit is contained in:
Amir Bandeali 2019-08-06 15:51:59 -07:00
parent 2f91a12f19
commit f757a9de52

View File

@ -26,15 +26,26 @@ pragma experimental ABIEncoderV2;
// This argument is ABI encoded as one of the methods of this interface. // This argument is ABI encoded as one of the methods of this interface.
interface IAssetData { interface IAssetData {
/// @dev Function signature for encoding ERC20 assetData.
/// @param tokenAddress Address of ERC20Token contract.
function ERC20Token(address tokenAddress) function ERC20Token(address tokenAddress)
external; 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( function ERC721Token(
address tokenAddress, address tokenAddress,
uint256 tokenId uint256 tokenId
) )
external; 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( function ERC1155Assets(
address tokenAddress, address tokenAddress,
uint256[] calldata tokenIds, uint256[] calldata tokenIds,
@ -43,12 +54,20 @@ interface IAssetData {
) )
external; 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( function MultiAsset(
uint256[] calldata amounts, uint256[] calldata amounts,
bytes[] calldata nestedAssetData bytes[] calldata nestedAssetData
) )
external; 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( function StaticCall(
address callTarget, address callTarget,
bytes calldata staticCallData, bytes calldata staticCallData,