I am having a bidding session where every time a person Bids on some product it checks the condition if the bidding session is valid or not,

I want to trigger a finalize bid function which will finalize the bid and will proceed with other formalities?

Is it possible? As of my thinking, for executing a function in the EVM, gas is needed, provided by some of the account holders only, either an EOA or a Contract Account.

Feel free to share an approach for doing this.

Thank You .

  • 1
    Generally, you need someone to call a function. In an auction, the person to make that function call is usually either the winner of the auction or the seller. (They're the ones who have something to gain by calling such a function.) – smarx Jan 22 at 17:35
  • @smarx , how to call the approve from an eoa ? Can I do it like tokenInstance.approve(address(this), _bidValue) Will it approve the contract to transfer tokens from the msg.sender to itself , Using transferFrom ? – CryptoScroller Jan 22 at 17:49
  • I'm not sure how that question connects with your original question. But yes, if account X calls approve(Y, n), then Y can transfer up to n of X's tokens via transferFrom(X, Z, n). – smarx Jan 22 at 17:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.