Skip to content

A Partial Refund in A Smart Contract #9433

Answered by Chris-Hibbert
ghost asked this question in Q&A
Discussion options

You must be logged in to vote

I don't see any current contracts that do this, but there's a support library in zoe/src/contracts/auction that shows how it would be done. This sell method ensures that the seller can't exit early

  const sell = seat => {
    assertProposalShape(seat, {
      give: { Asset: null },
      want: { Ask: null },
      // The auction is not over until the deadline according to the
      // provided timer. The seller cannot exit beforehand.
      exit: { waived: null },
    });
    // Save the seat for when the auction closes.
    sellSeat = seat;

    // The bid invitations can only be sent out after the assets to be
    // auctioned are escrowed.
    return Far('offerResult', { makeBidInvita…

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
3 replies
@ghost
Comment options

@erights
Comment options

@ghost
Comment options

Comment options

You must be logged in to vote
3 replies
@ghost
Comment options

@Chris-Hibbert
Comment options

Answer selected
@ghost
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants