2021-11-01 15:17:42 +00:00
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
pragma solidity ^0.8.0;
|
|
|
|
|
|
|
|
import "./Contracts.sol";
|
|
|
|
|
2021-11-02 08:46:15 +00:00
|
|
|
// exposes internal functions of Contracts for testing
|
2021-11-01 15:17:42 +00:00
|
|
|
contract TestContracts is Contracts {
|
|
|
|
|
|
|
|
function newContract(
|
|
|
|
uint _duration,
|
|
|
|
uint _size,
|
|
|
|
bytes32 _contentHash,
|
|
|
|
uint _proofPeriod,
|
|
|
|
uint _proofTimeout,
|
|
|
|
bytes32 _nonce,
|
2021-11-01 15:23:37 +00:00
|
|
|
uint _price,
|
2021-11-01 15:17:42 +00:00
|
|
|
address _host,
|
2021-11-01 15:23:37 +00:00
|
|
|
uint _bidExpiry,
|
2021-11-01 15:17:42 +00:00
|
|
|
bytes memory requestSignature,
|
|
|
|
bytes memory bidSignature
|
|
|
|
)
|
|
|
|
public
|
|
|
|
{
|
|
|
|
_newContract(
|
|
|
|
_duration,
|
|
|
|
_size,
|
|
|
|
_contentHash,
|
|
|
|
_proofPeriod,
|
|
|
|
_proofTimeout,
|
|
|
|
_nonce,
|
2021-11-01 15:23:37 +00:00
|
|
|
_price,
|
2021-11-01 15:17:42 +00:00
|
|
|
_host,
|
2021-11-01 15:23:37 +00:00
|
|
|
_bidExpiry,
|
2021-11-01 15:17:42 +00:00
|
|
|
requestSignature,
|
|
|
|
bidSignature);
|
|
|
|
}
|
|
|
|
|
|
|
|
function duration(bytes32 id) public view returns (uint) {
|
|
|
|
return _duration(id);
|
|
|
|
}
|
|
|
|
|
|
|
|
function size(bytes32 id) public view returns (uint) {
|
|
|
|
return _size(id);
|
|
|
|
}
|
|
|
|
|
|
|
|
function contentHash(bytes32 id) public view returns (bytes32) {
|
|
|
|
return _contentHash(id);
|
|
|
|
}
|
|
|
|
|
|
|
|
function price(bytes32 id) public view returns (uint) {
|
|
|
|
return _price(id);
|
|
|
|
}
|
|
|
|
|
|
|
|
function host(bytes32 id) public view returns (address) {
|
|
|
|
return _host(id);
|
|
|
|
}
|
|
|
|
}
|