-
Notifications
You must be signed in to change notification settings - Fork 0
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
CU-8678g5b7w - Create an article on neo website explaining how to use… #3
base: dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First review iteration
tutorials/2023-11-06-offchain-sdk-ts-generation-with-cpm/index.md
Outdated
Show resolved
Hide resolved
tutorials/2023-11-06-offchain-sdk-ts-generation-with-cpm/index.md
Outdated
Show resolved
Hide resolved
tutorials/2023-11-06-offchain-sdk-ts-generation-with-cpm/index.md
Outdated
Show resolved
Hide resolved
tutorials/2023-11-06-offchain-sdk-ts-generation-with-cpm/index.md
Outdated
Show resolved
Hide resolved
tutorials/2023-11-06-offchain-sdk-ts-generation-with-cpm/index.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Second iteration
tutorials/2023-11-06-offchain-sdk-ts-generation-with-cpm/index.md
Outdated
Show resolved
Hide resolved
tutorials/2023-11-06-offchain-sdk-ts-generation-with-cpm/index.md
Outdated
Show resolved
Hide resolved
tutorials/2023-11-06-offchain-sdk-ts-generation-with-cpm/index.md
Outdated
Show resolved
Hide resolved
tutorials/2023-11-06-offchain-sdk-ts-generation-with-cpm/index.md
Outdated
Show resolved
Hide resolved
tutorials/2023-11-06-offchain-sdk-ts-generation-with-cpm/index.md
Outdated
Show resolved
Hide resolved
tutorials/2023-11-06-offchain-sdk-ts-generation-with-cpm/index.md
Outdated
Show resolved
Hide resolved
tutorials/2023-11-06-offchain-sdk-ts-generation-with-cpm/index.md
Outdated
Show resolved
Hide resolved
tutorials/2023-11-06-offchain-sdk-ts-generation-with-cpm/index.md
Outdated
Show resolved
Hide resolved
We recommend using [vite](https://vitejs.dev/guide/) to create your project from a template. You just need to run `npm create vite@latest` and select the prompts to generate your project. After creating your project, it's time to start using CPM to automate the off-chain SDK generation. | ||
|
||
## 2. Using CPM | ||
It's pretty easy to use CPM to add an off-chain SDK to your TypeScript project. After installing CPM, you can run it with a `cpm.yaml` or you could directly use the command prompt. In this tutorial, we will be using the easiest one to maintain. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's pretty easy to use CPM to add an off-chain SDK to your TypeScript project. After installing CPM, you can run it with a `cpm.yaml` or you could directly use the command prompt. In this tutorial, we will be using the easiest one to maintain. | |
It's pretty easy to use CPM to add an off-chain SDK to your TypeScript project. After installing CPM you can generate a single SDK directly from the command prompt or setup a configuration file that will be processed and allows for generating multiple SDKs at the same time. In this tutorial, we will be using the easiest one to maintain. |
The reason for my suggestion is that in the original text
you can run it with a
cpm.yaml
cpm.yaml
is mentioned for the first time in the article without having explained what it is. Not everybody might know that this is the configuration file.
## 2. Using CPM | ||
It's pretty easy to use CPM to add an off-chain SDK to your TypeScript project. After installing CPM, you can run it with a `cpm.yaml` or you could directly use the command prompt. In this tutorial, we will be using the easiest one to maintain. | ||
|
||
We need to generate a default `cpm.yaml` file by running `cpm init` on the terminal, it should create a file that is getting the [Props](https://github.com/CityOfZion/props) smart contract. While it is a useful contract, it's probably not the one you want, in this article, let's suppose we want to easily invoke functions from the [Neo Token contract](https://dora.coz.io/contract/neo3/mainnet/0xef4073a0f2b305a38ec4050e4d3d28bc40ea63f5). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to generate a default `cpm.yaml` file by running `cpm init` on the terminal, it should create a file that is getting the [Props](https://github.com/CityOfZion/props) smart contract. While it is a useful contract, it's probably not the one you want, in this article, let's suppose we want to easily invoke functions from the [Neo Token contract](https://dora.coz.io/contract/neo3/mainnet/0xef4073a0f2b305a38ec4050e4d3d28bc40ea63f5). | |
We need to generate a configuration file by running `cpm init` on the terminal. This creates a `cpm.yaml` file that by default gets the [Props](https://github.com/CityOfZion/props) smart contract. While it is a useful contract, it's probably not the one you want, in this article, let's suppose we want to easily invoke functions from the [Neo Token contract](https://dora.coz.io/contract/neo3/mainnet/0xef4073a0f2b305a38ec4050e4d3d28bc40ea63f5). |
Slightly modified to use stronger wording on the creation. Instead of assuming it might fail to create the file, we assume it will always be successful.
|
||
We need to generate a default `cpm.yaml` file by running `cpm init` on the terminal, it should create a file that is getting the [Props](https://github.com/CityOfZion/props) smart contract. While it is a useful contract, it's probably not the one you want, in this article, let's suppose we want to easily invoke functions from the [Neo Token contract](https://dora.coz.io/contract/neo3/mainnet/0xef4073a0f2b305a38ec4050e4d3d28bc40ea63f5). | ||
|
||
The `cpm.yaml` is divided into 4 different sections that will be tweaked to generate the desired SDK: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The `cpm.yaml` is divided into 4 different sections that will be tweaked to generate the desired SDK: | |
The configuration file is divided into 4 different sections that will be tweaked to generate the desired SDK: |
|
||
The `cpm.yaml` is divided into 4 different sections that will be tweaked to generate the desired SDK: | ||
- `defaults`: will indicate that we want to generate an off-chain TypeScript SDK inside the `src` folder and that we don't want to download the NEF and manifest; | ||
- `contracts`: will have the Neo Token contract that we want to generate; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `contracts`: will have the Neo Token contract that we want to generate; | |
- `contracts`: will have the Neo Token contract that we want to generate an SDK for; |
[RESOLVED]
|
… cpm for TS offchain sdk generation with neon-dappkit and wcsdk
31d5c9d
to
ca33af9
Compare
… cpm for TS offchain sdk generation with neon-dappkit and wcsdk