One of my most memorable/educational meetups was one by Philly.rb on audit logging. Audit logs record the occurrence of an event, the time at which it occurred, and any other useful data. The insight I remember from that talk was that audit logs are generated by creating a record for every change event in a new table. For example, your project may have a model User
and a model ChangeOperation
(usually generated by some library) and every time any data on the user model is changed, a new ChangeOperation instance is created and persisted in the database. You can later view all the ChangeOperation
s the User
model has gone through.
I am at EthDenver this week and it’s been great. There are some really interesting new projects using NFTs in a number of new ways. A typical NFT is such a simple idea that it is very amenable to representing different properties of a product. The Lens Protocol is one such interesting project that wants to represent social graphs on the blockchain. Like a few other social-network-on-the-chain projects, Lens uses NFTs to represent user identities.
Where Lens does something interesting though is representing verbs like “following” as an NFT. From their documentation:
Profile NFTs contain a FollowModule. This module contains the logic that allows different accounts to be issued Follow NFTs to record their relationship to the main profile on-chain.
Extracting the follow action to its own smart contract is an interesting move and allows you to create all sorts of various kinds of follows like “create a follow NFT only if the user has this other NFT” or “create a follow NFT if they pay a certain amount” (basically premium follows).
Definitely an interesting idea and something I need to dive into a bit more.