Today I'd like to share with you a cool code pattern I met while reading audit reports on @code4rena. That one is from NeoTokio protocol.
Below you can find a small breakdown of how it works.
The #Fantom ecosystem is expanding rapidly, with new developments occurring on a constant basis 🗞️
#FantomInsider is glad to present you with a roundup of highlight events in the @FantomFDN ecosystems during the previous 72 hours ⏰
Check it out 👇🧵
#Fantom#FTM
11 Things you can build with the new #Chainlink Functions
1/ @OpenAI API
Create a smart contract that asks an AI for a daily investment recommendation and then makes that trade.
i told you llama was cooking some high iq stuff
btw contract is verified on optimism so anyone can check for themselves what they approve, here's a snippet
1/ RareSkills is proud to present a totally new way to allowlist addresses for presales and airdrops.
The gas efficiency soundly beats ECDSA signatures and Merkle Trees.
The method is to use old fashion RSA signatures, but with a lot of tricks.
Links and gas contest below
@mudgen The easiest way is probably just blacklisting diamondCut selector. But it is not super transparent/secure, since the same functionality could be hidden in another selector.
@potekhin_sergey@eip2535@mudgen Additionally I try to split features into modules. And try to keep most of the logic in the library, so the facet is in many cases just an external interface checking access control. Like if you do the same 😁
I just published my very first article about migrating the @eip2535 Diamond Storage layout. Hope it's not too boring 😅
Big thx to @mudgen for tips on how to improve it.
https://t.co/4BAOKVDL2S
⛽ fun way to run out of gas
It attempts to store a 1 bit "very far" in memory (not(0) is 0xffff...ffff), and the memory expansion function has exponential cost, so this consumes trillions of gas units
Ever found yourself lost in the dark forest, trying to decode transaction calldata of an unknown smart contract? 🤔😤
Say no more!
Using GPT-3 you can decode the calldata from any transaction and understand how to interact with the contract 🧵
@kinsyudev@optimizoor Diamonds are much more convenient than regular upgradable contracts (if used in the right way), imho. The initial learning curve is worth it. 😁