BuiltByFrancis pfp
BuiltByFrancis
@builtbyfrancis
As promised. The story of this frame. From the developer's perspective. First things first. I did not do this alone. So, shout out to @dylankentish could not have done it without you brother. Shout out to this repo: https://github.com/horsefacts/base-mint-with-warps Lastly a massive shout out to the @alchemyplatform
2 replies
1 recast
16 reactions

BuiltByFrancis pfp
BuiltByFrancis
@builtbyfrancis
I heard about Farcaster the day before starting this and had no idea what frames were or how they worked. So, we used the repo I mentioned above to give us a good head start. Frames are an extension of the Opengraph protocol. OG is what tells apps to give the links you post some extra content like a title and image.
1 reply
0 recast
4 reactions

BuiltByFrancis pfp
BuiltByFrancis
@builtbyfrancis
Frames build on this idea by adding buttons, which allow for users to “navigate” within the frame or perform other actions. Cool right? So, a frame is just a series of links which return an image and a set of buttons. Putting all this together gives you a functioning frame.
1 reply
0 recast
0 reaction

BuiltByFrancis pfp
BuiltByFrancis
@builtbyfrancis
Before returning content, you can use the context provided to perform other actions. This is how we knew whether you liked the cast, and which wallets were linked to your account. We also kept some data about your FID so we knew whether you had minted and to which address.
1 reply
0 recast
0 reaction

BuiltByFrancis pfp
BuiltByFrancis
@builtbyfrancis
Okay here’s where it gets fun. We had to allow only mints we knew came from the frame, we had to pay for all of the gas AND we had to deal with massive throughput from all of you legends clicking the mint button at the same time! So, what did we do? Here’s where @alchemyplatform comes in.
1 reply
0 recast
2 reactions

BuiltByFrancis pfp
BuiltByFrancis
@builtbyfrancis
Alchemy has an account abstraction framework. This let us create a single "smart wallet" which we set as the only minter in the contract. We then stored all of your mint requests in order in a database and every block either sent a batch of them or checked the status of the batch.
1 reply
0 recast
0 reaction

BuiltByFrancis pfp
BuiltByFrancis
@builtbyfrancis
Onchain a batch is a single transaction that offers crazy gas savings. A typical mint is around 80,000 gas. To mint 25 in a batch cost us 1,350,000 which is around 54,000 per NFT. A 32.5% reduction! In testing, we saw up to 50% reductions. The reason for this is the reduction of "cold" reads/writes.
1 reply
0 recast
0 reaction

BuiltByFrancis pfp
BuiltByFrancis
@builtbyfrancis
Here is an example of a batch transaction of 25, if you're in this batch 👋 https://basescan.org/tx/0x844da0683037b6cfa78d078a307c47d03873a0ef275f17e2e3887fcd30e221cf This was a first for me and has unlocked so many gas-saving tricks in my mind. Looking forward to using this more.
1 reply
0 recast
0 reaction

BuiltByFrancis pfp
BuiltByFrancis
@builtbyfrancis
Let’s talk about the reveal. The metadata for this collection is on-chain and we kept track of which Token ID was minted with a yes or no. This initially made no difference to the token but once we sent the reveal transaction all of the yes voters transformed into the Arc and all of the haters got served a Sad Elon.
1 reply
0 recast
2 reactions