1

I'm trying to understand, how the actual process of putting something up for auction works and also how does web3 interact with this auction.

Here are my findings till now:

  1. I think that SaleClockAuction.sol has to be deployed with _nftAddress and cut.

  2. What is nftAddress? Is it an address of another contract (ERC721 contract, maybe?) or the users current account address?

  3. Ok, once deployed, the address of SaleClockAuction.sol has to be copied and this address in turn has to be called from KittyCore.sol in order to un pause the contract.

  4. Now, how is the process of calling functions that puts up something for auction or bids on an auction work? I see that the KittyCore exposes createAuction but not bid. Do users directly interact with the external functions of the deployed SaleClockAuction contract?

Where I am stuck with

Either calling createAuction from KittyCore.sol or createAuction and bid from SaleClockAuction.sol is throwing an error for me.

2
  1. Correct. The cut can be zero, but must be specified. The _nftAddress must point to a contract that implements ERC-721 (at least the draft that was in place at the time we published CK).

  2. See above.

  3. The deployment order is:

    1. Deploy the core contract.
    2. Deploy the auction contract passing the core contract address as _nftAddress.
    3. Call the setSaleAuctionAddress on the core contract, so it has a reference back to the auction contract. This is almost certainly the step you are missing.
  4. The original goal was that KittyCore wouldn't need to be involved in auctions at all, but that required two transactions (an approve call, and then a call to start the auction), and we didn't want to make our users do that all the time. To avoid this, we have the creation of a sale auction handled by the core contract. Bidding happens by calling the auction contract directly, as you suggest.

  • Woot! Thanks for the response! Please keep a tab on this thread. I have a few more questions. – InfinitePrime Jan 26 '18 at 7:45
  • And how do you manage update of contract? The comments on top of the update function reads, that you have to follow instructions from README.md file. Will you open source that file? – InfinitePrime Jan 28 '18 at 7:55

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.