token-gallery-contracts/contracts/ISellable.sol

46 lines
1.8 KiB
Solidity

// SPDX-License-Identifier: Proprietary
pragma solidity ^0.7.2;
interface ISellable {
event BuySingleNft(address indexed from, address indexed to, uint256 id, uint256 price);
event TokenBuySingleNft(address indexed from, address indexed to, uint256 id, uint256 price);
event FeeChanged(uint8 oldFee, uint8 newFee);
event RoyaltyChanged(uint8 oldRoyalty, uint8 newRoyalty);
event PayoutMethodChanged(bool oldPayout, bool newPayout);
event Payout(address indexed to, uint256 amount);
event TokenPayout(address indexed to, uint256 amount);
function setRoyalty(uint8 _royalty) external;
function getRoyalty() external view returns(uint8);
function paymentTokenAddress() external view returns(address);
function ownerEthBalances(address _owner) external view returns(uint256);
function ownerTokenBalances(address _owner) external view returns(uint256);
function withdraw() external;
function setNftPrice(uint256 id, uint256 price, bool forSale, uint256 tokenPrice, bool tokenForSale) external;
function setNftPriceBatch(uint256[] calldata ids, uint256[] calldata prices, bool[] calldata forSales, uint256[] calldata tokenPrices, bool[] calldata tokenForSales) external;
/**
Buy NFT with Eth/Ubiq
*/
function buyNft(uint256 _id) external payable;
/**
Buy NFT with token
*/
function buyNftWithToken(uint256 nft_id) external;
/**
approveAndCall for 10grans specifically, because it was made before standard finalized.
*/
function receiveApproval(address caller, uint256 value, address token, bytes calldata data) external;
/**
approveAndCall thru ERC-1363 implementing token, to buy NFT with token amount.
*/
function onApprovalReceived(address caller, uint256 value, bytes calldata data) external;
}