Skip to content

Token Configuration#37

Merged
mriynyk merged 1 commit into
masterfrom
token_config
Feb 5, 2026
Merged

Token Configuration#37
mriynyk merged 1 commit into
masterfrom
token_config

Conversation

@mriynyk

@mriynyk mriynyk commented Sep 20, 2025

Copy link
Copy Markdown
Collaborator

Refactor: Per-Token Configuration and Permit-Based Minting

This pull request introduces a significant refactoring of the ArtToken and AuctionHouse contracts to support per-token configuration and a more robust permit-based minting system. The changes move away from a collection-level regulated flag to a more flexible regulationMode that can be set for each individual token.

Summary of Changes

  • Per-Token Configuration: The concept of a collection-wide regulated status has been replaced with a TokenConfig struct for each token, which includes a creator address and a regulationMode enum (Unregulated or Regulated).
  • Permit-Based Minting & Auction Creation: The buy function in ArtToken and the create function in AuctionHouse have been updated to use EIP-712 permits (TokenMintingPermit and AuctionCreationPermit).
  • Contract Refactoring:
    • ArtToken now includes an ArtTokenConfigManager to handle the new per-token configurations.
    • The Distribution library has been replaced with a more generic SafeERC20BulkTransfer library for handling revenue distribution.
    • Structs like Auction and Order have been moved into their own libraries for better organization.
  • Test Updates: All related tests have been updated to align with the new contract interfaces and functionality.

Detailed Changes by Contract

ArtToken.sol

  • Removed buy function: Replaced with a new mint function that accepts a TokenMintingPermit and a signature.
  • Renamed mint to mintFromAuctionHouse: This function is now specifically for the AuctionHouse to mint tokens after a successful auction.
  • Introduced ArtTokenConfigManager: A new contract to manage TokenConfig for each token, with functions to get and set the creator and regulationMode.
  • Removed REGULATED flag: The collection-level regulated boolean has been removed in favor of the per-token regulationMode.
  • Replaced Distribution with SafeERC20BulkTransfer: The logic for distributing funds from a primary sale now uses the SafeERC20BulkTransfer library.

AuctionHouse.sol

  • Updated create function: Now uses an AuctionCreationPermit to create new auctions, requiring a signature from an authorized signer.
  • Updated finish function: When an auction is finished, it now calls ArtToken.mintFromAuctionHouse and passes the TokenConfig for the new token.
  • AuctionHouseStorage: Now includes a mapping to store the TokenConfig for each token in an auction.

Market.sol

  • Renamed ExecutionPermit to OrderExecutionPermit: For clarity and consistency.
  • Renamed Order.Side enum members: ASK is now Ask and BID is now Bid.

Other Changes

  • CollectionDeployer.sol: Updated to remove the regulated parameter during deployment.
  • Configuration Files: The regulated field has been removed from config.dn.yaml and config.do.yaml.
  • Dependencies: Updated various dependencies in package.json.

@mriynyk mriynyk changed the title Token Config Token Configuration Sep 20, 2025
Base automatically changed from market to master February 5, 2026 11:09
@mriynyk mriynyk merged commit 4de633a into master Feb 5, 2026
1 check passed
@mriynyk mriynyk deleted the token_config branch February 5, 2026 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant