An allogram is the smallest meaningful unit of a writing system
Built on Scaffold-ETH2, inspired by the design-principles of OpenZeppelin.
Fun and easy to set up and start to play around with. Scaffold Eth is great at this because they have mastered it and heard feedback for years
Shows what's possible and inspires experimentation (must be a quick feedback loop of making changes in contract and editing the app)
Documentation that inspires: "wow this looks cool and I want to try some idea out" it should hook the action of forking the repo.
Exploring four different builds to find the common patterns of the function calls which will help us discover the correct abstractions.
The more we can discover and re-use common patterns, interfaces, and events, the more flexible and powerful the architecture becomes.
projects[projectAddress][applicationId]
The main functions in these three are:
- register + approve (of projects)
- allocate (vote, fund, stake)
If these emit events with the same signatures we can index it from one indexer.
This means we can create hooks that work for all strategy contracts following these function and event signatures.
- useRegister + useApprove - useRegistrations + useRegistrationByAddress
- useAllocate + useAllocations
This allows us to have a toolkit that:
- easily create and approve projects
- query registered projects and reviews
- vote, fund, stake to projects
- query votes, funding, stakings
The indexer picks up the events emitted by these contract extensions.
It can be queried like:
A Strategy contract can easily be created by composing extensions and gates.
These are inspired by the design choices in OpenZeppelin ERC20 with a public and an internal function.
A simple registry to handle eligibility for funding (or keeping track of project addresses for other purposes).
Metadata can be sent for both registration (Application) and approving (Review).
The Allocator comes with functions to allocate tokens to a collection of recipients. We use arrays for the public function to simplify token transfers to multiple recipients.
The reason the allocate function contains an array of recipients and amounts is because we want to be able to send to many in one transaction without using Multicall.
Never approve Multicall3 to spend your tokens.
https://github.com/mds1/multicall?tab=readme-ov-file#security
MerkleVerify provides two internal functions that can be called from parent contract and a public claim function to transfer tokens.
Gates are small contracts with simple checks that can be used on contracts. Similar to OpenZeppelin's Ownable
with the modifier onlyOwner
.
TokenGate lets us check the balance of ERC20 or ERC721 tokens.
Check if an account has an attestation for a specific schemaUID and attester.
Can be used for example for OP Badgeholders or only approved projects can register projects.
SignatureGate lets us restrict function calls to offchain generated signatures.
Ready-made components for most common use-cases.
Categories:
Use-cases:
Here's what it handles:
useRegister
hook.Should be easy to add and remove different form fields.
Use-cases: