Deploying Upgradeable Token and Handler
Upgradeable Non-funglible token contracts require special attention and processes during deployment. Follow the steps outlined below to utilize the deployment scripts and processes for deploying a protocol supported upgradeable NFT and Handler.
Index
Prerequisites
It’s required that the token you are deploying is a protocol compatible token and therefore inherits the protocol token set (see example here). It is also required that you have a deployed protocol, and a deployed application manager. It’s also required that you have properly configured admins as two App Administrator roles are required for these scripts to function.
If you are using an already deployed rule processor address and app manager address set the addresses:
Upgradeable NFT Deployment
NOTE:
-
NFT Batch minting and burning is not supported in this release.
-
Upgradeable Tokens require 3 addresses during the deployment steps. First, the deployment owner that deploys the app manager and sets roles. Second, an Application Administrator address to deploy the token, token proxy and initialize the token. Third, a Configuration Application Administrator address to connect the token with the handler address once deployed and initilaized. The token and the handler contracts require initialize functions called and are controlled through the protocol RBAC roles.
-
Ensure the environment variables are set correctly. The
APPLICATION_APP_MANAGER
,CONFIG_APP_ADMIN
andDEPLOYMENT_OWNER_KEY
are used by the deployment script. -
Inside the ApplicationNFT script change the
Wolfman
name,WOLF
symbol inside the script andAPPLICATION_ERC721_URI_1
inside the .env file to the desired name, symbol and token URI for your NFT deployment. -
Deploy the contracts:
- Use the output from the deployment to set relevant environment variables:
- Configure the contracts:
These scripts deploy an Upgradeable Non-Fungible Token, Asset Handler Diamond, Initializes the token and diamond, connects the tokens to their handler and registers the token with the Application Manager.