@zoralabs/comments-contracts
v0.0.1
Published
## Deployment
Downloads
66
Maintainers
Keywords
Readme
Comments
Deployment
The Comments
contract is deployed deterministically using a turnkey account. The deployment process uses a helper contract, DeterministicDeployerAndCaller.
Prerequisites
- Ensure you have Forge installed.
- Familiarity with turnkey accounts is recommended.
Setting up environment variables
In the packages/comments
directory:
- Copy
.env.example
to.env
- Populate the parameters in
.env
- Set
TURNKEY_TARGET_ADDRESS
to the address of the turnkey account that will sign the deployment.
Deploying the Comments Contract
- Generate deterministic config (if not already done):
DEPLOYER={TURNKEY_DEPLOYER_ADDRESS} forge script script/GenerateDeterministicParams.s.sol $(chains zora --rpc) --ffi
This saves the config to ./deterministicConfig/comments.json
.
- Deploy the
Comments
contract:
forge script script/Deploy.s.sol $(chains {chainName} --rpc) --broadcast --verify
where {chainName}
is the emdash name of the chain you want to deploy on.
Seeding a Comments Contract
Backfilling MintComments
MintComment
events are legacy events for commenting when minting on
Zora 1155 contracts. To import the into a Comments contract, so that
they can be replied to and sparked, the following script can be run.
pnpm tsx scripts/backfillComments.ts {chainName}
where {chainName}
is the emdash name of the chain you want to backfill on.
Example usages:
// for zora sepolia
pnpm tsx scripts/backfillComments.ts zora-sepolia
// for zora mainnet
pnpm tsx scripts/backfillComments.ts zora
// for base
pnpm tsx scripts/backfillComments.ts base
Seeding Comments Contract with some Test Data
Currently only on Zora Sepolia, this will create some comments, replies, and sparked comments.
pnpm tsx scripts/generateCommentsTestData.ts