onflow / nft-storefront

A general-purpose Cadence contract for trading NFTs on Flow
The Unlicense
102 stars 53 forks source link

Stable Cadence Feature Branch #74

Closed joshuahannan closed 7 months ago

joshuahannan commented 2 years ago

Updates the storefront contracts to be compatible with stable Cadence.

bluesign commented 2 years ago

I think as Stable Cadence coming, maybe we can move pre/post conditions to interfaces as they should be.

joshuahannan commented 2 years ago

I think I disagree that pre/post conditions should only be in interfaces. I think that they should be in interfaces if possible, but there are a lot of times when you only want the conditions enforced on the concrete type, or when the things you want to be able to access in the condition are not even accessible in the interface anyway.

bluesign commented 2 years ago

I think that they should be in interfaces if possible, but there are a lot of times when you only want the conditions enforced on the concrete type...

@joshuahannan I am torn on this to be honest, one side of me sees NFTStoreFront as a standard ( that requires interfaces ) another assumes it is too critical to be interface instead of concrete.

when the things you want to be able to access in the condition are not even accessible in the interface anyway.

I think this is totally possible by adjusting interface

turbolent commented 2 years ago

Opened onflow/cadence#2125 to make more functions view

turbolent commented 2 years ago

Updated dependencies and reverted the change of the pre-conditions to asserts. Tests pass now