ActionFlag
state.InitDeposit
FinishDeposit
InitRedemption
FinishRedemption
FailureReported
EmergencyWithdrawActivated
initDepositStable
approve()
for an allowance
of at least amount
for the wrapped UST contract, ActionFlag
is set to false
Accepts: amount
- how much UST to deposit
Updates: ActionFlag
to true
Emits: InitDeposit
finishDepositStable
ActionFlag
is set to true
Updates: sets ActionFlag
to false
, transfer
s all aUST balances from contract address to tx.origin
Emits: FinishDeposit
initRedeemStable
approve()
for an allowance of at least amount
for the wrapped aUST contract, ActionFlag
is set to false
Accepts: amount
- how much aUST to redeem back to UST
Updates: ActionFlag
to true
IMPORTANT: aUST redemptions may fail if UST liquidity is low in the Terra side Anchor money market → be sure to check account contract balances & initRedeemStable()
success
parameters.
Emits: InitRedemption
finishRedeemStable
ActionFlag
is set to true
Updates: sets ActionFlag
to false
, transfers all UST balances from contract address to tx.origin
Emits: FinishRedemption
reportFailure
init
operations to allow the EthAnchor operator to return any funds, and reset ActionFlag
back to false
. Only callable by contract owner.ActionFlag
is set to true
Updates: sets ActionFlag
to false
emergencyWithdraw
_tokenAddress
at contract address must be greater than 0
Updates: transfers all ERC20 token balances of token contract _tokenAddress
back to msg.sender