fx(hash)
Core Contracts
-
FxContractRegistry: Registry contract that manages all deployed smart contracts registered by fxhash
-
FxGenArt721:
ERC-721
implementation contract that allows for minting of new tokens, burning of existing tokens and managing of token royalties -
FxIssuerFactory: Factory contract that clones the
FxGenArt721
implementation to create new Generative Art Projects -
FxMintTicket721:
ERC-721
implementation contract that allows for minting of new tickets, burning of exisiting tickets, and enforcing of harberger taxes over ticket ownership -
FxRoleRegistry: Registry contract that implements AccessControl to manage different roles within the system, such as admin, creator, minter, and moderator
-
FxTicketFactory: Factory contract that clones the
FxMintTicket721
implementation to create new Mint Tickets for an existingFxGenArt721
project
Periphery Contracts
-
DutchAuction: Minter contract that distributes new
FxGenArt721
andFxMintTicket721
tokens at a linear price over a fixed interval of time -
FixedPrice: Minter contract that distributes new
FxGenArt721
andFxMintTicket721
tokens at a fixed price -
IPFSRenderer: Renderer contract that constructs offchain metadata of
FxGenArt721
andFxMintTicket721
tokens pinned to IPFS -
PseudoRandomizer: Randomizer contract that provides a pseudo-randomness
keccak256
hash using the token ID, sender's address, current block number, and hash of the previous block -
ONCHFSRenderer: Renderer contract that constructs onchain metadata of
FxGenArt721
andFxMintTicket721
tokens stored through ONCHFS -
TicketRedeemer: Minter contract that burns an existing
FxMintTicket721
token and mints a newFxGenArt721
token
Setup
- Clone repository
git clone https://github.com/fxhash/fxhash-evm-contracts.git
- Create
.env
file in root directory
DEPLOYER_PRIVATE_KEY=
ETHERSCAN_API_KEY=
GOERLI_RPC_URL=
MAINNET_RPC_URL=
SEPOLIA_RPC_URL=
- Install dependencies
forge install
npm ci
- Activate husky and commitlint
npx husky install
npx husky add .husky/commit-msg 'npx --no -- commitlint --edit ${1}'
- Run tests
npm run test
- Run prettier
npm run prettier
- Deploy contracts
forge script script/Deploy.s.sol --rpc-url $GOERLI_RPC_URL --private-key $DEPLOYER_PRIVATE_KEY --verify --etherscan-api-key $ETHERSCAN_API_KEY --broadcast
- View documentation locally
forge doc --serve --port 3000