A shrine is a smart contract that contains a list of addresses & shares, which is called the ledger. A shrine enables anyone to distribute any amount of any ERC20 token to the addresses on its ledger proportional to their share amounts, with a constant gas cost regardless of the number of addresses on the ledger thanks to the use of Merkle trees.
The admin of a shrine is called the guardian. Each guardian can modify their shrine’s ledger, as well as choose to charge a fee on all tokens distributed to their shrine. Each shrine only has one guardian, who can transfer their ownership of the shrine to another address if necessary.
Each address on a shrine’s ledger is called a champion of that shrine. Each champion can transfer their right to claim tokens from a certain shrine to another address.
Shrines that distribute tokens to other shrines are called meta-shrines. They use the same contract as regular shrines, the only difference is some/all of the addresses on their ledgers are other shrines.
To install with DappTools:
dapp install astrodrop/shrine
To install with Foundry:
forge install astrodrop/shrine
This project uses Foundry as the development framework.
make update
make build
make test