|
1 | | -# Hello World Sample |
2 | | - |
3 | | -This is a Hello World example that shows you how to use VS Code API. |
4 | | - |
5 | | -Guide for this sample: https://code.visualstudio.com/api/get-started/your-first-extension. |
6 | | - |
7 | | -## Demo |
8 | | - |
9 | | - |
10 | | - |
11 | | -## VS Code API |
12 | | - |
13 | | -### `vscode` module |
14 | | - |
15 | | -- [`commands.registerCommand`](https://code.visualstudio.com/api/references/vscode-api#commands.registerCommand) |
16 | | -- [`window.showInformationMessage`](https://code.visualstudio.com/api/references/vscode-api#window.showInformationMessage) |
17 | | - |
18 | | -### Contribution Points |
19 | | - |
20 | | -- [`contributes.commands`](https://code.visualstudio.com/api/references/contribution-points#contributes.commands) |
21 | | - |
22 | | -## Running the Sample |
23 | | - |
24 | | -- Run `npm install` in terminal to install dependencies |
25 | | -- Run the `Run Extension` target in the Debug View. This will: |
26 | | - - Start a task `npm: watch` to compile the code |
27 | | - - Run the extension in a new VS Code window |
| 1 | +# StarkEx |
| 2 | + |
| 3 | +A Vscode plugin for **[Starknet](https://www.starknet.io/en) Developers Community** in which smart contract developers can perform the following features: |
| 4 | + |
| 5 | +- Create account |
| 6 | +- Deploy account |
| 7 | +- Compile cairo smart contracts |
| 8 | +- Declare cairo smart contracts |
| 9 | +- Deploy cairo smart contracts |
| 10 | +- Interaction with cairo smart contracts |
| 11 | + |
| 12 | +# Starkex usage instruction |
| 13 | + |
| 14 | +## Account Creation |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | +## Contract Deployment & Interaction |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | +1. **activate starkex extension:** |
| 25 | + - A new folder with the title `starkex` generate in the current working directory to store contract logs. |
| 26 | + |
| 27 | +2. **Select starknet network:** |
| 28 | + - Currently, the extension only supports `goerli-alpha` network. **(only select `goerli-alpha` network for contract execution).** |
| 29 | +3. **Create starkex new account:** |
| 30 | + - Creates new undeployed account for contract interaction. |
| 31 | + - It uses openzeppelin account standards. |
| 32 | +4. **Select starkex undeployed account:** |
| 33 | + - Selected undeployed account for deployment. |
| 34 | +5. **Deploy starkex new account:** |
| 35 | + - Deploy selected undeployed account on-chain. |
| 36 | +6. **Select starkex account:** |
| 37 | + - Select an on-chain deployed account for contract interaction. |
| 38 | + - on-chain deployed accounts are used for contract interaction. |
| 39 | +7. **Select cairo contract:** |
| 40 | + - Select compiled cairo contract. |
| 41 | + - The .json file should be present in root directory of the project. |
| 42 | + - After selecting the contact a folder containing two files will be generated in starkex folder. |
| 43 | + - `starkex/fileName/fileName_address.json` stores the address and classHash info of the cairo contract. |
| 44 | + - `starkex/fileName/fileName_abi.json` contains abi of selected Cairo contract for contract interaction. |
| 45 | +8. **Declare cairo contract:** |
| 46 | + - Declare selected cairo contract on-chain. (**Note:** before declaring and deploying the contract, the classHash of the selected contract must be present in the `starkex/fileName/fileName_address.json.` classHash field. |
| 47 | +9. **Deploy cairo contract:** |
| 48 | + - Deploy selected cairo contract on-chain. |
| 49 | + - paste deployed contract address into file `starkex/fileName/fileName_address.json.` address field. |
| 50 | +10. **Call contact method:** |
| 51 | + - Call contract methods present in cairo contract. |
| 52 | + - The view type function can be called by just selecting the contract. |
| 53 | + - other functions can be called by entering values in the JSON file. |
| 54 | + |
| 55 | + `starkex/fileName/fileName_abi.json` |
0 commit comments