FlipsideCrypto / badger

EVM primitive, protocol and app layer that exposes top-down management mechanisms for on-chain organizations. Badger is the key to the existing gates and locks within Web3.
https://www.trybadger.com/
MIT License
22 stars 1 forks source link

feat: badge archiving #235

Closed nftchance closed 1 year ago

nftchance commented 1 year ago

This PR introduces the ability to have archived Badges.

Introducing a new BadgeArchived event can easily be tracked with the indexer.

However, due to the introduced nuance where archival blocks minting, someone can still make a new Badge and proceed with minting (even if the Organization needs to be archived) -- The logic of this is quite expensive. Therefore, while the state and events have been implemented, the enforcement logic has been deprecated and may be available in a hook in the future.

In the process of gas optimization, I have removed .name and .symbol due to the lack of standardization in ERC1155 and the lack of protocol-ability to change the on-contract value.

The deprecation of these values lowers the gas consumed by the factory by 40k but also means that at all times, the name will come from .contractURI, and the use of .symbol will be deprecated protocol-wide.