BoostryJP / ibet-SmartContract

Tokens and DEX contracts available in the ibet DeFi network 🔗
https://ibet.jp/ibet-for-fin
Apache License 2.0
18 stars 3 forks source link

feat: Change the timing of transfer approval in escrow contract #376

Closed YoshihitoAso closed 2 years ago

YoshihitoAso commented 2 years ago

close #372

Process flow

Transfer from address A to address B

[Case_1] Transfer approval is required

  1. createEscrow
    • Escrow created (balance at address A)
    • Create ApplicationForTransfer (escrowFinished= false)
    • Emit ApplyForTransfer event
  2. finishEscrow
    • Update the escrow completion status of the ApplicationForTransfer (escrowFinished= true)
    • Update (deactivate) Escrow
  3. approveTransfer
    • Ownership moves from address A to address B

[Case_2] Transfer approval is not required

  1. createEscrow
    • Escrow creation
  2. finishEscrow
    • Ownership moves from address A to address B
    • Update (deactivate) Escrow