exo-digital-labs / ERC721R

https://erc721r.super.site/
MIT License
240 stars 60 forks source link

Refund event and IERC721R interface #31

Open elie222 opened 2 years ago

elie222 commented 2 years ago

Wonder if we add a Refund event. Probably helpful to have.

Also thinking about the interface as a whole. Perhaps something like this with Refund event:

interface IERC721R {
    function refund(uint256[] calldata tokenIds) external;

    function getRefundPrice(uint256 tokenId) external view returns (uint256);

    function getRefundGuaranteeEndTime() external view returns (uint256);

    function isRefundGuaranteeActive() external view returns (bool);
}

Anything else we may want here?

lawweiliang commented 2 years ago

@elie222 Yeah, refund event is needed.


Aside from that I think all these functions need events as well

image

Why?

Easy for frontend to track they are successfully call the function.

elie222 commented 2 years ago

Adding these to the CF contract. Can add into the main repo after 👍

lawweiliang commented 2 years ago

@elie222 , do you need help on this? Offer to help. 😄

elie222 commented 2 years ago

We have a developer working on it in any case. The most help may be around this PR if you notice anything wrong: https://github.com/exo-digital-labs/ERC721R/pull/32

lawweiliang commented 2 years ago

Alright, I take a look.

sturench commented 2 years ago

Status?

elie222 commented 2 years ago

We used IERC721R for CryptoFighters Alliance: https://etherscan.io/address/0x06daf7e34595f9d3260dd5262dca8e3bcfeb39d5#code

Will look to move the latest code into this repo later this week.