Props NFT core
Props NFT issuance core contracts.
Usage
# Install dependencies
npm install
# Compile contracts
npm run compile
Testing
There are two types of tests for the contracts: regular tests, which run on a clean state, and forking tests, which use network forking and depend on existing deployed contracts (eg. Gnosis Safe factory). Regular tests can be run via npm run test
while forking tests can be run via npm run test:forking
. Forking tests require access to an archive node and need to be run against a specific block number where network forking will take place. These parameters must be specified in the .env
secrets file as follows:
INFURA_KEY=
BLOCK_NUMBER=
Deployment
Deployment scripts reside in the ./scripts/deployment/
directory. For example, running npx hardhat --network NETWORK run ./scripts/deployment/PropsERC721Factory.ts
will run the deployment process for the PropsERC721Factory
contract. As part of running the deployment script, the deployed addresses, deployment blocks,and ABIs of the deployed contracts will be saved in the ./deployments
folder. Optionally, the deployed contracts can be registered to Biconomy for supporting relaying meta-transactions. The deployment process depends on the following variables, to be added to the .env
secrets file:
DEPLOYER_PK=
BICONOMY_AUTH_TOKEN=
BICONOMY_API_KEY=
Publishing
The SDK depends on the latest contract deployments (eg. ./deployments
directory). For this reason, when triggering a new deployment of any contract, make sure to publish the changes via npm publish
(not before making sure to bump the package version) and then update the SDK to use the latest version. The SDK will automatically pick up the latest available deployment of the contracts. Related, the corresponding subgraph also needs to be updated to the latest deployment.