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: adding support for proxy contracts in fuels deploy #3190

Merged
merged 83 commits into from
Sep 26, 2024

Conversation

arboleya
Copy link
Member

@arboleya arboleya commented Sep 19, 2024

Closes TS-632

Release notes

In this release, we:

  • Added support for proxy contracts in fuels deploy

Summary

This PR adds support for proxy contracts, following the:

The CLI command fuels deploy mimics the behavior from forc-deploy:

Note

For an overview, refer also to this flowchart.

Trying it out

To test it out using this PR's tag:

pnpm create fuels@pr-3190 --pnpm proxy-test --no-install && \
  cd proxy-test && \
  pnpm install

Then, choose a contract and enable proxy on its closest Forc.toml file:

Important

If all works well, when you start your app in dev mode via fuels dev, you'll see that although the contract is re-deployed after being modified, its ID stays the same in the contracts.json file. This happens because that's the ID of the proxy, not the underlying target contract.

Checklist

  • All changes are covered by tests (or not applicable)
  • All changes are documented (or not applicable)
  • I reviewed the entire PR myself (preferably, on GH UI)
  • I described all Breaking Changes (or there's none)

@arboleya arboleya added the feat Issue is a feature label Sep 19, 2024
Copy link

vercel bot commented Sep 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
create-fuels-template ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 26, 2024 10:17am
ts-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 26, 2024 10:17am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
create-fuels-counter-example ⬜️ Ignored (Inspect) Sep 26, 2024 10:17am

Copy link

codspeed-hq bot commented Sep 19, 2024

CodSpeed Performance Report

Merging #3190 will improve performances by ×2.6

Comparing aa/feat/support-deploying-proxy-contracts (b93730c) with master (e7c2c30)

Summary

⚡ 1 improvements
✅ 20 untouched benchmarks

Benchmarks breakdown

Benchmark master aa/feat/support-deploying-proxy-contracts Change
Instantiate a new Unlocked wallet 106 ms 40.8 ms ×2.6

Copy link
Member

@maschad maschad left a comment

Choose a reason for hiding this comment

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

Nice work

Copy link
Contributor

Coverage Report:

Lines Branches Functions Statements
77.19%(+0.02%) 71.89%(+0.08%) 75.77%(+0%) 77.33%(+0.05%)
Changed Files:
Ok File (✨=New File) Lines Branches Functions Statements
🔴 packages/create-fuels/src/cli.ts 87.95%
(+0.78%)
47.61%
(+0.25%)
100%
(+0%)
87.95%
(+0.78%)
🔴 ✨ packages/fuels/scripts/build-proxy-contract.ts 0%
(+0%)
100%
(+100%)
100%
(+100%)
0%
(+0%)
🔴 packages/fuels/src/cli/commands/deploy/deployContract.ts 100%
(+0%)
83.33%
(+33.33%)
100%
(+0%)
100%
(+0%)
🔴 ✨ packages/fuels/src/cli/commands/deploy/proxy/types/Src14OwnedProxy.ts 83.33%
(+83.33%)
100%
(+100%)
75%
(+75%)
91.66%
(+91.66%)
🔴 ✨ packages/fuels/src/cli/commands/deploy/proxy/types/Src14OwnedProxyFactory.ts 66.66%
(+66.66%)
0%
(+0%)
66.66%
(+66.66%)
66.66%
(+66.66%)
🔴 packages/fuels/src/cli/config/forcUtils.ts 92.98%
(-7.02%)
80%
(-20%)
100%
(+0%)
93.44%
(-6.56%)

@arboleya arboleya merged commit 3ad28bf into master Sep 26, 2024
24 checks passed
@arboleya arboleya deleted the aa/feat/support-deploying-proxy-contracts branch September 26, 2024 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Issue is a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for proxy contracts in fuels deploy
8 participants