The whitelist module keeps track of all valid oToken addresses, product hashes, collateral addresses, and callee addresses.
onlyFactory()
-
constructor(address _addressBook) (public)
-
isWhitelistedProduct(address _underlying, address _strike, address _collateral, bool _isPut) (external)
-
isWhitelistedCollateral(address _collateral) (external)
-
isWhitelistedOtoken(address _otoken) (external)
-
isWhitelistedCallee(address _callee) (external)
-
whitelistProduct(address _underlying, address _strike, address _collateral, bool _isPut) (external)
-
blacklistProduct(address _underlying, address _strike, address _collateral, bool _isPut) (external)
-
whitelistCollateral(address _collateral) (external)
-
blacklistCollateral(address _collateral) (external)
-
whitelistOtoken(address _otokenAddress) (external)
-
blacklistOtoken(address _otokenAddress) (external)
-
whitelistCallee(address _callee) (external)
-
blacklistCallee(address _callee) (external)
-
ProductWhitelisted(bytes32 productHash, address underlying, address strike, address collateral, bool isPut)
-
ProductBlacklisted(bytes32 productHash, address underlying, address strike, address collateral, bool isPut)
-
CollateralWhitelisted(address collateral)
-
CollateralBlacklisted(address collateral)
-
OtokenWhitelisted(address otoken)
-
OtokenBlacklisted(address otoken)
-
CalleeWhitelisted(address _callee)
-
CalleeBlacklisted(address _callee)
check if the sender is the oTokenFactory module
constructor
_addressBook
: AddressBook module address
Function isWhitelistedProduct(address _underlying, address _strike, address _collateral, bool _isPut) → bool external
check if a product is whitelisted
product is the hash of underlying asset, strike asset, collateral asset, and isPut
-
_underlying
: asset that the option references -
_strike
: asset that the strike price is denominated in -
_collateral
: asset that is held as collateral against short/written options -
_isPut
: True if a put option, False if a call option
- True if product is whitelisted
check if a collateral asset is whitelisted
_collateral
: asset that is held as collateral against short/written options
- True if the collateral is whitelisted
check if an oToken is whitelisted
_otoken
: oToken address
- True if the oToken is whitelisted
check if a callee address is whitelisted for the call action
_callee
: callee destination address
- True if the address is whitelisted
Function whitelistProduct(address _underlying, address _strike, address _collateral, bool _isPut) external
allows the owner to whitelist a product
product is the hash of underlying asset, strike asset, collateral asset, and isPut
can only be called from the owner address
-
_underlying
: asset that the option references -
_strike
: asset that the strike price is denominated in -
_collateral
: asset that is held as collateral against short/written options -
_isPut
: True if a put option, False if a call option
Function blacklistProduct(address _underlying, address _strike, address _collateral, bool _isPut) external
allow the owner to blacklist a product
product is the hash of underlying asset, strike asset, collateral asset, and isPut
can only be called from the owner address
-
_underlying
: asset that the option references -
_strike
: asset that the strike price is denominated in -
_collateral
: asset that is held as collateral against short/written options -
_isPut
: True if a put option, False if a call option
allows the owner to whitelist a collateral address
can only be called from the owner address. This function is used to whitelist any asset other than Otoken as collateral. WhitelistOtoken() is used to whitelist Otoken contracts.
_collateral
: collateral asset address
allows the owner to blacklist a collateral address
can only be called from the owner address
_collateral
: collateral asset address
allows the OtokenFactory module to whitelist a new option
can only be called from the OtokenFactory address
_otokenAddress
: oToken
allows the owner to blacklist an option
can only be called from the owner address
_otokenAddress
: oToken
allows the owner to whitelist a destination address for the call action
can only be called from the owner address
_callee
: callee address
allows the owner to blacklist a destination address for the call action
can only be called from the owner address
_callee
: callee address
Event ProductWhitelisted(bytes32 productHash, address underlying, address strike, address collateral, bool isPut)
emits an event a product is whitelisted by the owner address
Event ProductBlacklisted(bytes32 productHash, address underlying, address strike, address collateral, bool isPut)
emits an event a product is blacklisted by the owner address
emits an event when a collateral address is whitelisted by the owner address
emits an event when a collateral address is blacklist by the owner address
emits an event when an oToken is whitelisted by the OtokenFactory module
emits an event when an oToken is blacklisted by the OtokenFactory module
emits an event when a callee address is whitelisted by the owner address
emits an event when a callee address is blacklisted by the owner address