Content pfp
Content
@
https://warpcast.com/~/channel/chonksxyz
0 reply
0 recast
0 reaction

Backseats pfp
Backseats
@backseats
Quick Smart Contract Review: ChonkMakeover.sol I've always loved the `onERC721Received` function, especially for making a change and immediately returning the token to the sender. It's simple, elegant, and punches above its weight. In this case, we're using it because in ChonksMain.chonkMakeover, I decided forever ago that you couldn't unequip a Trait in there (by setting its value to 0); you could only override a Trait with another new Trait ID value. Oops. Instead we have the user send their Chonk to the ChonksMakeover contract which takes some encoded data so it knows what to do, does the unequip, then the it does the chonkMakeover because the contract itself is temporarily the owner and you have to own the Chonk to put on and take off Traits. This all happens quietly to the user after a single transaction signature and it's all displayed in your Chonk's Activity
0 reply
0 recast
1 reaction