Skip to content
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

100 massa web3 page #105

Closed
wants to merge 57 commits into from
Closed

100 massa web3 page #105

wants to merge 57 commits into from

Conversation

julienbrs
Copy link
Contributor

No description provided.

@julienbrs julienbrs self-assigned this Jun 30, 2023
@julienbrs julienbrs linked an issue Jun 30, 2023 that may be closed by this pull request
4 tasks
@julienbrs julienbrs requested review from gregLibert and qdrn July 3, 2023 12:36
@qdrn
Copy link
Contributor

qdrn commented Jul 3, 2023

Can you fix the CI @julienbrs ?

@julienbrs
Copy link
Contributor Author

@gregLibert here is the first draft of the dev-doc for massa-web3. For now, I have implemented the "How to get started" section (in massa-web3.mdx) and detailed descriptions of wallet API operations (in wallet.mdx). Before applying this style to the remaining three sections, I wanted to make sure it fits what you were thinking. Massa-web3 docu-dev page is detailed, while the README of the repo will be simplified by removing almost all code snippets removed, making it similar to the other massa READMEs.

I also wasn't sure if I should include a reference to the GitHub code line for each operation (like this: Defined in [src/web3/WalletClient.ts:314](https://github.com/massalabs/massa-web3/blob/41f5634/src/web3/WalletClient.ts#L314) ). I have included this for the first two operations in wallet.mdx so you can see what it looks like.

@julienbrs
Copy link
Contributor Author

Can you fix the CI @julienbrs ?

done!

@qdrn
Copy link
Contributor

qdrn commented Jul 3, 2023

I think the general structure is ok. If we go in that direction then we should make sure that the documentation is always synced with what is being done in the massa-web3 repo.
Maybe make utility its own section ?

I have some remarks regarding english but this can be addressed once we have a first version.

Side note: we could use this plugin to generate the TS doc of our libraries.

@julienbrs
Copy link
Contributor Author

I think the general structure is ok. If we go in that direction then we should make sure that the documentation is always synced with what is being done in the massa-web3 repo. Maybe make utility its own section ?

I have some remarks regarding english but this can be addressed once we have a first version.

Side note: we could use this plugin to generate the TS doc of our libraries.

The utility section seems like a good idea indeed.
Maybe we could create a comprehensive integration test that gathers all the code snippets present in docu-dev, so we can identify any broken example code. There are already some integration tests in the massa-web3 repo, we could adapt them to fit our needs?

@qdrn
Copy link
Contributor

qdrn commented Jul 4, 2023

Maybe we could create a comprehensive integration test that gathers all the code snippets present in docu-dev, so we can identify any broken example code. There are already some integration tests in the massa-web3 repo, we could adapt them to fit our needs?

You mean for the CI or as an example for users ? Not sure I understand exactly what you propose.

@julienbrs
Copy link
Contributor Author

We could put all the code examples that are in the docu-dev in an integration tests that would run in the CI. If the CI breaks we would know that we'll have to update the docu-dev. That kind of CI could for example run once per day.

@qdrn
Copy link
Contributor

qdrn commented Jul 5, 2023

We could put all the code examples that are in the docu-dev in an integration tests that would run in the CI. If the CI breaks we would know that we'll have to update the docu-dev. That kind of CI could for example run once per day.

That would be quite nice indeed!

@qdrn qdrn mentioned this pull request Jul 10, 2023
@julienbrs julienbrs requested a review from qdrn July 13, 2023 13:51
Copy link
Contributor

@qdrn qdrn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are almost there.

Don't be afraid of all the comment. It's quite a nice work overall !

docs/build/massa-web3/massa-web3.mdx Show resolved Hide resolved
docs/build/massa-web3/massa-web3.mdx Outdated Show resolved Hide resolved
docs/build/massa-web3/massa-web3.mdx Outdated Show resolved Hide resolved
docs/build/massa-web3/events.mdx Outdated Show resolved Hide resolved
docs/build/massa-web3/events.mdx Outdated Show resolved Hide resolved

### Read operations

Smart contract data can be read via the `readSmartContract` method. It executes a dry run Smart contract call and returns some data regarding
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's probably a confusion with the executeReadOnly method ?


Defined in [src/web3/SmartContractsClient.ts:169](https://github.com/massalabs/massa-web3/blob/41f5634/src/web3/SmartContractsClient.ts#L169)

### Read a contract with an other contract
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See remark for ExecuteReadOnly


### getProtofiles

Get the proto file of the contracts from the Massa Blockchain. It takes an array of contract addresses as parameter and returns the array of
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is something very specific to Massa. We need to give more context! Maybe somewhere else and cross reference.

docs/build/massa-web3/utils.mdx Outdated Show resolved Hide resolved
docs/build/massa-web3/wallet.mdx Outdated Show resolved Hide resolved
julienbrs and others added 4 commits July 13, 2023 17:56
Co-authored-by: Adrien LF <alf@massa.net>
Co-authored-by: Adrien LF <alf@massa.net>
Co-authored-by: Adrien LF <alf@massa.net>
Co-authored-by: Adrien LF <alf@massa.net>
If no executor is provided, the default wallet account from the provided WalletClient will be used.

```typescript
const opId: string = await web3Client.smartContracts().deploySmartContract(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is a maxCoins parameter as well now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may apply elsewhere as well!

julienbrs and others added 18 commits July 24, 2023 09:53
Co-authored-by: Adrien LF <alf@massa.net>
Co-authored-by: Adrien LF <alf@massa.net>
Co-authored-by: Adrien LF <alf@massa.net>
Co-authored-by: Adrien LF <alf@massa.net>
Co-authored-by: Adrien LF <alf@massa.net>
Co-authored-by: Adrien LF <alf@massa.net>
Co-authored-by: Adrien LF <alf@massa.net>
Co-authored-by: Adrien LF <alf@massa.net>
Co-authored-by: Adrien LF <alf@massa.net>
Co-authored-by: Adrien LF <alf@massa.net>
Co-authored-by: Adrien LF <alf@massa.net>
Co-authored-by: Adrien LF <alf@massa.net>
Co-authored-by: Adrien LF <alf@massa.net>
@julienbrs
Copy link
Contributor Author

julienbrs commented Jul 24, 2023

I'm closing this PR to open a new one with the new direction decided for the massa-web3 docudev.

@julienbrs julienbrs closed this Jul 25, 2023
@julienbrs julienbrs removed a link to an issue Jul 26, 2023
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants