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

FEATURE: Javascript templates and contracts package #93

Open
joshuahannan opened this issue Feb 4, 2021 · 2 comments
Open

FEATURE: Javascript templates and contracts package #93

joshuahannan opened this issue Feb 4, 2021 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@joshuahannan
Copy link
Contributor

Issue To Be Solved

We current have a go package for getting transaction templates, but we should also have a javascript package so users of the contracts can import and use the correct versions without having to copy and paste.

Suggest A Solution

Create a lib/go/javascript/templates package that does a similar thing to the lib/go/templates package.
It should use the transactions and scripts in transactions/ as a source of truth, replace the import addresses with user provided addresses, and return the correct transaction texts.

@joshuahannan joshuahannan added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Feb 4, 2021
@marcusmolchany
Copy link
Contributor

might be able to help with this one but i think i need some more deets. is this just string replacing the addresses? also is this for a node environment?

@joshuahannan
Copy link
Contributor Author

Thank you for offering to help @marcusmolchany! Yeah, I kind of just intended it for string replacing the addresses, but there is another PR in the core contracts repo that someone else was working on for this exact feature that might be useful to you: onflow/flow-core-contracts#116
You could potentially connect with Max (the author) and discuss what you think might be best for something like this.

There also were some recent features added to the CLI to allow importing contracts from files that serve as aliases for addresses on different networks: onflow/flow-cli#30 so there are some ideas to start using something like that instead of string replacing. Example in the kitty items repo here: onflow/kitty-items#32

I apologize for the deluge of information. We'd love your input on these if you'd like to contribute! And we'll definitely need help converting this repo to use something like that when the designs are more finalized.

Thanks again for reaching out! 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants