Token Configuration#37
Merged
Merged
Conversation
8d0083c to
d545176
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactor: Per-Token Configuration and Permit-Based Minting
This pull request introduces a significant refactoring of the
ArtTokenandAuctionHousecontracts to support per-token configuration and a more robust permit-based minting system. The changes move away from a collection-levelregulatedflag to a more flexibleregulationModethat can be set for each individual token.Summary of Changes
regulatedstatus has been replaced with aTokenConfigstruct for each token, which includes acreatoraddress and aregulationModeenum (UnregulatedorRegulated).buyfunction inArtTokenand thecreatefunction inAuctionHousehave been updated to use EIP-712 permits (TokenMintingPermitandAuctionCreationPermit).ArtTokennow includes anArtTokenConfigManagerto handle the new per-token configurations.Distributionlibrary has been replaced with a more genericSafeERC20BulkTransferlibrary for handling revenue distribution.AuctionandOrderhave been moved into their own libraries for better organization.Detailed Changes by Contract
ArtToken.solbuyfunction: Replaced with a newmintfunction that accepts aTokenMintingPermitand a signature.minttomintFromAuctionHouse: This function is now specifically for theAuctionHouseto mint tokens after a successful auction.ArtTokenConfigManager: A new contract to manageTokenConfigfor each token, with functions to get and set thecreatorandregulationMode.REGULATEDflag: The collection-levelregulatedboolean has been removed in favor of the per-tokenregulationMode.DistributionwithSafeERC20BulkTransfer: The logic for distributing funds from a primary sale now uses theSafeERC20BulkTransferlibrary.AuctionHouse.solcreatefunction: Now uses anAuctionCreationPermitto create new auctions, requiring a signature from an authorized signer.finishfunction: When an auction is finished, it now callsArtToken.mintFromAuctionHouseand passes theTokenConfigfor the new token.AuctionHouseStorage: Now includes a mapping to store theTokenConfigfor each token in an auction.Market.solExecutionPermittoOrderExecutionPermit: For clarity and consistency.Order.Sideenum members:ASKis nowAskandBIDis nowBid.Other Changes
CollectionDeployer.sol: Updated to remove theregulatedparameter during deployment.regulatedfield has been removed fromconfig.dn.yamlandconfig.do.yaml.package.json.