We have a new Specification feature to help decode abi-encoded data on the input's payload. The created specs persist on local storage and belong to the domain where you run the web application (e.g., localhost). So, to avoid the tedious task of recreating them every time you run the App in a different domain, an import/export feature will be helpful.
✔️ Solution
Create a versioned importer/exporter. The exporter should generate a JSON file with specific properties (described below). The importer should be able to accept only JSON extensions and work on the designated version.
The export action should be visible when at least one specification is created.
Exported file name to be cartesiscan_specifications.json
All specifications should be exported. Filtering does not affect the exported result (i.e. filter by JSON ABI / ABI Params).
The import action should be available when no specifications are created (adjust the existing messages to accommodate the import). It should also be available when there are one or more specifications.
Handle all possible points of error when reading the imported file and notify the user as such. e.g., the exported version does not match, meaning the file was tampered with.
Limit the possible file extensions to be imported to only .json;
📄 Context
We have a new Specification feature to help decode abi-encoded data on the input's payload. The created specs persist on local storage and belong to the domain where you run the web application (e.g., localhost). So, to avoid the tedious task of recreating them every time you run the App in a different domain, an import/export feature will be helpful.
✔️ Solution
Create a versioned importer/exporter. The exporter should generate a JSON file with specific properties (described below). The importer should be able to accept only JSON extensions and work on the designated version.
cartesiscan_specifications.json
.json
;Example of Data Format
References:
Web APIs: URL , Blob, File.
📈 Subtasks
🎯 Definition of Done