|
|
@@ -7,7 +7,8 @@ import "./EntropyStructsV2.sol";
|
|
|
|
|
|
interface IEntropyV2 is EntropyEventsV2 {
|
|
|
/// @notice Request a random number using the default provider with default gas limit
|
|
|
- /// @return assignedSequenceNumber A unique identifier for this request
|
|
|
+ /// @return sequenceNumber A unique identifier for this request
|
|
|
+ /// @return providerAddress The address of the provider that handled the request
|
|
|
/// @dev The address calling this function should be a contract that inherits from the IEntropyConsumer interface.
|
|
|
/// The `entropyCallback` method on that interface will receive a callback with the returned sequence number and
|
|
|
/// the generated random number.
|
|
|
@@ -28,11 +29,12 @@ interface IEntropyV2 is EntropyEventsV2 {
|
|
|
function requestV2()
|
|
|
external
|
|
|
payable
|
|
|
- returns (uint64 assignedSequenceNumber);
|
|
|
+ returns (uint64 sequenceNumber, address providerAddress);
|
|
|
|
|
|
/// @notice Request a random number using the default provider with specified gas limit
|
|
|
/// @param gasLimit The gas limit for the callback function.
|
|
|
- /// @return assignedSequenceNumber A unique identifier for this request
|
|
|
+ /// @return sequenceNumber A unique identifier for this request
|
|
|
+ /// @return providerAddress The address of the provider that handled the request
|
|
|
/// @dev The address calling this function should be a contract that inherits from the IEntropyConsumer interface.
|
|
|
/// The `entropyCallback` method on that interface will receive a callback with the returned sequence number and
|
|
|
/// the generated random number.
|
|
|
@@ -52,12 +54,13 @@ interface IEntropyV2 is EntropyEventsV2 {
|
|
|
/// call a variant of `requestV2` that accepts a `userRandomNumber` parameter.
|
|
|
function requestV2(
|
|
|
uint32 gasLimit
|
|
|
- ) external payable returns (uint64 assignedSequenceNumber);
|
|
|
+ ) external payable returns (uint64 sequenceNumber, address providerAddress);
|
|
|
|
|
|
/// @notice Request a random number from a specific provider with specified gas limit
|
|
|
/// @param provider The address of the provider to request from
|
|
|
/// @param gasLimit The gas limit for the callback function
|
|
|
- /// @return assignedSequenceNumber A unique identifier for this request
|
|
|
+ /// @return sequenceNumber A unique identifier for this request
|
|
|
+ /// @return providerAddress The address of the provider that handled the request
|
|
|
/// @dev The address calling this function should be a contract that inherits from the IEntropyConsumer interface.
|
|
|
/// The `entropyCallback` method on that interface will receive a callback with the returned sequence number and
|
|
|
/// the generated random number.
|
|
|
@@ -78,13 +81,14 @@ interface IEntropyV2 is EntropyEventsV2 {
|
|
|
function requestV2(
|
|
|
address provider,
|
|
|
uint32 gasLimit
|
|
|
- ) external payable returns (uint64 assignedSequenceNumber);
|
|
|
+ ) external payable returns (uint64 sequenceNumber, address providerAddress);
|
|
|
|
|
|
/// @notice Request a random number from a specific provider with a user-provided random number and gas limit
|
|
|
/// @param provider The address of the provider to request from
|
|
|
/// @param userRandomNumber A random number provided by the user for additional entropy
|
|
|
/// @param gasLimit The gas limit for the callback function. Pass 0 to get a sane default value -- see note below.
|
|
|
- /// @return assignedSequenceNumber A unique identifier for this request
|
|
|
+ /// @return sequenceNumber A unique identifier for this request
|
|
|
+ /// @return providerAddress The address of the provider that handled the request
|
|
|
/// @dev The address calling this function should be a contract that inherits from the IEntropyConsumer interface.
|
|
|
/// The `entropyCallback` method on that interface will receive a callback with the returned sequence number and
|
|
|
/// the generated random number.
|
|
|
@@ -100,7 +104,7 @@ interface IEntropyV2 is EntropyEventsV2 {
|
|
|
address provider,
|
|
|
bytes32 userRandomNumber,
|
|
|
uint32 gasLimit
|
|
|
- ) external payable returns (uint64 assignedSequenceNumber);
|
|
|
+ ) external payable returns (uint64 sequenceNumber, address providerAddress);
|
|
|
|
|
|
/// @notice Get information about a specific entropy provider
|
|
|
/// @param provider The address of the provider to query
|