Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save contract deployment data to deployments folder #2

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gskril
Copy link
Owner

@gskril gskril commented Feb 4, 2025

Fixes #1

This PR adds functionality to save contract deployment data (address, ABI, constructor arguments) to a deployments folder, similar to how it's done in ensdomains/ens-contracts.

Changes:

  • Add saveDeployment helper to store contract data in apps/contracts/deployments/{chainId}/
  • Return contract instance from create2 deploy function
  • Add getDeployment helper to web package for easy access to deployment data
  • Update documentation in both main and contracts README

Example usage in web app:

import { getDeployment } from '@/lib/getDeployment'

const { address, abi } = getDeployment(chainId, 'Contract')

- Add saveDeployment helper to store contract data
- Return contract instance from create2 deploy
- Add getDeployment helper to web package
- Update documentation
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.

Get deployed contract address and ABI from Hardhat
2 participants