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

fix: typegen and storage slots integration #3396

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

nedsalk
Copy link
Contributor

@nedsalk nedsalk commented Nov 14, 2024

Summary

This PR fixes integration of typegen'd storage slots with the ContractFactory.deployAsCreateTx and ContractFactory.deployAsBlobTx methods by making it possible to specify deployOptions in the ContractFactory constructor, passing the storage slots via the constructor in typegen'd factories, and using them in those methods.

This approach also enables us to remove the override of the deploy method in typegen.

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)

@nedsalk nedsalk self-assigned this Nov 14, 2024
@nedsalk nedsalk added the bug Issue is a bug label Nov 14, 2024
Copy link

vercel bot commented Nov 14, 2024

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

Name Status Preview Comments Updated (UTC)
fuels-template ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 15, 2024 9:44am
ts-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 15, 2024 9:44am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
ts-docs-api ⬜️ Ignored (Inspect) Nov 15, 2024 9:44am

Copy link

codspeed-hq bot commented Nov 14, 2024

CodSpeed Performance Report

Merging #3396 will not alter performance

Comparing ns/fix/typegen-storage-slot-integration (99c2482) with master (d8232a6)

Summary

✅ 18 untouched benchmarks

@nedsalk nedsalk force-pushed the ns/fix/typegen-storage-slot-integration branch from 139be6d to e7d6196 Compare November 15, 2024 09:01
Copy link
Contributor

Coverage Report:

Lines Branches Functions Statements
64.13%(-0.07%) 69.61%(-0.04%) 72.64%(-0.35%) 64.57%(-0.07%)
Changed Files:
Ok File (✨=New File) Lines Branches Functions Statements
🔴 apps/docs-snippets2/src/typegend/contracts/MyContractFactory.ts 60%
(-6.66%)
0%
(+0%)
50%
(-16.66%)
60%
(-6.66%)
🔴 packages/contract/src/contract-factory.ts 34.24%
(+1.64%)
30.43%
(+3.77%)
33.33%
(-1.45%)
33.33%
(+1.42%)
🔴 packages/fuels/src/cli/commands/deploy/proxy/types/Src14OwnedProxyFactory.ts 40%
(+6.67%)
0%
(+0%)
0%
(+0%)
40%
(+6.67%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Typegen'd contract factories don't properly integrate storage slots for deployment methods
2 participants