ClockAuction.sol
在合约的构造器中涉及到的参数,其意义分别是:
- address _nftAddress: LAND合约地址
- address _RING: RING合约地址
- address _tokenVendor: ETH和RING相互转换的TokenVendor合约地址
- uint256 _cut: 交易手续费,即拍卖完成后不返还给卖家的部分。范围[0, 10000],对应着[0%, 100%]
- uint245 _waitingMinutes: 每次竞拍等待的最长时间,填入分钟数
使用LAND合约中的approveAndCall
方法,传入参数为:
_to
: 拍卖合约地址_tokenId
: 地块的tokenId_startingPriceInRING
: 起始价格(ring)_endingPriceInRING
: 终止价格(ring),其实价格比终止价格高_duration
: 拍卖持续时间,以秒为单位_seller
: 卖方(或者地块拥有者指定的地块拍卖的受益人)
使用clockAunction.sol
中cancelAuction
方法
注意:只允许此次拍卖的_seller
取消,如果_seller
不是该地块的拥有者的话,意味着地块拥有者也无法取消此次拍卖
使用clockAunction.sol
中getAuction
方法
使用clockAunction.sol
中getCurrentPriceInRING
方法
发送要竞拍某次拍卖使用的RING的数量,到clockAunction
合约中,使用RING.transfer(address(BidAuctionRING),ringAmount,bytes(tokenId))即可
注意:需要把tokenId转换成bytes格式
使用clockAunction.sol
中的bidWithETH
方法
使用clockAunction.sol
中的claimTokens
方法