gnosisguild / wand-nft

wand-nft.vercel.app
8 stars 6 forks source link

Minting wands with Interpolated Stones #55

Closed cristovaoth closed 2 years ago

cristovaoth commented 2 years ago

This PR moves the interpolation logic into the WandConjuror contract, and lets user mint wands with intermediate mixed stone states.

Interpolating is done using three params: fromStoneIndex, toStoneIndex and progress. We initially considered storing only a rotation (angle) as stoneId, and deriving params on chain. Due to rounding challenges, it turned out to be more practical to store the numbers packed in the stoneId. Only the actual value interpol is done by Conjuror