GithubHelp home page GithubHelp logo

massa-docs's People

Contributors

aoudiamoncef avatar aurelienft avatar ben-rey avatar bilboquet avatar damip avatar dr-chain avatar eitu33 avatar fsidhoum avatar github-actions[bot] avatar greglibert avatar jcbaillie avatar litchipi avatar longgamma-massa avatar massabot avatar mdipanjan avatar modship avatar omahs avatar peterjah avatar pymoussgithub avatar qdrn avatar slnpons avatar t1l3 avatar thomas-senechal avatar thykof avatar windushka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

massa-docs's Issues

Add a section for `massa-client` documentation

HELP of Massa client (list of available commands):
- help no args: display this help
- exit no args: exit the prompt
- node_unban_by_ip IpAddr1 IpAddr2 ...: unban given IP address(es)
- node_unban_by_id Id1 Id2 ...: unban given id(s)
- node_ban_by_ip IpAddr1 IpAddr2 ...: ban given IP address(es)
- node_ban_by_id Id1 Id2 ...: ban given id(s)
- node_stop no args: stops the node
- node_get_staking_addresses no args: show staking addresses
- node_start_staking Address1 Address2 ...: starts staking with the given addresses
- node_stop_staking Address1 Address2 ...: stops staking with the given addresses
- node_testnet_rewards_program_ownership_proof Address discord_id: generate the testnet rewards program node/staker ownership proof
- node_bootstrap_whitelist (add, remove or allow-all) [IpAddr]: Manage bootstrap whitelist IP address(es). No args returns the bootstrap whitelist
- node_bootstrap_blacklist (add or remove) [IpAddr]: Manage bootstrap blacklist IP address(es). No args returns the bootstrap blacklist
- node_peers_whitelist (add or remove) [IpAddr]: Manage peers whitelist IP address(es). No args returns the peers whitelist
- get_status no args: show the status of the node (reachable? number of peers connected, consensus, version, config parameter summary...)
- get_addresses Address1 Address2 ...: get info about a list of addresses (balances, block creation, ...)
- get_datastore_entry Address Key: get a datastore entry (key must be UTF-8)
- get_blocks BlockId: show info about a block (content, finality ...)
- get_endorsements EndorsementId1 EndorsementId2 ...: show info about a list of endorsements (content, finality ...)
- get_operations OperationId1 OperationId2 ...: show info about a list of operations(content, finality ...)
- get_filtered_sc_output_event start=slot_period,slot_thread end=slot_period,slot_thread emitter_address=Address caller_address=Address operation_id=OperationId is_final=bool is_error=bool: show events emitted by smart contracts with various filters
- wallet_info show-all-keys: show wallet info (addresses, balances ...)
- wallet_get_public_key Address1 Address2 ..: get public key of the given addresses
- wallet_get_secret_key Address1 Address2 ...: get secret key of the given addresses
- wallet_generate_secret_key no args: generate a secret key and add it into the wallet
- wallet_add_secret_keys SecretKey1 SecretKey2 ...: add a list of secret keys to the wallet
- wallet_remove_addresses Address1 Address2 ...: remove a list of addresses from the wallet
- wallet_sign Address string: sign provided string with given address (address must be in the wallet)
- buy_rolls Address RollCount Fee: buy rolls with wallet address
- sell_rolls Address RollCount Fee: sell rolls with wallet address
- send_transaction SenderAddress ReceiverAddress Amount Fee: send coins from a wallet address
- execute_smart_contract SenderAddress PathToBytecode MaxGas Fee: create and send an operation containing byte code
- call_smart_contract SenderAddress TargetAddress FunctionName Parameter MaxGas Coins Fee: create and send an operation to call a function of a smart contract
- read_only_execute_smart_contract PathToBytecode MaxGas Address IsFinal: execute byte code, address is optional, is_final is optional. Nothing is really executed on chain
- read_only_call TargetAddress TargetFunction Parameter MaxGas SenderAddress IsFinal: call a smart contract function, sender address is optional, is_final is optional. Nothing is really executed on chain
- when_episode_ends no args: show time remaining to end of current episode
- when_moon no args: tells you when moon

Describe custom serializers format

Actually, the only way to see how custom serializers works is to read the Rust code source.

It could be very interesting to add a documentation which describe how to serialize data.

It's useful for clients who don't use any SDK and builders who write SDKs in non supported languages.

E.g OperationSerialiozer

Improve and update SC documentation (Massa docs) (1/3)

The context

Our Documentation is quite outdated and hard to follow for audience that comes to check and explore Massa's power in practice. Adrien is leading this subject and different Massa departments are working on different segments.

The objective of Inno team is to focus on the most important new section called 'Web3 developers'. The section includes the following subjects:

Scope of the task:
Our target for this task is Smart-contract documentation draft

  • introduction
  • getting started
  • smart contract example (sum)

The deadline
1st of November (Tuesday) the draft
9th of November published finalized Documentation

The need

The audience who comes to explore Massa should be able to follow SC documentation to start with Massa's smart contracts and follow all examples which demonstrate the capabilities of our SCs.

Put yourself in the shoes of a new dev exploring Massa. How would you impress him with all your knowledge of our SC library?

How-to

Content:

  1. Existing subsections list -> update and improve.
  2. Specific focus on SC-examples -> should show the power of the latest version of the massa-sc-library, and provide end-to-end example of a project (for example Token contract or a DApp as in the current version).
  3. Add new subsections such as SC-Playground and others as you see necessary.
  4. We should cross-link important sections. For example: if we are mentioning Storage costs in the section, cross-link it to the Storage cost page if it makes sense.

Where:
Work directly in the Github Documentation repo (Adrien reviews all work on it).

Tech details:

Improve Autonomous SC section in Docs

The context:
@peterjah updated the example on ASC triggers last week.
Our ASC documentation currently has this content:

  • Intro: description of sendMessage ABI and available set of conditions
  • Link to the ticker example (sourcecode)
  • Different ways to execute smart contracts

The need:
Using Massa-in-action (MiA) product, create the first interactive documentation example for ASC (trigger contract), so that developers can see the code and it's explanation (usage, reasons, limitations if any), directly in an interactive documentation.

Additional step would be mocking function's execution in the MiA interface.

How-to:

Technical details:

Update and improve node docs

  • remove stuff specific to old testnets in the node setup page
  • add testnet16-specific stuff (eg. bootstrap, including whitelist)
  • under the "TODO" on the PoS explanation webpage, explain that those are things that are not there yet but that we expect to include in the future

@aoudiamoncef @AurelienFT can you have a quick look together ?

Typo

Je viens de tomber sur une petite coquille dans la docs (https://docs.massa.net/en/latest/general-doc/decentralized-web.html#rationale)
This attack vector has been well identified by exploiters and, as smart contracts become more robust exploiters are increasingly targeting front ends. For instance, in 2022, one of the major DeFi protocol, curve.finance, was victim of a DNS hijacking, with hackers being able to stole as much as 575$ 575k$ from users. As long as decentralized applications rely on web2 infrastuctures, these attacks are bound to happen regularly.

Improve onboarding process for smart contract devs

I've been putting myself in the shoes of a newcomer smart contract developer to the Massa ecosystem and I think the documentation needs clarification.
Obviously, the entry point for an SC dev is web3-dev/smart-contracts/getting-started. I think we should add a rationale at the beginning of this section as well as the prerequisites and a quick sum up of the step we are going to follow; e.g., 1. set up a SC project 2. Set up a client, 3. Set up a wallet, etc.

In web3-dev/smart-contracts/getting-started/#deploy-your-smart-contract, prior to explaining how to configure a wallet, we should clarify that the user needs a client.
Then, we should explain that there are two ways of creating a wallet, CLI and explorer.
Then at the end of the page, we should link the smart contract examples as well as the standards (Massa20, etc.)

Readme for Postman

Can you make a small readme that explains how to use the postman collection or redirect to a page that explain how to use it ?

Cmake is missing from dependencies in the documentation

Compiling a node on version 22 with cargo build --release --features sandbox will result in the following :
image

Cmake wasn't installed so it failed. We should add cmake to the docs where required.

Environment : Ubuntu 22.04.2 LTS

All Docu URLs to open in a new tab

Now they open in the same page. It would be better from the UX perspective not to have to go back-and-forth between resources and instructions given in the docu.

Update testnet doc with thyra node-manager plugin

Add node-manager plugin in the documentation so that community can start using it from next testnet.

This section will have to re-written as soon as Thyra is renamed and that its installation process is updated.

Toolkit

Right now in the documentation the recommended way to install the toolkit is the following:

npx @massalabs/sc-toolkit init my-sc

Currently, trying to build the helloworld SC returns the following error:

➜  ~/dev/massa-sc-examples/blog/my-sc (base) (massa-blog) ✗ npm run build                                                             127

> [email protected] build
> asc assembly/index.ts --target release --exportRuntime -o build/index.wasm && asc --transform transformer/file2base64.js assembly/main.ts --target release --exportRuntime -o build/main.wasm

ERROR TS2322: Type '~lib/string/String' is not assignable to type '~lib/staticarray/StaticArray<u8>'.
   :
 6 │ Storage.set('key', 'value');
   │             ~~~~~
   └─ in assembly/index.ts(6,14)

ERROR TS2322: Type '~lib/string/String' is not assignable to type '~lib/staticarray/StaticArray<u8>'.
   :
 6 │ Storage.set('key', 'value');
   │                    ~~~~~~~
   └─ in assembly/index.ts(6,21)

FAILURE 2 compile error(s)

Either we should keep the doc with a versioned toolkit that we update regularly or make sure that the main branch never has errors.

Let's take massalabs/massa-sc-toolkit#60 as the opportunity to tackle this issue as well.

cc @longgamma-massa @SlnPons

Autonomous SC documentation

There is currently very little info in the docs about autonomous SCs. We should explain how they work with schematics, how they are used, and link to examples

Fix localized doc sync

Since main is protected, we can't use Github Actions to push on main branch.
To fix this issue, we will use a Personal Access Token to be able to push on main branch.

Improve sc getting started

I believe that right now, the way option 1 and 2 of the getting started section are presented is confusing. It makes user believe that the two options does the same thing. That not the case as in option 1 it will deploy a SC that needs to be called while in option 2 it really executes the SC, effectively emitting the event.

I think we should clarify the difference, and also explain how to call the SC in the case of option 1.

Improve and update SC documentation (Massa docs) (2/3)

See related issue: #7

scope of the issue:

  • create a decentralized application with Thyra to interact with our smart contract

Use this paragraph is the introduction:

For the decentralized website part, we'll assume that you have some familiarity with HTML and JavaScript. If you want to have more details, you can follow `this great tutorial from React <https://reactjs.org/tutorial/tutorial.html>`_ from which the dApp is heavily inspired from.

Task: create a massa web3 subscetion and introduce the libraries (sdk, toolkit, web3...) and introduce the repo https://github.com/massalabs/massa-dapp-example-sum. list the prerequisites: smart contract, thyra

Doc or template outdated

Hi,

I encountered the issue where executing the command to set-up the main massa-sc template project I got several issues:

  • some packages where not up to date
  • the src/deploy.ts was outdated (using old version of deploySC() function)

Either it's because the version to call from the documentation has not been updated or the template itself is not up to date !

Have a nice day :)

Specify default client/SC-project config files in JSON-RPC documentation page

When developing on Massa, some users might not be running a local node. The current JSON-RPC documentation (https://docs.massa.net/en/latest/technical-doc/api.html) only specifies how to connect to a localhost node.

I've encountered friction when finding the correct client/SC-project config file. I think that it would be nice to have a page in the documentation that provides default configuration files to connect to the public RPC.

Preferably, this page should also explicitly specify the URL, IP and port of the public RPC.

Fix linter

I'm sorry it has come to that, but do you mind fixing the linter issues @thomas-senechal ? There is probably tools to (partly) automate the process.

Create a list of Massa public JSON RPC IP's and url

When creating a smart contract project or when configuring the CLI client, the documentation explains how to configure the RPC by copying the .env.exemple or the config.toml file.
While this seems sufficient for default configuration, I think we should add a page in the documentation that lists all the available networks and corresponding RPC URL and IP's, a bit like this for example https://rpc.info/
Moreover, I don't understand why the .env file of a smart contract project expects an URL while the client .toml file expects an IP.
I suggest that the .toml also accepts URLs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.