Wrapped SMART Token
Last updated
Last updated
Inherits: UnbuttonToken, UUPSUpgradeable, OwnableUpgradeable, ReentrancyGuardUpgradeable, FlashloanSpecifics, BaseContract
This is the signers address of RP api's that generate encoded params for rebalance
Allows user to take flashloans from the wrapper
This function is guarded by the nonReentrant
modifiers. we offer unwanted tokens (sellingToken) in exchange of underlying tokens
Parameters
receiver
address
The address of the receiver.
amount
uint256
The amount of underlying assets to flashloan.
encodedData
bytes
signature
bytes
params
bytes
The parameters for the flashloan. Used by the receiver contract(Aave's interface)
Verifies the provided signature and decodes the encoded data into ScheduledRebalance
struct.
It recovers the address from the Ethereum signed message hash and the provided signature
. If the recovered address doesn't match the signersAddress
, it reverts the transaction. If the signature is valid, it decodes the encodedData
into a ScheduledRebalance
struct and returns it.
Parameters
signature
bytes
The signature to be verified.
encodedData
bytes
The data to be decoded into a ScheduledRebalance
struct.
Returns
<none>
PriceFeed
data A ScheduledRebalance
struct containing the decoded data.
Burns wrapper tokens from {msg.sender} and transfers the underlying tokens back.
Parameters
amount
uint256
The amount of wrapper tokens to burn.
Returns
<none>
uint256
The amount of underlying tokens withdrawn.
Burns wrapper tokens from {msg.sender} and transfers the underlying tokens to the specified beneficiary.
Parameters
to
address
The beneficiary account.
amount
uint256
The amount of wrapper tokens to burn.
Returns
<none>
uint256
The amount of underlying tokens withdrawn.
Burns all wrapper tokens from {msg.sender} and transfers the underlying tokens back.
Returns
<none>
uint256
The amount of underlying tokens withdrawn.
Burns all wrapper tokens from {msg.sender} and transfers the underlying tokens back.
Parameters
to
address
The beneficiary account.
Returns
<none>
uint256
The amount of underlying tokens withdrawn.
Burns wrapper tokens from {msg.sender} and transfers the underlying tokens back.
Parameters
uAmount
uint256
The amount of underlying tokens to withdraw.
Returns
<none>
uint256
The amount of wrapper tokens burnt.
Burns wrapper tokens from {msg.sender} and transfers the underlying tokens back to the specified beneficiary.
Parameters
to
address
The beneficiary account.
uAmount
uint256
The amount of underlying tokens to withdraw.
Returns
<none>
uint256
The amount of wrapper tokens burnt.
Burns all wrapper tokens from {msg.sender} and transfers the underlying tokens back.
Returns
<none>
uint256
The amount of wrapper tokens burnt.
Burns all wrapper tokens from {msg.sender} and transfers the underlying tokens back.
Parameters
to
address
The beneficiary account.
Returns
<none>
uint256
The amount of wrapper tokens burnt.