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: add contracts tooling #635

Closed
wants to merge 143 commits into from
Closed

feat: add contracts tooling #635

wants to merge 143 commits into from

Conversation

luizstacio
Copy link
Member

@luizstacio luizstacio commented Dec 1, 2022

This PR implements fuels workflows CLI that helps developers to automate the process of build contracts, deploying, generating types, and replacing contract ids.

To automate the project the developer needs to;

  • Create a config file, fuels.config.ts with configs of paths, deploy, and output.
  • After the command fuels run the project is built and deploy in a single command.

This PR;

  • Create a folder workflow inside fuels to include all the actions that now live on the high-level CLI.
  • Add initial documentation on how to create the config file.
  • Change fuel-gauge to use forc workspaces
  • Change some project configurations enabling to use of the CLI locally this is been better addressed here chore: revamping build tooling #827.

Tutorial; (The names of CLI and config file are different from the video now fuels-contracts is fuels and contracts.config.ts is fuels.config.ts)

output.mp4

@luizstacio luizstacio linked an issue Dec 1, 2022 that may be closed by this pull request
@arboleya
Copy link
Member

arboleya commented Dec 2, 2022

@luizstacio FYI, I dropped yargs in favor of commander. 😅

Forgot to mention you on this one; maybe it slipped through your notifications.

@luizstacio luizstacio self-assigned this Dec 7, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Dec 24, 2022

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements
95.04% (+0.05% 🔼)
4831/5083
🟢 Branches
83.56% (+0.04% 🔼)
844/1010
🟢 Functions
92% (+0.01% 🔼)
932/1013
🟢 Lines
94.93% (+0.05% 🔼)
4628/4875
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟢
... / index.ts
100% 100% 100% 100%
🟢
... / createConfig.ts
66.67% 100% 50% 100%
🟢
... / types.ts
100% 100% 100% 100%
🟢
... / mockForcFiles.ts
100% 100% 100% 100%
🟢
... / index.ts
100% 100% 100% 100%
🟢
... / index.ts
100% 100% 100% 100%
🟢
... / forcVersion.ts
100% 100% 100% 100%
🟢
... / utils.ts
100% 100% 100% 100%
🟢
... / types.ts
100% 100% 100% 100%
🟢
... / index.ts
100% 100% 100% 100%
🟢
... / createWallet.ts
100% 100% 100% 100%
🟢
... / deployContract.ts
100% 100% 100% 100%
🟢
... / index.ts
100% 100% 100% 100%
🟢
... / logger.ts
100% 100% 100% 100%
🟢
... / saveContractIds.ts
100% 100% 100% 100%
🟢
... / getDeployConfig.ts
100% 100% 100% 100%
🟢
... / deploy.ts
100% 100% 100% 100%
🟢
... / index.ts
100% 100% 100% 100%
🟡
... / cli.ts
63.16% 100% 50% 63.16%
🟢
... / index.ts
100% 100% 100% 100%
🟢
... / types.ts
94.74% 100% 100% 94.74%
🟢
... / index.ts
100% 100% 100% 100%
🟢
... / index.hbs.ts
100% 100% 100% 100%
🟢
... / run.ts
100% 100% 100% 100%
🟢
... / createAction.ts
100% 75% 100% 100%
🟢
... / loadConfig.ts
97.5% 61.54% 100% 97.44%
🟢
... / validateConfig.ts
100% 100% 100% 100%
🟢
... / createConfigFile.ts
83.33% 100% 50% 83.33%
🟢
... / fuels.config.ts
100% 100% 100% 100%
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢 fuels/src/index.ts 100% 100%
50% (-50% 🔻)
100%
🟢
... / runTypegen.ts
97.56% (-2.44% 🔻)
100% 100%
97.44% (-2.56% 🔻)

Test suite run success

794 tests passing in 123 suites.

Report generated by 🧪jest coverage report action from f3a98f0

packages/contracts/src/actions/buildContracts.ts Outdated Show resolved Hide resolved
packages/contracts/src/actions/getWalletInstance.ts Outdated Show resolved Hide resolved
packages/contracts/src/actions/typegen/buildTypes.ts Outdated Show resolved Hide resolved
@arboleya
Copy link
Member

Closing in favor of #1291

@arboleya arboleya closed this Sep 25, 2023
@arboleya arboleya mentioned this pull request Sep 28, 2023
@arboleya arboleya deleted the ls/contracts-cli branch February 26, 2024 15: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.

Add contracts tooling from swayswap to fuels-ts
5 participants