Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test VRF LogPoller functionality- initializeLastProcessedBlock, updateLastProcessedBlock and getUnfulfilled #11472

Merged
merged 7 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion contracts/scripts/native_solc_compile_all_logpoller
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ compileContract () {
}


compileContract tests/LogEmitter.sol
compileContract tests/LogEmitter.sol
compileContract tests/VRFLogEmitter.sol
42 changes: 42 additions & 0 deletions contracts/src/v0.8/tests/VRFLogEmitter.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract VRFLogEmitter {
event RandomWordsRequested(
bytes32 indexed keyHash,
uint256 requestId,
uint256 preSeed,
uint64 indexed subId,
uint16 minimumRequestConfirmations,
uint32 callbackGasLimit,
uint32 numWords,
address indexed sender
);
event RandomWordsFulfilled(uint256 indexed requestId, uint256 outputSeed, uint96 payment, bool success);

function emitRandomWordsRequested(
bytes32 keyHash,
uint256 requestId,
uint256 preSeed,
uint64 subId,
uint16 minimumRequestConfirmations,
uint32 callbackGasLimit,
uint32 numWords,
address sender
) public {
emit RandomWordsRequested(
keyHash,
requestId,
preSeed,
subId,
minimumRequestConfirmations,
callbackGasLimit,
numWords,
sender
);
}

function emitRandomWordsFulfilled(uint256 requestId, uint256 outputSeed, uint96 payment, bool success) public {
emit RandomWordsFulfilled(requestId, outputSeed, payment, success);
}
}
Loading
Loading