TreasuryProtectionStrategy
Last updated
Last updated
Contract that implement protection strategy using a whitelist. Inherits from StrategyBase.
Contract can be found here:
protectedAddresses
A mapping of addresses and their protection rules.
event WhitelistAddresses(address[] whitelist)
isAddressWhitelisted
isTransferAllowed
setProtectedAddress
removeProtectedAddresses
Returns true if particular whitelistedAddress
is in the whitelist of protectedAddress
for token
.
Parameters:
Reverts in case transfer from sender to recipient is not possible due to recipient not being in the sender's whitelist. This is called by the lossless controller every time a transfer is done from the protected address.
Parameters:
Sets a whitelist for the protected address inside one particular token's scope. Can be called only by the protection admin of a token.
Parameters:
Removes whitelist from the addresses in the list.
Parameters:
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
token
address
Token for which the protection rules are being checked.
protectedAddress
address
Address for which the whitelist is being checked.
whitelistedAddress
address
Address to check if it's in the whitelist.
token
address
Token for which the protection rules are being checked.
sender
address
Sender's address.
recipient
address
Recipient's address.
amount
uint256
Amount of tokens being sent.
token
address
Token for which the protection rules are being checked.
protectedAddress
address
Address for which the protection rules should be applied.
whitelist
address[]
A list of addresses that are allowed to receive tokens from the protected address.
token
address
Token for which the protection rules are being removed.
addressesToRemove
address[]
A list of address that should get their whitelist removed.