Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Commit

Permalink
Add devdoc comments to IAssetData
Browse files Browse the repository at this point in the history
  • Loading branch information
abandeali1 committed Aug 6, 2019
1 parent 2f91a12 commit f757a9d
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions contracts/asset-proxy/contracts/src/interfaces/IAssetData.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit f757a9d

Please sign in to comment.