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

Add contracts tooling from swayswap to fuels-ts #631

Closed
luizstacio opened this issue Nov 30, 2022 · 2 comments · Fixed by #1291
Closed

Add contracts tooling from swayswap to fuels-ts #631

luizstacio opened this issue Nov 30, 2022 · 2 comments · Fixed by #1291
Assignees

Comments

@luizstacio
Copy link
Member

Description

Currently, on swayswap, we created a CLI tool that helps in the development cycle by making the process of building, deploying, and replacing contract IDs simpler by executing a single command.

This CLI flow works this way;

  • The developer creates a config file with the following;
    • Contracts path folder
    • The output folder for the types that are going to be generated
    • A postscript that enables the auto-replace of contract IDs after the build is complete anywhere on the application.
  • When executing deploy command;
    • Build
    • Deploy
    • Replace

This way, for example, a frontend application can be auto-refreshed with the new contract ids after a single command to build and deploy contracts changes.

SwaySwap tool: https://github.com/FuelLabs/swayswap/tree/master/packages/scripts

Implementation expected

Port the current scripts tool to fuels-ts refactoring and removing specific application code, making it simple to use inside any application.

The CLI command will be following the pattern created on #570, where the CLI will be inside fuels workspace tool and accessible by executing fuels contracts <command>.

@luizstacio luizstacio self-assigned this Nov 30, 2022
@luizstacio luizstacio linked a pull request Dec 1, 2022 that will close this issue
@arboleya
Copy link
Member

arboleya commented Dec 1, 2022

Aside from the configurable options made available on the config, does the tool require users to follow any other specific conventions? Those could be regarding file structure, nomenclatures, or anything else that is assumed (or expected) to be a certain way.

@luizstacio
Copy link
Member Author

Aside from the configurable options made available on the config, does the tool require users to follow any other specific conventions? Those could be regarding file structure, nomenclatures, or anything else that is assumed (or expected) to be a certain way.

No, the initial idea is to be very customizable. This is why the config is also a script, not a standard JSON.

@arboleya arboleya reopened this Sep 25, 2023
@arboleya arboleya linked a pull request Sep 25, 2023 that will close this issue
@arboleya arboleya assigned arboleya and unassigned arboleya Oct 24, 2023
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 a pull request may close this issue.

2 participants