Support for generating transaction documents for blocto
This repo: https://github.com/portto/flow-transactions contains transactions that the blocto wallet will show in a localized manner depending on the language you have chosen. It will also allow the blocto popup to fill up funds if you have specified an argument as a certain type of wallet FUSD/Flow.
It would be very nice if there was a way to generate the cdc transaction files resolved in the manner that blocto required. The requirements are:
- camelCase transaction names
- imports in the form of 0X_<SOLUTION>_ADDRESS
- SOLUTION here is the name of an account so to speak. So all Versus contracts use the same 0X_VERSUS_ADDRESS. This is done to keep the global address file to a minimal.
It would be nice to pregenerate the json file from the source of truth in the transaction file. This could for instance be down with doctags.
This issue is mainly made to start the discussion and hear what the maintainers here think about this.
I have started some work in my fork of cli here https://github.com/bjartek/flow-cli
Reason:
- Right now blocto has their own way of doing this, but this is a feature other wallets would want to support as well and it would benefit the entire ecosystem if there was a standard way of doing this.
If I understand the problem correctly, it might be a good idea to include this as part of the Cadence linting process. Anyway we make transaction code look more concise between projects is good in my opinion but I have doubts that the CLI is the right domain, I see the CLI just as an execution environment for such a tool (we have some discussion as we speak about such a tool, but can't yet share much on that).
@bjartek any updates on this?
I have some code that transactions resolved to a network. So it geneerates the final form in the blocto repo and not the middle step. It was easier that way. I have not had time to look at it in a while.
https://github.com/bjartek/overflow/blob/main/overflow/parse.go
You want me to contribute this back to flowkit?
@bjartek sorry I was just removing myself as an assignee from tasks that are not in progress since they might be redistributed to others. For this task, I actually thought since you wrote you have some WIP on a fork that you might implement it, but maybe if you can provide an update would be good too.
For me the interesting aspect here is really if it worth it. Both dapper and blocto have approved tx repos that work differently. This will just be a third way and I am not sure it is worth the time if they want to keep things with their own templating code.
This is not relevant anymore. See FLIX issues.