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: support configurables in typegen #1031

Merged
merged 25 commits into from
Jun 6, 2023

Conversation

danielbate
Copy link
Member

@danielbate danielbate commented May 30, 2023

Following the support of configurable constants in #998, this PR will infer the configurables from ABI and generate the appropriate type for all program types. Additionally, for predicates, this is also passed to the autogenerated predicate factory.

Closes #1014

@danielbate danielbate self-assigned this May 30, 2023
@github-actions
Copy link
Contributor

github-actions bot commented May 30, 2023

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements
84.69% (+0.1% 🔼)
4529/5348
🟡 Branches 64.44% 647/1004
🟡 Functions
69.48% (+0.17% 🔼)
733/1055
🟢 Lines
84.9% (+0.1% 🔼)
4369/5146
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟢
... / parseConfigurables.ts
100% 100% 100% 100%
🟢
... / makeConfigurable.ts
100% 100% 100% 100%
🟢
... / Configurable.ts
100% 100% 100% 100%
🟢
... / formatConfigurables.ts
100% 100% 100% 100%

Test suite run success

981 tests passing in 176 suites.

Report generated by 🧪jest coverage report action from 5d042f4

Copy link
Member

@arboleya arboleya left a comment

Choose a reason for hiding this comment

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

Great work on this! 🤘

Left a few trivial observations.

packages/abi-typegen/src/templates/contract/dts.hbs Outdated Show resolved Hide resolved
packages/abi-typegen/src/utils/makeConfigurable.test.ts Outdated Show resolved Hide resolved
packages/abi-typegen/src/utils/parseConfigurables.test.ts Outdated Show resolved Hide resolved
packages/fuels/package.json Outdated Show resolved Hide resolved
danielbate and others added 6 commits May 31, 2023 12:11
@danielbate danielbate requested a review from arboleya May 31, 2023 15:17
Copy link
Member

@arboleya arboleya left a comment

Choose a reason for hiding this comment

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

Solid. 💯

@danielbate danielbate enabled auto-merge (squash) June 1, 2023 20:12
@danielbate danielbate merged commit c271633 into master Jun 6, 2023
@danielbate danielbate deleted the db/feat/support-configurables-in-typegen branch June 6, 2023 10:13
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.

Typegen - predicate typegen to support configurable constants
3 participants