Skip to content

Commit 31992e9

Browse files
Feature/playground and aelf studio (#324)
* feat: Added todo-app example in playground and created aelf-studio vs-code extention documentation * fix: Updated aelf-studio documentation * fix: Reviewed and updated aelf-Studio tutorial * fix: added screen-shots * feat: added contract-view feature point * feat: complete the playground docs * fix: resolved conflicts * feat: added instruction for privatekey --------- Co-authored-by: vasmohi <[email protected]>
1 parent 7d33be0 commit 31992e9

14 files changed

+76
-14
lines changed

docs/tools/aelf-playground/index.md

Lines changed: 76 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Now as the workspace setup is done and project is setup inside aelf's playground
6666
- src/`ContractName`State.cs
6767

6868
Once all the changes are done in the above files and all other required files (whereever nacessary). Then below operations can be performed on the selected workspace project:
69-
1. **AI Audit**: Complete the AI audit of the writtwn smart contract. Result similar to below image will be visible once the AI audit completes. The interpretation of the AI audit results will be shown when you hover over the smart contract code once the audit finishes.
69+
1. **AI Audit**: Complete the AI audit of the written smart contract. Result similar to below image will be visible once the AI audit completes. The interpretation of the AI audit results will be shown when you hover over the smart contract code once the audit finishes.
7070

7171
![AI-Audit](/img/playground-9.png)
7272

@@ -85,41 +85,47 @@ Once all the changes are done in the above files and all other required files (w
8585
5. **Deploy**: Deploy the smart contract code on the aelf blockchain. It will show `Deploying` status when the user clicks the `Deploy` button and will output below result including `transactionId`, `proposal status` and `contract address` once the build process ends. You can verify the contract address by visiting [aelf testnet explorer](https://testnet.aelfscan.io/tDVW).
8686

8787
![Deploy](/img/playground-13.png)
88+
89+
6. **Contract Viewer**: The Contract Viewer in the Playground automatically appears after a smart contract is deployed, allowing users to test and interact with the contract immediately. This feature displays all available contract functions, both read and write, enabling users to execute them directly within the Playground. It provides a streamlined way to explore and perform actions on the contract without additional setup, making contract testing and function execution more accessible.
90+
91+
![Deploy](/img/contract-viewer.png)
8892

89-
6. **Export**: Export the project in a local directory. It will open an alert to save the workspace in the local directory. Users can rename the local directory.
93+
7. **Export**: Export the project in a local directory. It will open an alert to save the workspace in the local directory. Users can rename the local directory.
9094

9195
![Export](/img/playground-14.png)
9296

93-
7. **Share**: Share the project with a sharable link. It will show `Generating share link` status when the user clicks the `Share` button and will output below result including the sharable link.
97+
8. **Share**: Share the project with a sharable link. It will show `Generating share link` status when the user clicks the `Share` button and will output below result including the sharable link.
9498

9599
![Share](/img/playground-15.png)
96100

97-
8. **Command Line Options**: Command line additionally provides options to check txID and clear terminal including above options. Use the help command to see all the options inside terminal. `check txID` helps in checking the transaction details.
101+
9. **Command Line Options**: Command line additionally provides options to check txID and clear terminal including above options. Use the help command to see all the options inside terminal. `check txID` helps in checking the transaction details.
98102

99103
![Upload Files](/img/playground-16.png)
100104

101-
9. **Upload Files**: Upload more files to the project when necessary. It will show a `drag and drop files` section to drop files from the local directory.
105+
10. **Upload Files**: Upload more files to the project when necessary. It will show a `drag and drop files` section to drop files from the local directory.
102106

103107
![Upload Files](/img/playground-17.png)
104108

105-
10. **Add a New File**: Manually add a new file in the playground project structure. It will allow users to add a new file in the workspace project structure add smart contract code, new proto files, etc.
109+
11. **Add a New File**: Manually add a new file in the playground project structure. It will allow users to add a new file in the workspace project structure add smart contract code, new proto files, etc.
106110

107111
![Add a New File](/img/playground-18.png)
108112

109-
11. **Rename & Delete File**: `Renames` & `Deletes` the chosen file or folders in the project directory structure.
113+
12. **Rename & Delete File**: `Renames` & `Deletes` the chosen file or folders in the project directory structure.
110114

111115
![Add a New File](/img/playground-19.png)
112116

113-
12. **Tutorials**: Some pre-compiled tutorials are curated under `Tutorials` section of aelf-playground. It provides an option to filter the tutorials based on the difficulty level (`Beginner`, `Intermediate` & `Advanced`) and smart contracts languages (C# & Solidity).
117+
13. **Tutorials**: Some pre-compiled tutorials are curated under `Tutorials` section of aelf-playground. It provides an option to filter the tutorials based on the difficulty level (`Beginner`, `Intermediate` & `Advanced`) and smart contracts languages (C# & Solidity).
114118

115119
![Add a New File](/img/playground-20.png)
116120

117-
118-
13. **Deployments**: `Deployments` section provides a list of all deployed tutorials along with the wallet address used to deploy smart contracts on the aelf blockchain. You can click on the wallet address to view wallet details on the aelf explorer.
121+
14. **Deployments**: `Deployments` section provides a list of all deployed tutorials along with the wallet address used to deploy smart contracts on the aelf blockchain. You can click on the wallet address to view wallet details on the aelf explorer.
119122

120123
![Add a New File](/img/playground-21.png)
121124

122-
14. **Themes**: Users can also choose to toggle between `dark` and `light` themes.
125+
15. **Privatekey**: You can export your wallet's private key from the `Deployments` section. Simply click the eye icon to reveal the private key, which you can then copy.
126+
![Add a New File](/img/playground-24.png)
127+
128+
16. **Themes**: Users can also choose to toggle between `dark` and `light` themes.
123129

124130
![Add a New File](/img/playground-22.png)
125131

@@ -144,6 +150,8 @@ Now it's time to creat a Todo-dApp using playground.
144150

145151
![playground-example-img-3](/img/playground-example-img-3.png)
146152

153+
### Rename File Name
154+
147155
- Rename the proto file name `hello_world_contract.proto` inside folder `src/Protobuf/contract/` to `todo_app.proto`
148156

149157
![playground-example-img-4](/img/playground-example-img-4.png)
@@ -356,13 +364,23 @@ namespace AElf.Contracts.ToDo
356364
}
357365
```
358366

367+
### Ai Audit Report
368+
369+
- Click on AI Audit Icon to generate the AI Audit report.
370+
371+
![ai-audit-button-playground](/img/ai-audit-button-playground.png)
372+
373+
- The Report will be visible once the AI audit completes. It will provides suggestion for Todo functions as shown below so apply the suggetion and make your Todo smart contract more better.
374+
375+
![ai-audit-suggestion-playground](/img/ai-audit-suggestion-playground.png)
376+
377+
359378
### Save Gas Fee
360379

361-
- Click on Save Gas Fee Button and It will suggest to make changes if contract need to be optimised otherwise it shows result like below.
380+
- Click on Save Gas Fee Icon and It will suggest to make changes if contract need to be optimised otherwise it shows result like below.
362381

363382
![gas-fees-example-playground](/img/gas-fees-example-playground.png)
364383

365-
366384
### Building Smart Contract
367385

368386
- Click on Build Icon for generate the build.
@@ -373,6 +391,15 @@ namespace AElf.Contracts.ToDo
373391

374392
![playground-example-img-7](/img/playground-example-img-7.png)
375393

394+
<!-- ### Test Smart Contract
395+
396+
- Click on Test Icon for run the test cases.
397+
398+
![test-button-playground](/img/test-button-playground.png)
399+
400+
- Once Test cases run successfully, You will get result in terminal. -->
401+
402+
376403
### Deploy Smart Contract
377404

378405
- Click on Deploy Icon for deploy the smart contract.
@@ -383,6 +410,42 @@ namespace AElf.Contracts.ToDo
383410

384411
![playground-example-img-9](/img/playground-example-img-9.png)
385412

413+
### Contract Viewer
414+
415+
- The Contract Viewer will appear once your contract is successfully deployed, allowing you to execute all functions directly within the Playground.
416+
417+
![Deploy](/img/contract-viewer.png)
418+
419+
### Export Smart Contract
420+
421+
- Click on Export Icon for download the smart contract.
422+
423+
![export-button-playground](/img/export-button-playground.png)
424+
425+
- Once your smart contract exported successfully, You will get it in zip format like below.
426+
427+
![export-success-playground](/img/export-success-playground.png)
428+
429+
### Share Link
430+
431+
- Click on Share Icon to generate the share link of the smart contract.
432+
433+
![share-button-playground](/img/share-button-playground.png)
434+
435+
- Share link will be generated and You will get it in terminal.
436+
437+
![share-link-playground](/img/share-link-playground.png)
438+
439+
### Deployment
440+
441+
- Click on Deployment link to get deployment data of our recent deployed smart contract.
442+
443+
![deployment-button-playground](/img/deployment-button-playground.png)
444+
445+
- You will receive data about the deployed contract and wallet address, and you can click on them to view more details related to the wallet and contract.
446+
447+
![deployment-data-playground](/img/deployment-data-playground.png)
448+
386449
🎉 Congratulations, We got the contract address after successful deployment of todo-dapp smart contract using playground.
387450

388451
## Conclusion

docs/tools/aelf-studio-extention/index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ description: A tool to simplify building, testing, and deploying smart contracts
139139

140140
- It's advised to wait for sometime and click on **Check Audit Report** button to see the audit report.
141141

142-
143142
### Deploy the smart contract:
144143

145144
- Click the **aelf icon** again in the bottom right corner.
43.7 KB
Loading
339 KB
Loading

static/img/contract-viewer.png

223 KB
Loading
41.8 KB
Loading
98.2 KB
Loading
50.3 KB
Loading
62.9 KB
Loading

static/img/playground-21.png

-56.6 KB
Loading

0 commit comments

Comments
 (0)