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

feat(cast): add artifact method #9249

Merged
merged 4 commits into from
Nov 11, 2024
Merged

feat(cast): add artifact method #9249

merged 4 commits into from
Nov 11, 2024

Conversation

pawurb
Copy link
Contributor

@pawurb pawurb commented Nov 1, 2024

Motivation

Building up on #9029 , this PR adds artifact method. It produces a JSON file that can be used with sol! macro to deploy contracts locally.

Usage

cast artifact 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 --etherscan-api-key $API_KEY --rpc-url $ETH_RPC_URL -o weth.json

Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense, lgtm
pending @grandizzy

Copy link
Collaborator

@grandizzy grandizzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you! there is a nit and a change that needs to be done in order to work for other chains but mainnet, pls check

crates/cast/bin/cmd/artifact.rs Outdated Show resolved Hide resolved
crates/cast/bin/cmd/artifact.rs Outdated Show resolved Hide resolved
@pawurb pawurb requested a review from grandizzy November 11, 2024 14:56
Copy link
Collaborator

@grandizzy grandizzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm, thanks!

@mattsse mattsse merged commit f8d9234 into foundry-rs:master Nov 11, 2024
21 checks passed
rplusq pushed a commit to rplusq/foundry that referenced this pull request Nov 29, 2024
* feat(cast): add artifact method

* Remove unneeded clone

* Get chain info from provider

* Rebase fix
@grandizzy grandizzy added T-feature Type: feature C-cast Command: cast labels Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cast Command: cast T-feature Type: feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants