Skip to content

Commit

Permalink
Move vrfv2plus wrapper events from interface to implementation (#12875)
Browse files Browse the repository at this point in the history
  • Loading branch information
leeyikjiun authored Apr 18, 2024
1 parent ae1f53f commit 057ef81
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
20 changes: 20 additions & 0 deletions contracts/src/v0.8/vrf/dev/VRFV2PlusWrapper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,26 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume
LinkTokenInterface internal immutable i_link;
AggregatorV3Interface internal immutable i_link_native_feed;

event FulfillmentTxSizeSet(uint32 size);
event ConfigSet(
uint32 wrapperGasOverhead,
uint32 coordinatorGasOverhead,
uint16 coordinatorGasOverheadPerWord,
uint8 coordinatorNativePremiumPercentage,
uint8 coordinatorLinkPremiumPercentage,
bytes32 keyHash,
uint8 maxNumWords,
uint32 stalenessSeconds,
int256 fallbackWeiPerUnitLink,
uint32 fulfillmentFlatFeeNativePPM,
uint32 fulfillmentFlatFeeLinkDiscountPPM
);
event FallbackWeiPerUnitLinkUsed(uint256 requestId, int256 fallbackWeiPerUnitLink);
event Withdrawn(address indexed to, uint256 amount);
event NativeWithdrawn(address indexed to, uint256 amount);
event Enabled();
event Disabled();

error LinkAlreadySet();
error LinkDiscountTooHigh(uint32 flatFeeLinkDiscountPPM, uint32 flatFeeNativePPM);
error InvalidPremiumPercentage(uint8 premiumPercentage, uint8 max);
Expand Down
20 changes: 0 additions & 20 deletions contracts/src/v0.8/vrf/dev/interfaces/IVRFV2PlusWrapper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,6 @@
pragma solidity ^0.8.0;

interface IVRFV2PlusWrapper {
event FulfillmentTxSizeSet(uint32 size);
event ConfigSet(
uint32 wrapperGasOverhead,
uint32 coordinatorGasOverhead,
uint16 coordinatorGasOverheadPerWord,
uint8 coordinatorNativePremiumPercentage,
uint8 coordinatorLinkPremiumPercentage,
bytes32 keyHash,
uint8 maxNumWords,
uint32 stalenessSeconds,
int256 fallbackWeiPerUnitLink,
uint32 fulfillmentFlatFeeNativePPM,
uint32 fulfillmentFlatFeeLinkDiscountPPM
);
event FallbackWeiPerUnitLinkUsed(uint256 requestId, int256 fallbackWeiPerUnitLink);
event Withdrawn(address indexed to, uint256 amount);
event NativeWithdrawn(address indexed to, uint256 amount);
event Enabled();
event Disabled();

/**
* @return the request ID of the most recent VRF V2 request made by this wrapper. This should only
* be relied option within the same transaction that the request was made.
Expand Down

0 comments on commit 057ef81

Please sign in to comment.