I've been toying around with the English Auction example and I have two questions:
After an invalid bid (less than the minimum bet set for the auction) from a wallet, a second valid bid from the same wallet is also not successful. Is this intended? The trace shows the first invalid bid but not the second one, the last trace message is "Contract instance stopped with error: "bid lower than minimal bid 10000000".
Considering the following sequence of actions: auction starts, wallet 2 bids, wallet 3 outbids wallet 2, wallet 2 outbids wallet 3, auction closes. The image below shows the transaction corresponding to the second bid of wallet 2. Why do we have wallet 2 twice as an input of the transaction? I thought only wallet 2 created by slot 3 should appear as an input.
For question 1: It seems to be an issue with the way the English Auction contract is written. I believe this is a bug that someone with more knowledge of Plutus would be able to fix in the contract code.
For question 2:
When Wallet 2 was outbid, the script created a UTxO to give it back Wallet 2's original 11000000 bid.
When Wallet 2 bid again, it bid 15000000. First the unspent 11000000 was used as an input, but that's not enough to cover the 15000000 bid. So Wallet 2's other UTxO containing 88991363 is needed as an additional input.