From 806e34533e135c6e6b95cfa428d2e6db5a0fb297 Mon Sep 17 00:00:00 2001 From: vasmohi Date: Wed, 26 Jun 2024 09:32:59 +0530 Subject: [PATCH] Added naming convension according to kebab-case and dashes --- .../command-line-Interface/Commands.md | 885 ------------------ .../command-line-Interface/Introduction.md | 235 ----- .../command-line-Interface/_category_.json | 4 - .../index.md | 0 .../index.md | 0 .../index.md | 0 .../index.md | 0 .../index.md | 0 .../Commands => aelf-cli/commands}/index.md | 0 docs/Tools/{aelf CLI => aelf-cli}/index.md | 0 .../introduction}/index.md | 0 .../C# SDK => chain-sdk/c#-sdk}/index.md | 0 .../Go SDK => chain-sdk/go-sdk}/index.md | 0 docs/Tools/{Chain SDK => chain-sdk}/index.md | 0 .../Java SDK => chain-sdk/java-sdk}/index.md | 0 .../javascript-sdk}/index.md | 0 .../PHP SDK => chain-sdk/php-sdk}/index.md | 0 .../python-sdk}/index.md | 0 .../index.md | 0 .../index.md | 0 .../developing-smart-contracts}/index.md | 0 .../development-environment}/index.md | 0 .../index.md | 0 .../overview}/index.md | 0 .../index.md | 0 .../run-a-mainnet-node}/index.md | 0 .../run-a-side-chain}/index.md | 0 .../run-a-testnet-node}/index.md | 0 .../run-aelf-on-cloud}/index.md | 0 .../index.md | 0 .../become-a-node-operator}/index.md | 0 .../index.md | 0 .../explore-running-aelf-side-chain}/index.md | 0 docs/{Quick Start => quick-start}/index.md | 0 .../intro-to-aelf-development}/index.md | 0 .../run-a-side-chain}/index.md | 0 .../index.md | 0 .../association-contract}/index.md | 0 .../configuration-contract}/index.md | 0 .../consensus-contract}/index.md | 0 .../cross-chain-contract}/index.md | 0 .../economic-contract}/index.md | 0 .../election-contract}/index.md | 0 .../genesis-contract}/index.md | 0 .../smart-contract-api}/index.md | 0 .../multi-token-contract}/index.md | 0 .../parliament-contract}/index.md | 0 .../profit-contract}/index.md | 0 .../referendum-contract}/index.md | 0 .../token-convert-contract}/index.md | 0 .../token-holder-contract}/index.md | 0 .../treasury-contract}/index.md | 0 .../vote-contract}/index.md | 0 .../web-api/chain-api}/index.md | 0 .../Web API => references/web-api}/index.md | 0 .../web-api/net-api}/index.md | 0 .../index.md | 0 .../acs1-transaction-fee-standard}/index.md | 0 .../acs10-dividend-pool-standard}/index.md | 0 .../index.md | 0 .../acs12-user-contract-standard}/index.md | 0 .../index.md | 0 .../acs3-contract-proposal-standard}/index.md | 0 .../acs4-consensus-standard}/index.md | 0 .../index.md | 0 .../acs6-random-number-generation}/index.md | 0 .../acs7-cross-chain-standard}/index.md | 0 .../index.md | 0 .../index.md | 0 .../acs-introduction}/index.md | 0 .../addresses}/index.md | 0 .../consensus}/index.md | 0 .../core/implementation}/index.md | 0 .../Core => understanding-aelf/core}/index.md | 0 .../core/introduction}/index.md | 0 .../cross-chain/architecture}/index.md | 0 .../cross-chain-transfer}/index.md | 0 .../cross-chain-verification}/index.md | 0 .../cross-chain}/index.md | 0 .../cross-chain/introduction}/index.md | 0 .../cross-chain/verify}/index.md | 0 .../index.md | 0 .../network}/index.md | 0 .../smart-contract}/architecture/index.md | 0 .../smart-contract}/event/index.md | 0 .../smart-contract}/index.md | 0 .../smart-contract}/messages/index.md | 0 .../requirements-and-restrictions/index.md | 0 .../namespace-and-type-restrictions}/index.md | 0 .../other-restrictions}/index.md | 0 .../project-requirements}/index.md | 0 .../index.md | 0 .../smart-contract}/service/index.md | 0 .../transactions}/index.md | 0 .../img}/gcp-curl-chain-stat.png | Bin .../img}/gcp-deployed.png | Bin .../img}/gcp-docker-compose.png | Bin .../img}/gcp-ssh-select.png | Bin .../img}/gcp-step1.png | Bin .../img}/gcp-step2-a.png | Bin .../img}/gcp-step2-b.png | Bin 101 files changed, 1124 deletions(-) delete mode 100644 docs/References/command-line-Interface/Commands.md delete mode 100644 docs/References/command-line-Interface/Introduction.md delete mode 100644 docs/References/command-line-Interface/_category_.json rename docs/Resources/{aelf Whitepaper => aelf-whitepaper}/index.md (100%) rename docs/Resources/{Browser Extension => browser-extension}/index.md (100%) rename docs/Resources/{Integration Guide => integration-guide}/index.md (100%) rename docs/Resources/{Protobuf Extension => protobuf-extension}/index.md (100%) rename docs/Resources/{Wallet and Block Explorer => wallet-and-block-explorer}/index.md (100%) rename docs/Tools/{aelf CLI/Commands => aelf-cli/commands}/index.md (100%) rename docs/Tools/{aelf CLI => aelf-cli}/index.md (100%) rename docs/Tools/{aelf CLI/Introduction => aelf-cli/introduction}/index.md (100%) rename docs/Tools/{Chain SDK/C# SDK => chain-sdk/c#-sdk}/index.md (100%) rename docs/Tools/{Chain SDK/Go SDK => chain-sdk/go-sdk}/index.md (100%) rename docs/Tools/{Chain SDK => chain-sdk}/index.md (100%) rename docs/Tools/{Chain SDK/Java SDK => chain-sdk/java-sdk}/index.md (100%) rename docs/Tools/{Chain SDK/JavaScript SDK => chain-sdk/javascript-sdk}/index.md (100%) rename docs/Tools/{Chain SDK/PHP SDK => chain-sdk/php-sdk}/index.md (100%) rename docs/Tools/{Chain SDK/Python SDK => chain-sdk/python-sdk}/index.md (100%) rename docs/Tools/{Smart Contract Templates/Deploying Contracts with BP Approval => smart-contract-templates/deploying-contracts-with-bp-approval}/index.md (100%) rename docs/Tools/{Smart Contract Templates/Deploying Contracts without BP Approval => smart-contract-templates/deploying-contracts-without-bp-approval}/index.md (100%) rename docs/Tools/{Smart Contract Templates/Developing Smart Contracts => smart-contract-templates/developing-smart-contracts}/index.md (100%) rename docs/Tools/{Smart Contract Templates/Development Environment => smart-contract-templates/development-environment}/index.md (100%) rename docs/Tools/{Smart Contract Templates => smart-contract-templates}/index.md (100%) rename docs/Tools/{Smart Contract Templates/Overview => smart-contract-templates/overview}/index.md (100%) rename docs/Tutorials/{Operate a Node => operate-a-node}/index.md (100%) rename docs/Tutorials/{Operate a Node/Run a Mainnet Node => operate-a-node/run-a-mainnet-node}/index.md (100%) rename docs/Tutorials/{Operate a Node/Run a Side Chain => operate-a-node/run-a-side-chain}/index.md (100%) rename docs/Tutorials/{Operate a Node/Run a Testnet Node => operate-a-node/run-a-testnet-node}/index.md (100%) rename docs/Tutorials/{Operate a Node/Run aelf on Cloud => operate-a-node/run-aelf-on-cloud}/index.md (100%) rename docs/Tutorials/{Smart Contract Development => smart-contract-development}/index.md (100%) rename docs/{Quick Start/Become a Node Operator => quick-start/become-a-node-operator}/index.md (100%) rename docs/{Quick Start/Develop your first aelf Smart Contract => quick-start/develop-your-first-aelf-smart-contract}/index.md (100%) rename docs/{Quick Start/Explore running aelf's side chain => quick-start/explore-running-aelf-side-chain}/index.md (100%) rename docs/{Quick Start => quick-start}/index.md (100%) rename docs/{Quick Start/Intro to aelf Development => quick-start/intro-to-aelf-development}/index.md (100%) rename docs/{Quick Start/Run a Side Chain => quick-start/run-a-side-chain}/index.md (100%) rename docs/{Quick Start/Start and run a node on aelf locally or on cloud => quick-start/start-and-run-a-node-on-aelf-locally-or-on-cloud}/index.md (100%) rename docs/{References/Smart Contract API/Association Contract => references/smart-contract-api/association-contract}/index.md (100%) rename docs/{References/Smart Contract API/Configuration Contract => references/smart-contract-api/configuration-contract}/index.md (100%) rename docs/{References/Smart Contract API/Consensus Contract => references/smart-contract-api/consensus-contract}/index.md (100%) rename docs/{References/Smart Contract API/Cross chain Contract => references/smart-contract-api/cross-chain-contract}/index.md (100%) rename docs/{References/Smart Contract API/Economic Contract => references/smart-contract-api/economic-contract}/index.md (100%) rename docs/{References/Smart Contract API/Election Contract => references/smart-contract-api/election-contract}/index.md (100%) rename docs/{References/Smart Contract API/Genesis Contract => references/smart-contract-api/genesis-contract}/index.md (100%) rename docs/{References/Smart Contract API => references/smart-contract-api}/index.md (100%) rename docs/{References/Smart Contract API/Multi Token Contract => references/smart-contract-api/multi-token-contract}/index.md (100%) rename docs/{References/Smart Contract API/Parliament Contract => references/smart-contract-api/parliament-contract}/index.md (100%) rename docs/{References/Smart Contract API/Profit Contract => references/smart-contract-api/profit-contract}/index.md (100%) rename docs/{References/Smart Contract API/Referendum Contract => references/smart-contract-api/referendum-contract}/index.md (100%) rename docs/{References/Smart Contract API/Token Convert Contract => references/smart-contract-api/token-convert-contract}/index.md (100%) rename docs/{References/Smart Contract API/Token Holder Contract => references/smart-contract-api/token-holder-contract}/index.md (100%) rename docs/{References/Smart Contract API/Treasury Contract => references/smart-contract-api/treasury-contract}/index.md (100%) rename docs/{References/Smart Contract API/Vote Contract => references/smart-contract-api/vote-contract}/index.md (100%) rename docs/{References/Web API/Chain API => references/web-api/chain-api}/index.md (100%) rename docs/{References/Web API => references/web-api}/index.md (100%) rename docs/{References/Web API/Net API => references/web-api/net-api}/index.md (100%) rename docs/{Understanding aelf/ACS Introduction/ACS0 - Contract Deployment Standard => understanding-aelf/acs-introduction/acs0-contract-deployment-standard}/index.md (100%) rename docs/{Understanding aelf/ACS Introduction/ACS1 - Transaction Fee Standard => understanding-aelf/acs-introduction/acs1-transaction-fee-standard}/index.md (100%) rename docs/{Understanding aelf/ACS Introduction/ACS10 - Dividend Pool Standard => understanding-aelf/acs-introduction/acs10-dividend-pool-standard}/index.md (100%) rename docs/{Understanding aelf/ACS Introduction/ACS11 - Cross Chain Consensus Standard => understanding-aelf/acs-introduction/acs11-cross-chain-consensus-standard}/index.md (100%) rename docs/{Understanding aelf/ACS Introduction/ACS12 - User Contract Standard => understanding-aelf/acs-introduction/acs12-user-contract-standard}/index.md (100%) rename docs/{Understanding aelf/ACS Introduction/ACS2 - Parallel Execution Standard => understanding-aelf/acs-introduction/acs2-parallel-execution-standard}/index.md (100%) rename docs/{Understanding aelf/ACS Introduction/ACS3 - Contract Proposal Standard => understanding-aelf/acs-introduction/acs3-contract-proposal-standard}/index.md (100%) rename docs/{Understanding aelf/ACS Introduction/ACS4 - Consensus Standard => understanding-aelf/acs-introduction/acs4-consensus-standard}/index.md (100%) rename docs/{Understanding aelf/ACS Introduction/ACS5 - Contract Threshold Standard => understanding-aelf/acs-introduction/acs5-contract-threshold-standard}/index.md (100%) rename docs/{Understanding aelf/ACS Introduction/ACS6 - Random Number Generation => understanding-aelf/acs-introduction/acs6-random-number-generation}/index.md (100%) rename docs/{Understanding aelf/ACS Introduction/ACS7 - Cross Chain Standard => understanding-aelf/acs-introduction/acs7-cross-chain-standard}/index.md (100%) rename docs/{Understanding aelf/ACS Introduction/ACS8 - Transaction Resource Token Fee Standard => understanding-aelf/acs-introduction/acs8-transaction-resource-token-fee-standard}/index.md (100%) rename docs/{Understanding aelf/ACS Introduction/ACS9 - Contract Profit Dividend Standard => understanding-aelf/acs-introduction/acs9-contract-profit-dividend-standard}/index.md (100%) rename docs/{Understanding aelf/ACS Introduction => understanding-aelf/acs-introduction}/index.md (100%) rename docs/{Understanding aelf/Addresses => understanding-aelf/addresses}/index.md (100%) rename docs/{Understanding aelf/Consensus => understanding-aelf/consensus}/index.md (100%) rename docs/{Understanding aelf/Core/Implementation => understanding-aelf/core/implementation}/index.md (100%) rename docs/{Understanding aelf/Core => understanding-aelf/core}/index.md (100%) rename docs/{Understanding aelf/Core/Introduction => understanding-aelf/core/introduction}/index.md (100%) rename docs/{Understanding aelf/Cross Chain/Architecture => understanding-aelf/cross-chain/architecture}/index.md (100%) rename docs/{Understanding aelf/Cross Chain/Cross Chain Transfer => understanding-aelf/cross-chain/cross-chain-transfer}/index.md (100%) rename docs/{Understanding aelf/Cross Chain/Cross Chain Verification => understanding-aelf/cross-chain/cross-chain-verification}/index.md (100%) rename docs/{Understanding aelf/Cross Chain => understanding-aelf/cross-chain}/index.md (100%) rename docs/{Understanding aelf/Cross Chain/Introduction => understanding-aelf/cross-chain/introduction}/index.md (100%) rename docs/{Understanding aelf/Cross Chain/Verify => understanding-aelf/cross-chain/verify}/index.md (100%) rename docs/{Understanding aelf => understanding-aelf}/index.md (100%) rename docs/{Understanding aelf/Network => understanding-aelf/network}/index.md (100%) rename docs/{Understanding aelf/Smart Contract => understanding-aelf/smart-contract}/architecture/index.md (100%) rename docs/{Understanding aelf/Smart Contract => understanding-aelf/smart-contract}/event/index.md (100%) rename docs/{Understanding aelf/Smart Contract => understanding-aelf/smart-contract}/index.md (100%) rename docs/{Understanding aelf/Smart Contract => understanding-aelf/smart-contract}/messages/index.md (100%) rename docs/{Understanding aelf/Smart Contract => understanding-aelf/smart-contract}/requirements-and-restrictions/index.md (100%) rename docs/{Understanding aelf/Smart Contract/requirements-and-restrictions/namespace and type restrictions => understanding-aelf/smart-contract/requirements-and-restrictions/namespace-and-type-restrictions}/index.md (100%) rename docs/{Understanding aelf/Smart Contract/requirements-and-restrictions/other restrictions => understanding-aelf/smart-contract/requirements-and-restrictions/other-restrictions}/index.md (100%) rename docs/{Understanding aelf/Smart Contract/requirements-and-restrictions/project requirements => understanding-aelf/smart-contract/requirements-and-restrictions/project-requirements}/index.md (100%) rename docs/{Understanding aelf/Smart Contract/requirements-and-restrictions/structure restrictions and requirements => understanding-aelf/smart-contract/requirements-and-restrictions/structure-restrictions-and-requirements}/index.md (100%) rename docs/{Understanding aelf/Smart Contract => understanding-aelf/smart-contract}/service/index.md (100%) rename docs/{Understanding aelf/Transactions => understanding-aelf/transactions}/index.md (100%) rename {docs/Quick Start/Start and run a node on aelf locally or on cloud => static/img}/gcp-curl-chain-stat.png (100%) rename {docs/Quick Start/Start and run a node on aelf locally or on cloud => static/img}/gcp-deployed.png (100%) rename {docs/Quick Start/Start and run a node on aelf locally or on cloud => static/img}/gcp-docker-compose.png (100%) rename {docs/Quick Start/Start and run a node on aelf locally or on cloud => static/img}/gcp-ssh-select.png (100%) rename {docs/Quick Start/Start and run a node on aelf locally or on cloud => static/img}/gcp-step1.png (100%) rename {docs/Quick Start/Start and run a node on aelf locally or on cloud => static/img}/gcp-step2-a.png (100%) rename {docs/Quick Start/Start and run a node on aelf locally or on cloud => static/img}/gcp-step2-b.png (100%) diff --git a/docs/References/command-line-Interface/Commands.md b/docs/References/command-line-Interface/Commands.md deleted file mode 100644 index 1ba03ad..0000000 --- a/docs/References/command-line-Interface/Commands.md +++ /dev/null @@ -1,885 +0,0 @@ ---- -sidebar_position: 2 -title: Commands -description: Commands ---- - -# Commands Overview - -### Common Options - -**datadir**: Directory containing `aelf-command` files, including encrypted account info keyStore files. Default: `{home}/.local/share/aelf` - -**endpoint**: The RPC service endpoint. - -**account**: The account used to interact with the blockchain endpoint. - -**password**: The password to unlock the given account. - -You can set these options in several ways, in order of priority from low to high: - -1. **Environment Variables** - ```sql - # Set datadir - $ export AELF_CLI_DATADIR=/Users/{you}/.local/share/aelf - - # Set endpoint - $ export AELF_CLI_ENDPOINT=http://127.0.0.1:8000 - - # Set account - $ export AELF_CLI_ACCOUNT=2Ue31YTuB5Szy7c...gtGi5uMQBYarYUR5oGin1sys6H - ``` - -2. **Global Config File** - - The global config file is located in `/.aelfrc`. Avoid modifying this file manually. - - Use the `aelf-command config` to modify the global config file. - -### Config Command - -**set**: Save configuration in the global `.aelfrc` file. - -```sql -$ aelf-command config set endpoint http://127.0.0.1:8000 -✔ Succeed! -``` - -**get**: Retrieve a value from the global `.aelfrc` file. -```sql -$ aelf-command config get endpoint -http://127.0.0.1:8000 -``` - -**delete**: Remove a key-value pair from the global `.aelfrc` file. -```sql -$ aelf-command config delete endpoint -✔ Succeed! -``` - -**list**: List all configurations stored in the global `.aelfrc` file. -```sql -$ aelf-command config list -endpoint=http://127.0.0.1:8000 -password=password -``` - -**Usage:** -```sql -$ aelf-command config -h -Usage: aelf-command config [options] [key] [value] - -Options: - -h, --help output usage information - -Examples: - -aelf-command config get -aelf-command config set -aelf-command config delete -aelf-command config list -``` - -### Working Directory Config File - -The current working directory can also have a `.aelfrc` file. The format is the same as the global `.aelfrc` file: -``` -endpoint http://127.0.0.1:8000 -password yourpassword -``` -Each line contains a `` pair separated by a whitespace. - -### CLI Parameters - -You can pass common options directly as CLI parameters: -```sql -$ aelf-command console -a sadaf -p password -e http://127.0.0.1:8000 -``` -Options given in higher priority (e.g., CLI parameters) will overwrite those with lower priority (e.g., environment variables). - -### Create a New Account - -Use the `create` command to create a new account. - -```sql -$ aelf-command create -h -Usage: aelf-command create [options] [save-to-file] - -Options: - -c, --cipher [cipher] Cipher algorithm to use (default: aes-128-ctr) - -h, --help Output usage information -``` - -**Examples:** -```sql -$ aelf-command create -$ aelf-command create -$ aelf-command create -c aes-128-cbc -``` - -By following this guide, you should be able to easily set up and use aelf for your Web3 applications. For more detailed information, please refer to the full aelf documentation. - - -## Load - Load an Account by a Given `Private Key` or `Mnemonic` - -This command allows you to load an account from a backup. - -### Load from Mnemonic - -```sql -$ aelf-command load 'great mushroom loan crisp ... door juice embrace' -``` - -### Load from Private Key - -```sql -$ aelf-command load 'e038eea7e151eb451ba2901f7...b08ba5b76d8f288' -``` - -### Load from Prompting - -```sql -$ aelf-command load -? Enter a private key or mnemonic › e038eea7e151eb451ba2901f7...b08ba5b76d8f288 -``` - -## Wallet - Show Wallet Details - -This command allows you to print wallet information, including the `private key`, `address`, `public key`, and `mnemonic`. - -```sql -$ aelf-command wallet -a C91b1SF5mMbenHZTfdfbJSkJcK7HMjeiuw...8qYjGsESanXR -AElf [Info]: -Private Key : 97ca9fbece296231f26bee0e493500810f...cbd984f69a8dc22ec9ec89ebb00 -Public Key : 04c30dd0c3b5abfc85a11b15dabd0de926...74fe04e92eaebf2e4fef6445d9b9b11efe6f4b70c8e86644b72621f9987dc00bb1eab44a9bd7512ea53f93937a5d0 -Address : C91b1SF5mMbenHZTfdfbJSkJcK7HMjeiuw...8qYjGsESanXR -``` - -## Proposal - Create a Proposal - -There are three types of proposal contracts in AElf: - -- AElf.ContractNames.Parliament -- AElf.ContractNames.Referendum -- AElf.ContractNames.Association - -Depending on your needs, you can choose one and create a proposal. - -### Get an Organization Address or Create One - -**Get the Default Organization's Address with the Parliament Contract** - -```sql -$ aelf-command call AElf.ContractNames.Parliament GetDefaultOrganizationAddress -✔ Fetching contract successfully! -✔ Calling method successfully! -AElf [Info]: -Result: -"BkcXRkykRC2etHp9hgFfbw2ec1edx7ERBxYtbC97z3Q2bNCwc" -✔ Succeed! -``` - -`BkcXRkykRC2etHp9hgFfbw2ec1edx7ERBxYtbC97z3Q2bNCwc` is the default organization address. - -The default organization includes all miners; every proposal under AElf.ContractNames.Parliament requires over 2/3 miner approval to be released. - -**Create an Organization with the Referendum Contract** - -```sql -$ aelf-command send AElf.ContractNames.Referendum -✔ Fetching contract successfully! -? Pick up a contract method: CreateOrganization - -If you need to pass file contents as a parameter, you can enter the relative or absolute path of the file. - -Enter the params one by one, type `Enter` to skip optional parameters: -? Enter the required param : ELF -? Enter the required param : 666 -? Enter the required param : 666 -? Enter the required param : 666 -? Enter the required param : 666 -? Enter the required param : ["2hxkDg6Pd2d4yU1A16PTZVMMrEDYEPR8oQojMDwWdax5LsBaxX"] -The params you entered is: -{ - "tokenSymbol": "ELF", - "proposalReleaseThreshold": { - "minimalApprovalThreshold": 666, - "maximalRejectionThreshold": 666, - "maximalAbstentionThreshold": 666, - "minimalVoteThreshold": 666 - }, - "proposerWhiteList": { - "proposers": [ - "2hxkDg6Pd2d4yU1A16PTZVMMrEDYEPR8oQojMDwWdax5LsBaxX" - ] - } -} -✔ Succeed! -AElf [Info]: -Result: -{ - "TransactionId": "273285c7e8825a0af5291dd5d9295f746f2bb079b30f915422564de7a64fc874" -} -✔ Succeed! -``` - -### Create a Proposal - -```sql -$ aelf-command proposal -? Pick up a contract name to create a proposal: AElf.ContractNames.Parliament -? Enter an organization address: BkcXRkykRC2etHp9hgFfbw2ec1edx7ERBxYtbC97z3Q2bNCwc -? Select the expired time for this proposal: 2022/09/23 22:06 -? Optional, input a URL for proposal description: -? Enter a contract address or name: AElf.ContractNames.Token -✔ Fetching contract successfully! -? Pick up a contract method: Transfer - -If you need to pass file contents to the contract method, you can enter the relative or absolute path of the file instead. - -Enter required params one by one: -? Enter the required param : 2hxkDg6Pd2d4yU1A16PTZVMMrEDYEPR8oQojMDwWdax5LsBaxX -? Enter the required param : ELF -? Enter the required param : 100000000 -? Enter the required param : test -AElf [Info]: - { TransactionId: - '09c8c824d2e3aea1d6cd15b7bb6cefe4e236c5b818d6a01d4f7ca0b60fe99535' } -✔ loading proposal id... -AElf [Info]: Proposal id: "bafe83ca4ec5b2a2f1e8016d09b21362c9345954a014379375f1a90b7afb43fb". -✔ Succeed! -``` - -You can get the proposal id, then get the proposal’s status. - - -### Get Proposal Status - -```sql -$ aelf-command call AElf.ContractNames.Parliament GetProposal bafe83ca4ec5b2a2f1e8016d09b21362c9345954a014379375f1a90b7afb43fb -{ - ... - "expiredTime": { - "seconds": "1663942010", - "nanos": 496000 - }, - "organizationAddress": "BkcXRkykRC2etHp9hgFfbw2ec1edx7ERBxYtbC97z3Q2bNCwc", - "proposer": "2tj7Ea67fuQfVAtQZ3WBmTv7AAJ8S9D2L4g6PpRRJei6JXk7RG", - "toBeReleased": false -} -✔ Succeed! -``` - -`toBeReleased` indicates whether you can release this proposal. By default, a proposal needs over 2/3 BP nodes' approval. - -### Release a Proposal - -You can release a proposal when it gets approved. - -```sql -$ aelf-command send AElf.ContractNames.Parliament Release bafe83ca4ec5b2a2f1e8016d09b21362c9345954a014379375f1a90b7afb43fb -AElf [Info]: - { TransactionId: - '09c8c824d2e3aea1d...cefe4e236c5b818d6a01d4f7ca0b60fe99535' } -``` - -### Get the Transaction Result - -Use the `get-tx-result` command to retrieve the details of the transaction: - -```sql -$ aelf-command get-tx-result 09c8c824d2e3aea1d...cefe4e236c5b818d6a01d4f7ca0b60fe99535 -AElf [Info]: { - "TransactionId": "09c8c824d2e3aea1d...cefe4e236c5b818d6a01d4f7ca0b60fe99535", - "Status": "MINED", - "Logs": [ - { - "Address": "25CecrU94dmMdbhC3LWMKxtoaL4Wv8PChGvVJM6PxkHAyvXEhB", - "Name": "Transferred", - "Indexed": [ - "CiIKIJTPGZ24g4eHwSVNLit8jgjFJeeYCEEYLDpFiCeCT0Bf", - "EiIKIO0jJRxjHdRQmUTby8klRVSqYpwhOyUsnXYV3IrQg8N1", - "GgNFTEY=" - ], - "NonIndexed": "IICgt4fpBSomVC00MzFkMjc0Yi0zNWJjLTRjYzgtOGExZC1iODhhZTgxYzU2Zjc=" - } - ], - "Bloom": "AAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAACAAAAAAAAAAACAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAQAAA==", - "BlockNumber": 28411, - "BlockHash": "fa22e4eddff12a728895a608db99d40a4b21894f7c07df1a4fa8f0625eb914a2", - "Transaction": { - "From": "2tj7Ea67fuQfVAtQZ3WBmTv7AAJ8S9D2L4g6PpRRJei6JXk7RG", - "To": "29RDBXTqwnpWPSPHGatYsQXW2E17YrQUCj7QhcEZDnhPb6ThHW", - "RefBlockNumber": 28410, - "RefBlockPrefix": "0P+eTw==", - "MethodName": "Release", - "Params": "\"ad868c1e0d74127dd746ccdf3443a09459c55cf07d247df053ddf718df258c86\"", - "Signature": "DQcv55EBWunEFPXAbqZG20OLO5T0Sq/s0A+/iuwv1TdQqIV4318HrqFLsGpx9m3+sp5mzhAnMlrG7CSxM6EuIgA=" - }, - "ReturnValue": "", - "Error": null -} -``` -The command outputs detailed information about the transaction, including its status, logs, and related block information. - - -### Decode the Logs for Readable Result - -```sql -$ aelf-command event 09c8c824d2e3aea1d...cefe4e236c5b818d6a01d4f7ca0b60fe99535 -``` - -This command provides a readable format of the events logged by the transaction. The output includes details such as the address, event name, indexed data, non-indexed data, and a decoded result. - -#### Example Breakdown - -Here is a sample output from the `get-tx-result` command: - -```sql -{ - "TransactionId": "09c8c824d2e3aea1d...cefe4e236c5b818d6a01d4f7ca0b60fe99535", - "Status": "MINED", - "Logs": [ - { - "Address": "25CecrU94dmMdbhC3LWMKxtoaL4Wv8PChGvVJM6PxkHAyvXEhB", - "Name": "Transferred", - "Indexed": [ - "CiIKIJTPGZ24g4eHwSVNLit8jgjFJeeYCEEYLDpFiCeCT0Bf", - "EiIKIO0jJRxjHdRQmUTby8klRVSqYpwhOyUsnXYV3IrQg8N1", - "GgNFTEY=" - ], - "NonIndexed": "IICgt4fpBSomVC00MzFkMjc0Yi0zNWJjLTRjYzgtOGExZC1iODhhZTgxYzU2Zjc=" - } - ], - "BlockNumber": 28411, - "BlockHash": "fa22e4eddff12a728895a608db99d40a4b21894f7c07df1a4fa8f0625eb914a2", - "Transaction": { - "From": "2tj7Ea67fuQfVAtQZ3WBmTv7AAJ8S9D2L4g6PpRRJei6JXk7RG", - "To": "29RDBXTqwnpWPSPHGatYsQXW2E17YrQUCj7QhcEZDnhPb6ThHW", - "RefBlockNumber": 28410, - "RefBlockPrefix": "0P+eTw==", - "MethodName": "Release", - "Params": "\"ad868c1e0d74127dd746ccdf3443a09459c55cf07d247df053ddf718df258c86\"", - "Signature": "DQcv55EBWunEFPXAbqZG20OLO5T0Sq/s0A+/iuwv1TdQqIV4318HrqFLsGpx9m3+sp5mzhAnMlrG7CSxM6EuIgA=" - }, - "ReturnValue": "", - "Error": null -} -``` - -### Understand the Decoded Event - -After running the `event` command, the decoded event output is as follows: - -```sql -{ - "Address": "25CecrU94dmMdbhC3LWMKxtoaL4Wv8PChGvVJM6PxkHAyvXEhB", - "Name": "Transferred", - "Indexed": [ - "CiIKIJTPGZ24g4eHwSVNLit8jgjFJeeYCEEYLDpFiCeCT0Bf", - "EiIKIO0jJRxjHdRQmUTby8klRVSqYpwhOyUsnXYV3IrQg8N1", - "GgNFTEY=" - ], - "NonIndexed": "IICgt4fpBSomVC00MzFkMjc0Yi0zNWJjLTRjYzgtOGExZC1iODhhZTgxYzU2Zjc=", - "Result": { - "from": "28Y8JA1i2cN6oHvdv7EraXJr9a1gY6D1PpJXw9QtRMRwKcBQMK", - "to": "2oSMWm1tjRqVdfmrdL8dgrRvhWu1FP8wcZidjS6wPbuoVtxhEz", - "symbol": "ELF", - "amount": "200000000000", - "memo": "T-431d274b-35bc-4cc8-8a1d-b88ae81c56f7" - } -} -``` - -#### Summary of Decoded Event - -**From Address**: 28Y8JA1i2cN6oHvdv7EraXJr9a1gY6D1PpJXw9QtRMRwKcBQMK -**To Address**: 2oSMWm1tjRqVdfmrdL8dgrRvhWu1FP8wcZidjS6wPbuoVtxhEz -**Symbol**: ELF -**Amount**: 200000000000 -**Memo**: T-431d274b-35bc-4cc8-8a1d-b88ae81c56f7 - -These steps and commands will help you retrieve and decode the transaction results on the ealf blockchain. - -For more details, check the descriptions of [`aelf-command event`](#event-deserialize-the-result-return-by-executing-a-transaction). - - -# Deploy a smart contract - -**Note**: The `deploy` command has been deprecated. Please use `aelf-command` send or `aelf-command proposal` instead. - -#### Example Workflow - -#### 1.Check Chain Status - -```javascript -$ aelf-command get-chain-status -✔ Succeed -{ - "ChainId": "AELF", - "Branches": { - "41a8a1ebf037197b7e2f10a67d81f741d46a6af41775bcc4e52ab855c58c4375": 8681551, - "ed4012c21a2fbf810db52e9869ef6a3fb0629b36d23c9be2e3692a24703b3112": 8681597, - "13476b902ef137ed63a4b52b2902bb2b2fa5dbe7c256fa326c024a73dc63bcb3": 8681610 - }, - "NotLinkedBlocks": {}, - "LongestChainHeight": 8681610, - "LongestChainHash": "13476b902ef137ed63a4b52b2902bb2b2fa5dbe7c256fa326c024a73dc63bcb3", - "GenesisBlockHash": "cd5ce1bfa0cd97a1dc34f735c57bea2fcb9d88fc8f76bece2592fe7d82d5660c", - "GenesisContractAddress": "2gaQh4uxg6tzyH1ADLoDxvHA14FMpzEiMqsQ6sDG5iHT8cmjp8", - "LastIrreversibleBlockHash": "4ab84cdfe0723b191eedcf4d2ca86b0f64e57105e61486c21d98d562b14f2ab0", - "LastIrreversibleBlockHeight": 8681483, - "BestChainHash": "0dbc2176aded950020577552c92c82e66504ea109d4d6588887502251b7e932b", - "BestChainHeight": 8681609 -} -``` - -#### 2. Deploy Smart Contract - -Use the Genesis Contract Address (`GenesisContractAddress`) as a parameter with `aelf-command send`. - - -```javascript -$ aelf-command send 2gaQh4uxg6tzyH1ADLoDxvHA14FMpzEiMqsQ6sDG5iHT8cmjp8 DeploySmartContract -✔ Fetching contract successfully! - -If you need to pass file contents as a parameter, you can enter the relative or absolute path of the file - -Enter the params one by one, type `Enter` to skip optional param: -? Enter the required param : 0 -? Enter the required param : /Users/test/contract.dll -... - -``` - -#### 3. Propose New Contract - -Use `aelf-command send` with `ProposeNewContract` method if required by the chain. - -```javascript -$ aelf-command send 2gaQh4uxg6tzyH1ADLoDxvHA14FMpzEiMqsQ6sDG5iHT8cmjp8 ProposeNewContract -✔ Fetching contract successfully! - -If you need to pass file contents as a parameter, you can enter the relative or absolute path of the file - -Enter the params one by one, type `Enter` to skip optional param: -? Enter the required param : 0 -? Enter the required param : /Users/test/contract.dll -... - -You must input contract method parameters in the prompting way. Note that you can input a relative or absolute path of a contract file to pass a file to `aelf-command`. It will read the file content and encode it as a base64 string. - -After calling `ProposeNewContract`, you can get the proposal id and `proposedContractInputHash` later by running: - -$ aelf-command event 34184cbc27c95bbc0a1bd676192c3afc380740ab61626e5d428ae17faf9ea984 -[Info]: -The results returned by Transaction: 34184cbc27c95bbc0a1bd676192c3afc380740ab61626e5d428ae17faf9ea984 is: -[ - { - "Address": "pykr77ft9UUKJZLVq15wCH8PinBSjVRQ12sD1Ayq92mKFsJ1i", - "Name": "ContractProposed", - "Indexed": [], - "NonIndexed": "CiIKIK0dKXkwu/HDpZUf/tzjJSfcZ5XznUrE/C0XMtp4liqo", - "Result": { - "proposedContractInputHash": "ad1d297930bbf1c3a5951ffedce32527dc6795f39d4ac4fc2d1732da78962aa8" - } - }, - { - "Address": "2JT8xzjR5zJ8xnBvdgBZdSjfbokFSbF5hDdpUCbXeWaJfPDmsK", - "Name": "ProposalCreated", - "Indexed": [ - "EiIKIEknWCUo4/KJS/vDAf7u1R6JmLEfAcapRY1BZ9yogawl" - ], - "NonIndexed": "CiIKIFb/RK9tR/SjJn0z7d4AjUvw288KCwTRyXSYMMryQuC2", - "Result": { - "organizationAddress": "ZDcYStbBRACaEQh6K1nqPb2SHKPCTggB9E66onthFoGrVnkfi", - "proposalId": "56ff44af6d47f4a3267d33edde008d4bf0dbcf0a0b04d1c9749830caf242e0b6" - } - } -] - -Wait for the organization members to approve your proposal, and you can release your proposal by calling `ReleaseApprovedContract`. - -``` - - -#### 4. Release Approved Contract - -```javascript -$ aelf-command send 2gaQh4uxg6tzyH1ADLoDxvHA14FMpzEiMqsQ6sDG5iHT8cmjp8 -✔ Fetching contract successfully! -? Pick up a contract method: ReleaseApprovedContract - -If you need to pass file contents as a parameter, you can enter the relative or absolute path of the file - -Enter the params one by one, type `Enter` to skip optional param: -? Enter the required param : proposalId -? Enter the required param : proposedContractInputHash - -The params you entered are: -{ - "proposalId": proposalNewContract proposalId, - "proposedContractInputHash": proposedContractInputHash -} -✔ Succeed! - -And then you can get the code check proposal id from the event of `ReleaseApprovedContract` transaction. - -... - -{ - "Address": "2JT8xzjR5zJ8xnBvdgBZdSjfbokFSbF5hDdpUCbXeWaJfPDmsK", - "Name": "ProposalCreated", - "Indexed": [ - "EiIKIEknWCUo4/KJS/vDAf7u1R6JmLEfAcapRY1BZ9yogawl" - ], - "NonIndexed": "CiIKIAfOf/a3zIillggQjSl2N0Y3aEh8bRGK5ppBrc14CKSn", - "Result": { - "organizationAddress": "ZDcYStbBRACaEQh6K1nqPb2SHKPCTggB9E66onthFoGrVnkfi", - "proposalId": "07ce7ff6b7cc88a59608108d297637463768487c6d118ae69a41adcd7808a4a7" - } -} - -Wait for the code check to pass, then you can release the code check proposal by calling `ReleaseCodeCheck`. - -``` - -#### 5. Release Code-Checked Contract - -```javascript -$ aelf-command send 2gaQh4uxg6tzyH1ADLoDxvHA14FMpzEiMqsQ6sDG5iHT8cmjp8 -a 28Y8JA1i2cN6oHvdv7EraXJr9a1gY6D1PpJXw9QtRMRwKcBQMK -p 123 -✔ Fetching contract successfully! -? Pick up a contract method: ReleaseCodeCheckedContract - -If you need to pass file contents as a parameter, you can enter the relative or absolute path of the file - -Enter the params one by one, type `Enter` -``` - - -## event - Deserialize Transaction Result - -To view details from a transaction, including events triggered by contract methods, you can use the `aelf-command event` tool. Here’s how: - -```javascript -$ aelf-command event fe1974fde291e44e16c55db666f2c747323cdc584d616de05c88c8bae18ecceb - -[Info]: -The results returned by -Transaction: fe1974fde291e44e16c55db666f2c747323cdc584d616de05c88c8bae18ecceb is: -[ - { - "Address": "2gaQh4uxg6tzyH1ADLoDxvHA14FMpzEiMqsQ6sDG5iHT8cmjp8", - "Name": "ContractDeployed", - "Indexed": [ - "CiIKIN2O6lDDGWbgbkomYr6+9+2B0JpHsuses3KfLwzHgSmu", - "EiIKIDXZGwZLKqm78WpYDXuBlyd6Dv+RMjrgOUEnwamfIA/z" - ], - "NonIndexed": "GiIKIN2O6lDDGWbgbkomYr6+9+2B0JpHsuses3KfLwzHgSmu", - "Result": { - "author": "2gaQh4uxg6tzyH1ADLoDxvHA14FMpzEiMqsQ6sDG5iHT8cmjp8", - "codeHash": "35d91b064b2aa9bbf16a580d7b8197277a0eff91323ae0394127c1a99f200ff3", - "address": "2gaQh4uxg6tzyH1ADLoDxvHA14FMpzEiMqsQ6sDG5iHT8cmjp8" - } - } -] -✔ Succeed! -```` - -#### Explanation: - -When you execute this command, you'll get details about the transaction with ID fe1974fde291e44e16c55db666f2c747323cdc584d616de05c88c8bae18ecceb. Here's what the output means: - -- **Address**: The contract address where the event occurred. -- **Name**: The name of the event triggered by a contract method. -- **Indexed**: Additional data related to the event, encoded in base64 format. -- **NonIndexed**: Further details about the event, also in base64. -- **Result**: Decoded information from the event, providing readable details such as author, code hash, and address. - - -This command helps you understand what happened during a transaction, especially useful when dealing with events triggered by smart contracts. - -## send - Send a transaction - -#### 1. Enter AElf Node URI: - -```javascript -$ aelf-command send -✔ Enter the URI of an AElf node … http://13.231.179.27:8000 -``` - -You need to specify the URI of an AElf blockchain node to which you will connect. - -#### 2. Enter Wallet Address and Password: - - -```sql -✔ Enter a valid wallet address, if you do not have, create one by aelf-command create … D3vSjRYL8MpeRpvUDy85ktXijnBe2tHn8NTACsggUVteQCNGP -✔ Enter the password you typed when creating a wallet … ******** -``` - -Provide your wallet address and the password associated with it. This is necessary to sign transactions. - - -#### 3. Enter Contract Information: - -```sql -✔ Enter contract name (System contracts only) or the address of contract … AElf.ContractNames.Token -✔ Fetching contract successfully! -``` - -Specify the contract name or address. In this example, AElf.ContractNames.Token refers to the Token contract. - - -#### 4. Select Contract Method: - -```css -? Pick up a contract method: Transfer -``` - -Choose the specific method of the contract you want to invoke. Here, `Transfer` is selected. - -#### 5. Enter Method Parameters: - -```sql -Enter the params one by one, type `Enter` to skip optional param: -? Enter the required param : C91b1SF5mMbenHZTfdfbJSkJcK7HMjeiuwfQu8qYjGsESanXR -? Enter the required param : ELF -? Enter the required param : 100000000 -? Enter the required param : 'test command' -``` - -Input the required parameters for the `Transfer` method: recipient address (`to`), token symbol (`symbol`), amount (`amount`), and an optional memo (`memo`). - -#### 6. Confirmation and Execution: - -```sql -The params you entered is: -{ - "to": "C91b1SF5mMbenHZTfdfbJSkJcK7HMjeiuwfQu8qYjGsESanXR", - "symbol": "ELF", - "amount": 100000000, - "memo": "'test command'" -} -✔ Succeed! -``` - -Confirm the parameters you entered and proceed with the transaction. - - -#### 7. Transaction Result: - -```css -AElf [Info]: -Result: -{ - "TransactionId": "85d4684cb6e4721a63893240f73f675ac53768679c291abeb54974ff4e063bb5" -} -✔ Succeed! -``` - -The transaction is executed successfully, and you receive the `TransactionId` as confirmation. - - -By following these steps, you can effectively send transactions on the AElf blockchain using the `aelf-command send` interface. Adjust parameters and contract names as necessary for different contract methods or system contracts within AElf. - - -## call - Call a read-only method on a contract - - -```sql -$ aelf-command call -✔ Enter the the URI of an AElf node … http://13.231.179.27:8000 -✔ Enter a valid wallet address, if you do not have, create one by aelf-command create … D3vSjRYL8MpeRpvUDy85ktXijnBe2tHn8NTACsggUVteQCNGP -✔ Enter the password you typed when creating a wallet … ******** -✔ Enter contract name (System contracts only) or the address of contract … AElf.ContractNames.Token -✔ Fetching contract successfully! -? Pick up a contract method: GetTokenInfo - -If you need to pass file contents as a parameter, you can enter the relative or absolute path of the file - -Enter the params one by one, type `Enter` to skip optional param: -? Enter the required param : ELF -The params you entered is: -{ - "symbol": "ELF" -} -✔ Calling method successfully! -AElf [Info]: -Result: -{ - "symbol": "ELF", - "tokenName": "Native Token", - "supply": "99732440917954549", - "totalSupply": "100000000000000000", - "decimals": 8, - "issuer": "FAJcKnSpbViZfAufBFzX4nC8HtuT93rxUS4VCMACUwXWYurC2", - "isBurnable": true, - "issueChainId": 9992731, - "burned": "267559132045477" -} -✔ Succeed! -``` - -```sql -aelf-command call AElf.ContractNames.Token GetTokenInfo '{"symbol":"ELF"}' -``` - -## get-chain-status - Get the current status of the block chain - -```sql -$ aelf-command get-chain-status -✔ Succeed -{ - "ChainId": "AELF", - "Branches": { - "59937e3c16860dedf0c80955f4995a5604ca43ccf39cd52f936fb4e5a5954445": 4229086 - }, - "NotLinkedBlocks": {}, - "LongestChainHeight": 4229086, - "LongestChainHash": "59937e3c16860dedf0c80955f4995a5604ca43ccf39cd52f936fb4e5a5954445", - "GenesisBlockHash": "da5e200259320781a1851081c99984fb853385153991e0f00984a0f5526d121c", - "GenesisContractAddress": "2gaQh4uxg6tzyH1ADLoDxvHA14FMpzEiMqsQ6sDG5iHT8cmjp8", - "LastIrreversibleBlockHash": "497c24ff443f5cbd33da24a430f5c6c5e0be2f31651bd89f4ddf2790bcbb1906", - "LastIrreversibleBlockHeight": 4229063, - "BestChainHash": "59937e3c16860dedf0c80955f4995a5604ca43ccf39cd52f936fb4e5a5954445", - "BestChainHeight": 4229086 -} -``` - - -## get-tx-result - Get a transaction result - -```sql -$ aelf-command get-tx-result -✔ Enter the the URI of an AElf node … http://13.231.179.27:8000 -✔ Enter a valid transaction id in hex format … 7b620a49ee9666c0c381fdb33f94bd31e1b5eb0fdffa081463c3954e9f734a02 -✔ Succeed! -{ TransactionId: - '7b620a49ee9666c0c381fdb33f94bd31e1b5eb0fdffa081463c3954e9f734a02', - Status: 'MINED', - Logs: null, - Bloom: - 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==', - BlockNumber: 7900508, - BlockHash: - 'a317c5ecf4a22a481f88ab08b8214a8e8c24da76115d9ddcef4afc9531d01b4b', - Transaction: - { From: 'D3vSjRYL8MpeRpvUDy85ktXijnBe2tHn8NTACsggUVteQCNGP', - To: 'WnV9Gv3gioSh3Vgaw8SSB96nV8fWUNxuVozCf6Y14e7RXyGaM', - RefBlockNumber: 7900503, - RefBlockPrefix: 'Q6WLSQ==', - MethodName: 'GetTokenInfo', - Params: '{ "symbol": "ELF" }', - Signature: - 'JtSpWbMX13tiJD0klMSJQyPBa0aRNFY4hTh3hltdWqhBpv4IRTbjjZfQj39lbBSCOy68vnLg6rUerEcyCsqwfgE=' }, - ReadableReturnValue: - '{ "symbol": "ELF", "tokenName": "elf token", "supply": "1000000000", "totalSupply": "1000000000", "decimals": 2, "issuer": "2gaQh4uxg6tzyH1ADLoDxvHA14FMpzEiMqsQ6sDG5iHT8cmjp8", "isBurnable": true }', - Error: null } -``` - - -## get-blk-height - Get the block height - -```sql -$ aelf-command get-blk-height -✔ Enter the the URI of an AElf node … http://13.231.179.27:8000 -> 7902091 -``` - -## get-blk-info - Get the block info by a block height or a block hash - -Either a block height or a block hash can be provided as an argument to this sub-command. - -```sql -$ aelf-command get-blk-info -✔ Enter the the URI of an AElf node: http://13.231.179.27:8000 -✔ Enter a valid height or block hash: 123 -✔ Include transactions whether or not: no / yes -{ BlockHash: - '6034db3e02e283d3b81a4528442988d28997d3828f87cca1a89457b294517372', - Header: - { PreviousBlockHash: - '9d6bcc588c0bc10942899e7ec4536665c86f23286029ed45287babf22c582f5a', - MerkleTreeRootOfTransactions: - '7ceb349715787ececa647ad48576467d294de6dcc44d14e19f60c4a91a7a9536', - MerkleTreeRootOfWorldState: - 'b529e2775283edc39cd4e3f685616085b18bd5521a87ea7904ad99cd2dc50910', - Extra: - '[ "CkEEJT3FEw+k9cuqv7uruq1fEwQwEjKtYxbXK86wUGrAOH7BgCVkMendLkQZmpEpMgzcz+JXnaVpWtFt3AJcGmGycxL+DggIEvIDCoIBMDQyNTNkYzUxMzBmYTRmNWNiYWFiZmJiYWJiYWFkNWYxMzA0MzAxMjMyYWQ2MzE2ZDcyYmNlYjA1MDZhYzAzODdlYzE4MDI1NjQzMWU5ZGQyZTQ0MTk5YTkxMjkzMjBjZGNjZmUyNTc5ZGE1Njk1YWQxNmRkYzAyNWMxYTYxYjI3MxLqAggCIiIKIOAP2QU8UpM4u9Y3OxdKdI5Ujm3DSyQ4JaRNf7q5ka5mKiIKIH5yNJs87wb/AkWcIrCxvCX/Te3fGHVXFxE8xsnfT1HtMgwIoJro6AUQjOa1pQE4TkqCATA0MjUzZGM1MTMwZmE0ZjVjYmFhYmZiYmFiYmFhZDVmMTMwNDMwMTIzMmFkNjMxNmQ3MmJjZWIwNTA2YWMwMzg3ZWMxODAyNTY0MzFlOWRkMmU0NDE5OWE5MTI5MzIwY2RjY2ZlMjU3OWRhNTY5NWFkMTZkZGMwMjVjMWE2MWIyNzNiIgogHY83adsNje+EtL0lLEte8KfT6X/836zXZTbntbqyjgtoBHAEegwIoJro6AUQzOybpgF6DAigmujoBRCk8MG1AnoLCKGa6OgFEOCvuBF6CwihmujoBRCg/JhzegwIoZro6AUQ9Lml1wF6DAihmujoBRDYyOO7AnoMCKGa6OgFEKy+ip8DkAEOEp8CCoIBMDQ4MWMyOWZmYzVlZjI5NjdlMjViYTJiMDk0NGVmODQzMDk0YmZlOTU0NWFhZGFjMGQ3Nzk3MWM2OTFjZTgyMGQxYjNlYzQxZjNjMDllNDZjNmQxMjM2NzA5ZTE1ZTEyY2U5N2FhZGNjYTBmZGU4NDY2M2M3OTg0OWZiOGYwM2RkMhKXAQgEMgwIpJro6AUQjOa1pQE4IkqCATA0ODFjMjlmZmM1ZWYyOTY3ZTI1YmEyYjA5NDRlZjg0MzA5NGJmZTk1NDVhYWRhYzBkNzc5NzFjNjkxY2U4MjBkMWIzZWM0MWYzYzA5ZTQ2YzZkMTIzNjcwOWUxNWUxMmNlOTdhYWRjY2EwZmRlODQ2NjNjNzk4NDlmYjhmMDNkZDISnwIKggEwNDFiZTQwMzc0NjNjNTdjNWY1MjgzNTBhNjc3ZmRkZmEzMzcxOWVlZjU5NDMwNDY5ZTlmODdkY2IyN2Y0YTQ1NjY0OTI4NmZhNzIxYzljOWVjZDMxMmY0YjdlZDBmZGE4OTJmZTNlZDExZWFjYTBmMzcxOTBkMjAzYTczYTA2YjFmEpcBCAYyDAiomujoBRCM5rWlATgySoIBMDQxYmU0MDM3NDYzYzU3YzVmNTI4MzUwYTY3N2ZkZGZhMzM3MTllZWY1OTQzMDQ2OWU5Zjg3ZGNiMjdmNGE0NTY2NDkyODZmYTcyMWM5YzllY2QzMTJmNGI3ZWQwZmRhODkyZmUzZWQxMWVhY2EwZjM3MTkwZDIwM2E3M2EwNmIxZhKfAgqCATA0OTMzZmYzNDRhNjAxMTdmYzRmYmRmMDU2ODk5YTk0NDllNjE1MzA0M2QxYzE5MWU4NzlkNjlkYzEzZmIyMzM2NWJmNTQxZWM1NTU5MWE2MTQ3YmM1Y2M3ZjUzMjQ0OTY2ZGE5NzA2ZWZmNzZiY2Y2ZjViY2EyOTYzNmVmODNkYzYSlwEICjIMCLCa6OgFEIzmtaUBOCJKggEwNDkzM2ZmMzQ0YTYwMTE3ZmM0ZmJkZjA1Njg5OWE5NDQ5ZTYxNTMwNDNkMWMxOTFlODc5ZDY5ZGMxM2ZiMjMzNjViZjU0MWVjNTU1OTFhNjE0N2JjNWNjN2Y1MzI0NDk2NmRhOTcwNmVmZjc2YmNmNmY1YmNhMjk2MzZlZjgzZGM2EpUDCoIBMDRiNmMwNzcxMWJjMzBjZGY5OGM5ZjA4MWU3MDU5MWY5OGYyYmE3ZmY5NzFlNWExNDZkNDcwMDlhNzU0ZGFjY2ViNDY4MTNmOTJiYzgyYzcwMDk3MWFhOTM5NDVmNzI2YTk2ODY0YTJhYTM2ZGE0MDMwZjA5N2Y4MDZiNWFiZWNhNBKNAggIEAEyDAismujoBRCM5rWlATgwQAJKggEwNGI2YzA3NzExYmMzMGNkZjk4YzlmMDgxZTcwNTkxZjk4ZjJiYTdmZjk3MWU1YTE0NmQ0NzAwOWE3NTRkYWNjZWI0NjgxM2Y5MmJjODJjNzAwOTcxYWE5Mzk0NWY3MjZhOTY4NjRhMmFhMzZkYTQwMzBmMDk3ZjgwNmI1YWJlY2E0egwInJro6AUQjOa1pQF6DAicmujoBRCkz+mjAnoMCJya6OgFEIj8yfECegwInJro6AUQ7KiH0wN6CwidmujoBRCko6hXegwInZro6AUQ6LTNugF6DAidmujoBRCY4NObAnoMCJ2a6OgFEMzWv+oCkAEQIFg6ggEwNGI2YzA3NzExYmMzMGNkZjk4YzlmMDgxZTcwNTkxZjk4ZjJiYTdmZjk3MWU1YTE0NmQ0NzAwOWE3NTRkYWNjZWI0NjgxM2Y5MmJjODJjNzAwOTcxYWE5Mzk0NWY3MjZhOTY4NjRhMmFhMzZkYTQwMzBmMDk3ZjgwNmI1YWJlY2E0QAIYBQ==", "" ]', - Height: 123, - Time: '2019-07-01T13:39:45.8704899Z', - ChainId: 'AELF', - Bloom: - '00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', - SignerPubkey: - '04253dc5130fa4f5cbaabfbbabbaad5f1304301232ad6316d72bceb0506ac0387ec180256431e9dd2e44199a9129320cdccfe2579da5695ad16ddc025c1a61b273' }, - Body: - { TransactionsCount: 1, - Transactions: - [ 'a365a682caf3b586cbd167b81b167979057246a726c7282530554984ec042625' ] } } -``` - - -```sql -aelf-command get-blk-info ca61c7c8f5fc1bc8af0536bc9b51c61a94f39641a93a748e72802b3678fea4a9 true -``` - - -## console - Open an interactive console - -```sql -$ aelf-command console -✔ Enter the the URI of an AElf node … http://13.231.179.27:8000 -✔ Enter a valid wallet address, if you do not have, create one by aelf-command create … 2Ue31YTuB5Szy7cnr3SCEGU2gtGi5uMQBYarYUR5oGin1sys6H -✔ Enter the password you typed when creating a wallet … ******** -✔ Succeed! -Welcome to aelf interactive console. Ctrl + C to terminate the program. Double tap Tab to list objects - - ╔═══════════════════════════════════════════════════════════╗ - ║ ║ - ║ NAME | DESCRIPTION ║ - ║ AElf | imported from aelf-sdk ║ - ║ aelf | instance of aelf-sdk, connect to ║ - ║ | http://13.231.179.27:8000 ║ - ║ _account | instance of AElf wallet, wallet address ║ - ║ | is ║ - ║ | 2Ue31YTuB5Szy7cnr3SCEGU2gtGi5uMQBYarYUR… ║ - ║ | 5oGin1sys6H ║ - ║ ║ - ╚═══════════════════════════════════════════════════════════╝ -``` - -## dapp-server - Start a socket.io server for supplying services for dApps - -Are you developing a dApp and need an environment to manage wallet information and connect to the AElf chain? You can easily start a local development server using this sub-command. - -```shell -$ aelf-command dapp-server -AElf [Info]: DApp server is listening on port 35443 -``` - - -Alternatively, you can specify a different port: - -```shell -$ aelf-command dapp-server --port 40334 -AElf [Info]: DApp server is listening on port 40334 -``` - - -This server uses Socket.io to listen on the specified local port. You can use aelf-bridge to connect to this server with the following code: - -```javascript -import AElfBridge from 'aelf-bridge'; - -const bridgeInstance = new AElfBridge({ - proxyType: 'SOCKET.IO', - socketUrl: 'http://localhost:35443', - channelType: 'ENCRYPT' -}); - -// Connect to dapp-server -bridgeInstance.connect().then(console.log).catch(console.error); -``` - - -For more details, check out the [aelf-bridge](https://github.com/AElfProject/aelf-js-bridge) and [aelf-bridge-demo](https://github.com/AElfProject/aelf-bridge-demo). \ No newline at end of file diff --git a/docs/References/command-line-Interface/Introduction.md b/docs/References/command-line-Interface/Introduction.md deleted file mode 100644 index b6a113f..0000000 --- a/docs/References/command-line-Interface/Introduction.md +++ /dev/null @@ -1,235 +0,0 @@ ---- -sidebar_position: 1 -title: Introduction to the CLI -description: Introduction to the CLI ---- - -# Introduction to the CLI - -The **aelf-command** tool is a Command Line Interface (CLI) designed for interacting with an aelf node. This guide will introduce you to its key features and show you how to install and use the tool. - -## Features - -- **Configuration Management**: Easily get or set common configurations like `endpoint`, `account`, `data directory`, and `password`. -- **User-Friendly Prompts**: For new users, missing parameters will be prompted interactively. -- **Account Management**: Create new `accounts` or load existing ones using a private key or mnemonic. -- **Wallet Information**: Display `wallet` details including private key, address, public key, and mnemonic. -- **Encryption**: Encrypt account information into `keyStore` format and save it to a file. -- **Blockchain Interaction**: - - Retrieve the current `best height` of the chain. - - Get `block information` by `height` or `block hash`. - - Get `transaction results` by `transaction ID`. - - Send `transactions` or call `read-only methods` on smart `contracts`. - - Deploy smart `contracts`. - - Open a `REPL` (Read-Eval-Print Loop) for using `JavaScript` to interact with the chain. -- **Friendly UI**: Enhanced user interactions with chalk and ora for a better visual experience. -- **Chain Status**: Retrieve the current chain status. -- **Proposal Management**: Create proposals on any contract method. -- **Transaction Deserialization**: Deserialize results returned by executing a transaction. -- **Socket.io Server**: Start a socket.io server to provide services for dApps. - -## Installation - -To install the aelf-command tool globally, use npm: - -```bash -npm install aelf-command -g -``` - -## Using aelf-command - -### First Step - -You need to create a new account or load an existing account using a `private key` or `mnemonic`. - -**Create a New Wallet** - -```sql -aelf-command create -``` - -Output example: - -``` -Your wallet info is: -Mnemonic: great mushroom loan crisp ... door juice embrace -Private Key: e038eea7e151eb451ba2901f7...b08ba5b76d8f288 -Public Key: 0478903d96aa2c8c0...6a3e7d810cacd136117ea7b13d2c9337e1ec88288111955b76ea -Address: 2Ue31YTuB5Szy7cnr3SCEGU2gtGi5uMQBYarYUR5oGin1sys6H -✔ Save account info into a file? … no / yes -✔ Enter a password … ******** -✔ Confirm password … ******** -✔ -Account info has been saved to "/Users/young/.local/share/aelf/keys/2Ue31YTuB5Szy7cnr...Gi5uMQBYarYUR5oGin1sys6H.json" -``` - -**Load Wallet from Private Key** - -```sql -aelf-command load e038eea7e151eb451ba2901f7...b08ba5b76d8f288 -``` - -Output example: - -``` -Your wallet info is: -Private Key: e038eea7e151eb451ba2901f7...b08ba5b76d8f288 -Public Key: 0478903d96aa2c8c0...6a3e7d810cacd136117ea7b13d2c9337e1ec88288111955b76ea -Address: 2Ue31YTuB5Szy7cnr3SCEGU2gtGi5uMQBYarYUR5oGin1sys6H -✔ Save account info into a file? -✔ Enter a password … ******** -✔ Confirm password … ******** -✔ -Account info has been saved to "/Users/young/.local/share/aelf/keys/2Ue31YTuB5Szy7cnr...Gi5uMQBYarYUR5oGin1sys6H.json" -``` - -**Show Wallet Info** - -```sql -aelf-command wallet -a 2Ue31YTuB5Szy7cnr3SCEGU2gtGi5uMQBYarYUR5oGin1sys6H -``` - -Output example: - -``` -Your wallet info is: -Private Key: e038eea7e151eb451ba2901f7...b08ba5b76d8f288 -Public Key: 0478903d96aa2c8c0...6a3e7d810cacd136117ea7b13d2c9337e1ec88288111955b76ea -Address: 2Ue31YTuB5Szy7cnr3SCEGU2gtGi5uMQBYarYUR5oGin1sys6H -``` - -Here you can decide whether to encrypt the account info and save it to a file. - -## Examples - -**Interactive Console** - -```sql -aelf-command console -a 2Ue31YTuB5Szy7cnr3SCEGU2gtGi5uMQBYarYUR5oGin1sys6H -✔ Enter the URI of an AElf node: http://127.0.0.1:8000 -✔ Enter the password you typed when creating a wallet … ******** -✔ Succeed! -Welcome to aelf interactive console. Ctrl + C to terminate the program. Double tap Tab to list objects - - ╔═══════════════════════════════════════════════════════════╗ - ║ ║ - ║ NAME | DESCRIPTION ║ - ║ AElf | imported from aelf-sdk ║ - ║ aelf | the instance of an aelf-sdk, connect to ║ - ║ | http://127.0.0.1:8000 ║ - ║ _account | the instance of an AElf wallet, address ║ - ║ | is ║ - ║ | 2Ue31YTuB5Szy7cnr3SCEGU2gtGi5uMQBYarYUR… ║ - ║ | 5oGin1sys6H ║ - ║ ║ - ╚═══════════════════════════════════════════════════════════╝ - -``` - -**Default Parameters** - -```sql -aelf-command console -✔ Enter the URI of an AElf node: http://127.0.0.1:8000 -✔ Enter a valid wallet address, if you don't have, create one by aelf-command create … 2Ue31YTuB5Szy7cnr3SCEGU2gtGi5uMQBYarYUR5oGin1sys6H -✔ Enter the password you typed when creating a wallet … ******** -✔ Succeed! -Welcome to aelf interactive console. Ctrl + C to terminate the program. Double tap Tab to list objects - - ╔═══════════════════════════════════════════════════════════╗ - ║ ║ - ║ NAME | DESCRIPTION ║ - ║ AElf | imported from aelf-sdk ║ - ║ aelf | the instance of an aelf-sdk, connect to ║ - ║ | http://13.231.179.27:8000 ║ - ║ _account | the instance of an AElf wallet, address ║ - ║ | is ║ - ║ | 2Ue31YTuB5Szy7cnr3SCEGU2gtGi5uMQBYarYUR… ║ - ║ | 5oGin1sys6H ║ - ║ ║ - ╚═══════════════════════════════════════════════════════════╝ -``` - -## Help - -To get help, use: - -```sql -aelf-command -h -``` - -Output example: - -``` -Usage: aelf-command [command] [options] - -Options: - -v, --version output the version number - -e, --endpoint The URI of an aelf node. Eg: http://127.0.0.1:8000 - -a, --account The address of aelf wallet - -p, --password The password of encrypted keyStore - -d, --datadir The directory that contains the aelf related files. Defaults to {home}/.local/share/aelf - -h, --help output usage information - -Commands: - call [contract-address|contract-name] [method] [params] Call a read-only method on a contract. - send [contract-address|contract-name] [method] [params] Execute a method on a contract. - get-blk-height Get the current block height of specified chain - get-chain-status Get the current chain status - get-blk-info [height|block-hash] [include-txs] Get a block info - get-tx-result [tx-id] Get a transaction result - console Open a node REPL - create [options] [save-to-file] Create a new account - wallet Show wallet details which include private key, address, public key and mnemonic - load [private-key|mnemonic] [save-to-file] Load wallet from a private key or mnemonic - proposal [proposal-contract] [organization] [expired-time] Send a proposal to an origination with a specific contract method - deploy [category] [code-path] Deprecated! Please use `aelf-command send` , check details in aelf-command `README.md` - config [key] [value] Get, set, delete or list aelf-command config - event [tx-id] Deserialize the result returned by executing a transaction - dapp-server [options] Start a dAPP SOCKET.IO server -``` - -To get help for a sub-command, such as call, use: - -```sql -aelf-command call -h -``` - -Output example: - -```sql -Usage: aelf-command call [options] [contract-address|contract-name] [method] [params] - -Call a read-only method on a contract. - -Options: - -h, --help output usage information - -Examples: - -aelf-command call -aelf-command call -aelf-command call -aelf-command call -``` - -For the interactive console: - -```sql -aelf-command console -h -``` - -Output example: - -```sql -Usage: aelf-command console [options] - -Open a node REPL - -Options: - -h, --help output usage information - -Examples: - -aelf-command console -``` \ No newline at end of file diff --git a/docs/References/command-line-Interface/_category_.json b/docs/References/command-line-Interface/_category_.json deleted file mode 100644 index dfbb298..0000000 --- a/docs/References/command-line-Interface/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "position": 1, - "label": "Command-line Interface" -} diff --git a/docs/Resources/aelf Whitepaper/index.md b/docs/Resources/aelf-whitepaper/index.md similarity index 100% rename from docs/Resources/aelf Whitepaper/index.md rename to docs/Resources/aelf-whitepaper/index.md diff --git a/docs/Resources/Browser Extension/index.md b/docs/Resources/browser-extension/index.md similarity index 100% rename from docs/Resources/Browser Extension/index.md rename to docs/Resources/browser-extension/index.md diff --git a/docs/Resources/Integration Guide/index.md b/docs/Resources/integration-guide/index.md similarity index 100% rename from docs/Resources/Integration Guide/index.md rename to docs/Resources/integration-guide/index.md diff --git a/docs/Resources/Protobuf Extension/index.md b/docs/Resources/protobuf-extension/index.md similarity index 100% rename from docs/Resources/Protobuf Extension/index.md rename to docs/Resources/protobuf-extension/index.md diff --git a/docs/Resources/Wallet and Block Explorer/index.md b/docs/Resources/wallet-and-block-explorer/index.md similarity index 100% rename from docs/Resources/Wallet and Block Explorer/index.md rename to docs/Resources/wallet-and-block-explorer/index.md diff --git a/docs/Tools/aelf CLI/Commands/index.md b/docs/Tools/aelf-cli/commands/index.md similarity index 100% rename from docs/Tools/aelf CLI/Commands/index.md rename to docs/Tools/aelf-cli/commands/index.md diff --git a/docs/Tools/aelf CLI/index.md b/docs/Tools/aelf-cli/index.md similarity index 100% rename from docs/Tools/aelf CLI/index.md rename to docs/Tools/aelf-cli/index.md diff --git a/docs/Tools/aelf CLI/Introduction/index.md b/docs/Tools/aelf-cli/introduction/index.md similarity index 100% rename from docs/Tools/aelf CLI/Introduction/index.md rename to docs/Tools/aelf-cli/introduction/index.md diff --git a/docs/Tools/Chain SDK/C# SDK/index.md b/docs/Tools/chain-sdk/c#-sdk/index.md similarity index 100% rename from docs/Tools/Chain SDK/C# SDK/index.md rename to docs/Tools/chain-sdk/c#-sdk/index.md diff --git a/docs/Tools/Chain SDK/Go SDK/index.md b/docs/Tools/chain-sdk/go-sdk/index.md similarity index 100% rename from docs/Tools/Chain SDK/Go SDK/index.md rename to docs/Tools/chain-sdk/go-sdk/index.md diff --git a/docs/Tools/Chain SDK/index.md b/docs/Tools/chain-sdk/index.md similarity index 100% rename from docs/Tools/Chain SDK/index.md rename to docs/Tools/chain-sdk/index.md diff --git a/docs/Tools/Chain SDK/Java SDK/index.md b/docs/Tools/chain-sdk/java-sdk/index.md similarity index 100% rename from docs/Tools/Chain SDK/Java SDK/index.md rename to docs/Tools/chain-sdk/java-sdk/index.md diff --git a/docs/Tools/Chain SDK/JavaScript SDK/index.md b/docs/Tools/chain-sdk/javascript-sdk/index.md similarity index 100% rename from docs/Tools/Chain SDK/JavaScript SDK/index.md rename to docs/Tools/chain-sdk/javascript-sdk/index.md diff --git a/docs/Tools/Chain SDK/PHP SDK/index.md b/docs/Tools/chain-sdk/php-sdk/index.md similarity index 100% rename from docs/Tools/Chain SDK/PHP SDK/index.md rename to docs/Tools/chain-sdk/php-sdk/index.md diff --git a/docs/Tools/Chain SDK/Python SDK/index.md b/docs/Tools/chain-sdk/python-sdk/index.md similarity index 100% rename from docs/Tools/Chain SDK/Python SDK/index.md rename to docs/Tools/chain-sdk/python-sdk/index.md diff --git a/docs/Tools/Smart Contract Templates/Deploying Contracts with BP Approval/index.md b/docs/Tools/smart-contract-templates/deploying-contracts-with-bp-approval/index.md similarity index 100% rename from docs/Tools/Smart Contract Templates/Deploying Contracts with BP Approval/index.md rename to docs/Tools/smart-contract-templates/deploying-contracts-with-bp-approval/index.md diff --git a/docs/Tools/Smart Contract Templates/Deploying Contracts without BP Approval/index.md b/docs/Tools/smart-contract-templates/deploying-contracts-without-bp-approval/index.md similarity index 100% rename from docs/Tools/Smart Contract Templates/Deploying Contracts without BP Approval/index.md rename to docs/Tools/smart-contract-templates/deploying-contracts-without-bp-approval/index.md diff --git a/docs/Tools/Smart Contract Templates/Developing Smart Contracts/index.md b/docs/Tools/smart-contract-templates/developing-smart-contracts/index.md similarity index 100% rename from docs/Tools/Smart Contract Templates/Developing Smart Contracts/index.md rename to docs/Tools/smart-contract-templates/developing-smart-contracts/index.md diff --git a/docs/Tools/Smart Contract Templates/Development Environment/index.md b/docs/Tools/smart-contract-templates/development-environment/index.md similarity index 100% rename from docs/Tools/Smart Contract Templates/Development Environment/index.md rename to docs/Tools/smart-contract-templates/development-environment/index.md diff --git a/docs/Tools/Smart Contract Templates/index.md b/docs/Tools/smart-contract-templates/index.md similarity index 100% rename from docs/Tools/Smart Contract Templates/index.md rename to docs/Tools/smart-contract-templates/index.md diff --git a/docs/Tools/Smart Contract Templates/Overview/index.md b/docs/Tools/smart-contract-templates/overview/index.md similarity index 100% rename from docs/Tools/Smart Contract Templates/Overview/index.md rename to docs/Tools/smart-contract-templates/overview/index.md diff --git a/docs/Tutorials/Operate a Node/index.md b/docs/Tutorials/operate-a-node/index.md similarity index 100% rename from docs/Tutorials/Operate a Node/index.md rename to docs/Tutorials/operate-a-node/index.md diff --git a/docs/Tutorials/Operate a Node/Run a Mainnet Node/index.md b/docs/Tutorials/operate-a-node/run-a-mainnet-node/index.md similarity index 100% rename from docs/Tutorials/Operate a Node/Run a Mainnet Node/index.md rename to docs/Tutorials/operate-a-node/run-a-mainnet-node/index.md diff --git a/docs/Tutorials/Operate a Node/Run a Side Chain/index.md b/docs/Tutorials/operate-a-node/run-a-side-chain/index.md similarity index 100% rename from docs/Tutorials/Operate a Node/Run a Side Chain/index.md rename to docs/Tutorials/operate-a-node/run-a-side-chain/index.md diff --git a/docs/Tutorials/Operate a Node/Run a Testnet Node/index.md b/docs/Tutorials/operate-a-node/run-a-testnet-node/index.md similarity index 100% rename from docs/Tutorials/Operate a Node/Run a Testnet Node/index.md rename to docs/Tutorials/operate-a-node/run-a-testnet-node/index.md diff --git a/docs/Tutorials/Operate a Node/Run aelf on Cloud/index.md b/docs/Tutorials/operate-a-node/run-aelf-on-cloud/index.md similarity index 100% rename from docs/Tutorials/Operate a Node/Run aelf on Cloud/index.md rename to docs/Tutorials/operate-a-node/run-aelf-on-cloud/index.md diff --git a/docs/Tutorials/Smart Contract Development/index.md b/docs/Tutorials/smart-contract-development/index.md similarity index 100% rename from docs/Tutorials/Smart Contract Development/index.md rename to docs/Tutorials/smart-contract-development/index.md diff --git a/docs/Quick Start/Become a Node Operator/index.md b/docs/quick-start/become-a-node-operator/index.md similarity index 100% rename from docs/Quick Start/Become a Node Operator/index.md rename to docs/quick-start/become-a-node-operator/index.md diff --git a/docs/Quick Start/Develop your first aelf Smart Contract/index.md b/docs/quick-start/develop-your-first-aelf-smart-contract/index.md similarity index 100% rename from docs/Quick Start/Develop your first aelf Smart Contract/index.md rename to docs/quick-start/develop-your-first-aelf-smart-contract/index.md diff --git a/docs/Quick Start/Explore running aelf's side chain/index.md b/docs/quick-start/explore-running-aelf-side-chain/index.md similarity index 100% rename from docs/Quick Start/Explore running aelf's side chain/index.md rename to docs/quick-start/explore-running-aelf-side-chain/index.md diff --git a/docs/Quick Start/index.md b/docs/quick-start/index.md similarity index 100% rename from docs/Quick Start/index.md rename to docs/quick-start/index.md diff --git a/docs/Quick Start/Intro to aelf Development/index.md b/docs/quick-start/intro-to-aelf-development/index.md similarity index 100% rename from docs/Quick Start/Intro to aelf Development/index.md rename to docs/quick-start/intro-to-aelf-development/index.md diff --git a/docs/Quick Start/Run a Side Chain/index.md b/docs/quick-start/run-a-side-chain/index.md similarity index 100% rename from docs/Quick Start/Run a Side Chain/index.md rename to docs/quick-start/run-a-side-chain/index.md diff --git a/docs/Quick Start/Start and run a node on aelf locally or on cloud/index.md b/docs/quick-start/start-and-run-a-node-on-aelf-locally-or-on-cloud/index.md similarity index 100% rename from docs/Quick Start/Start and run a node on aelf locally or on cloud/index.md rename to docs/quick-start/start-and-run-a-node-on-aelf-locally-or-on-cloud/index.md diff --git a/docs/References/Smart Contract API/Association Contract/index.md b/docs/references/smart-contract-api/association-contract/index.md similarity index 100% rename from docs/References/Smart Contract API/Association Contract/index.md rename to docs/references/smart-contract-api/association-contract/index.md diff --git a/docs/References/Smart Contract API/Configuration Contract/index.md b/docs/references/smart-contract-api/configuration-contract/index.md similarity index 100% rename from docs/References/Smart Contract API/Configuration Contract/index.md rename to docs/references/smart-contract-api/configuration-contract/index.md diff --git a/docs/References/Smart Contract API/Consensus Contract/index.md b/docs/references/smart-contract-api/consensus-contract/index.md similarity index 100% rename from docs/References/Smart Contract API/Consensus Contract/index.md rename to docs/references/smart-contract-api/consensus-contract/index.md diff --git a/docs/References/Smart Contract API/Cross chain Contract/index.md b/docs/references/smart-contract-api/cross-chain-contract/index.md similarity index 100% rename from docs/References/Smart Contract API/Cross chain Contract/index.md rename to docs/references/smart-contract-api/cross-chain-contract/index.md diff --git a/docs/References/Smart Contract API/Economic Contract/index.md b/docs/references/smart-contract-api/economic-contract/index.md similarity index 100% rename from docs/References/Smart Contract API/Economic Contract/index.md rename to docs/references/smart-contract-api/economic-contract/index.md diff --git a/docs/References/Smart Contract API/Election Contract/index.md b/docs/references/smart-contract-api/election-contract/index.md similarity index 100% rename from docs/References/Smart Contract API/Election Contract/index.md rename to docs/references/smart-contract-api/election-contract/index.md diff --git a/docs/References/Smart Contract API/Genesis Contract/index.md b/docs/references/smart-contract-api/genesis-contract/index.md similarity index 100% rename from docs/References/Smart Contract API/Genesis Contract/index.md rename to docs/references/smart-contract-api/genesis-contract/index.md diff --git a/docs/References/Smart Contract API/index.md b/docs/references/smart-contract-api/index.md similarity index 100% rename from docs/References/Smart Contract API/index.md rename to docs/references/smart-contract-api/index.md diff --git a/docs/References/Smart Contract API/Multi Token Contract/index.md b/docs/references/smart-contract-api/multi-token-contract/index.md similarity index 100% rename from docs/References/Smart Contract API/Multi Token Contract/index.md rename to docs/references/smart-contract-api/multi-token-contract/index.md diff --git a/docs/References/Smart Contract API/Parliament Contract/index.md b/docs/references/smart-contract-api/parliament-contract/index.md similarity index 100% rename from docs/References/Smart Contract API/Parliament Contract/index.md rename to docs/references/smart-contract-api/parliament-contract/index.md diff --git a/docs/References/Smart Contract API/Profit Contract/index.md b/docs/references/smart-contract-api/profit-contract/index.md similarity index 100% rename from docs/References/Smart Contract API/Profit Contract/index.md rename to docs/references/smart-contract-api/profit-contract/index.md diff --git a/docs/References/Smart Contract API/Referendum Contract/index.md b/docs/references/smart-contract-api/referendum-contract/index.md similarity index 100% rename from docs/References/Smart Contract API/Referendum Contract/index.md rename to docs/references/smart-contract-api/referendum-contract/index.md diff --git a/docs/References/Smart Contract API/Token Convert Contract/index.md b/docs/references/smart-contract-api/token-convert-contract/index.md similarity index 100% rename from docs/References/Smart Contract API/Token Convert Contract/index.md rename to docs/references/smart-contract-api/token-convert-contract/index.md diff --git a/docs/References/Smart Contract API/Token Holder Contract/index.md b/docs/references/smart-contract-api/token-holder-contract/index.md similarity index 100% rename from docs/References/Smart Contract API/Token Holder Contract/index.md rename to docs/references/smart-contract-api/token-holder-contract/index.md diff --git a/docs/References/Smart Contract API/Treasury Contract/index.md b/docs/references/smart-contract-api/treasury-contract/index.md similarity index 100% rename from docs/References/Smart Contract API/Treasury Contract/index.md rename to docs/references/smart-contract-api/treasury-contract/index.md diff --git a/docs/References/Smart Contract API/Vote Contract/index.md b/docs/references/smart-contract-api/vote-contract/index.md similarity index 100% rename from docs/References/Smart Contract API/Vote Contract/index.md rename to docs/references/smart-contract-api/vote-contract/index.md diff --git a/docs/References/Web API/Chain API/index.md b/docs/references/web-api/chain-api/index.md similarity index 100% rename from docs/References/Web API/Chain API/index.md rename to docs/references/web-api/chain-api/index.md diff --git a/docs/References/Web API/index.md b/docs/references/web-api/index.md similarity index 100% rename from docs/References/Web API/index.md rename to docs/references/web-api/index.md diff --git a/docs/References/Web API/Net API/index.md b/docs/references/web-api/net-api/index.md similarity index 100% rename from docs/References/Web API/Net API/index.md rename to docs/references/web-api/net-api/index.md diff --git a/docs/Understanding aelf/ACS Introduction/ACS0 - Contract Deployment Standard/index.md b/docs/understanding-aelf/acs-introduction/acs0-contract-deployment-standard/index.md similarity index 100% rename from docs/Understanding aelf/ACS Introduction/ACS0 - Contract Deployment Standard/index.md rename to docs/understanding-aelf/acs-introduction/acs0-contract-deployment-standard/index.md diff --git a/docs/Understanding aelf/ACS Introduction/ACS1 - Transaction Fee Standard/index.md b/docs/understanding-aelf/acs-introduction/acs1-transaction-fee-standard/index.md similarity index 100% rename from docs/Understanding aelf/ACS Introduction/ACS1 - Transaction Fee Standard/index.md rename to docs/understanding-aelf/acs-introduction/acs1-transaction-fee-standard/index.md diff --git a/docs/Understanding aelf/ACS Introduction/ACS10 - Dividend Pool Standard/index.md b/docs/understanding-aelf/acs-introduction/acs10-dividend-pool-standard/index.md similarity index 100% rename from docs/Understanding aelf/ACS Introduction/ACS10 - Dividend Pool Standard/index.md rename to docs/understanding-aelf/acs-introduction/acs10-dividend-pool-standard/index.md diff --git a/docs/Understanding aelf/ACS Introduction/ACS11 - Cross Chain Consensus Standard/index.md b/docs/understanding-aelf/acs-introduction/acs11-cross-chain-consensus-standard/index.md similarity index 100% rename from docs/Understanding aelf/ACS Introduction/ACS11 - Cross Chain Consensus Standard/index.md rename to docs/understanding-aelf/acs-introduction/acs11-cross-chain-consensus-standard/index.md diff --git a/docs/Understanding aelf/ACS Introduction/ACS12 - User Contract Standard/index.md b/docs/understanding-aelf/acs-introduction/acs12-user-contract-standard/index.md similarity index 100% rename from docs/Understanding aelf/ACS Introduction/ACS12 - User Contract Standard/index.md rename to docs/understanding-aelf/acs-introduction/acs12-user-contract-standard/index.md diff --git a/docs/Understanding aelf/ACS Introduction/ACS2 - Parallel Execution Standard/index.md b/docs/understanding-aelf/acs-introduction/acs2-parallel-execution-standard/index.md similarity index 100% rename from docs/Understanding aelf/ACS Introduction/ACS2 - Parallel Execution Standard/index.md rename to docs/understanding-aelf/acs-introduction/acs2-parallel-execution-standard/index.md diff --git a/docs/Understanding aelf/ACS Introduction/ACS3 - Contract Proposal Standard/index.md b/docs/understanding-aelf/acs-introduction/acs3-contract-proposal-standard/index.md similarity index 100% rename from docs/Understanding aelf/ACS Introduction/ACS3 - Contract Proposal Standard/index.md rename to docs/understanding-aelf/acs-introduction/acs3-contract-proposal-standard/index.md diff --git a/docs/Understanding aelf/ACS Introduction/ACS4 - Consensus Standard/index.md b/docs/understanding-aelf/acs-introduction/acs4-consensus-standard/index.md similarity index 100% rename from docs/Understanding aelf/ACS Introduction/ACS4 - Consensus Standard/index.md rename to docs/understanding-aelf/acs-introduction/acs4-consensus-standard/index.md diff --git a/docs/Understanding aelf/ACS Introduction/ACS5 - Contract Threshold Standard/index.md b/docs/understanding-aelf/acs-introduction/acs5-contract-threshold-standard/index.md similarity index 100% rename from docs/Understanding aelf/ACS Introduction/ACS5 - Contract Threshold Standard/index.md rename to docs/understanding-aelf/acs-introduction/acs5-contract-threshold-standard/index.md diff --git a/docs/Understanding aelf/ACS Introduction/ACS6 - Random Number Generation/index.md b/docs/understanding-aelf/acs-introduction/acs6-random-number-generation/index.md similarity index 100% rename from docs/Understanding aelf/ACS Introduction/ACS6 - Random Number Generation/index.md rename to docs/understanding-aelf/acs-introduction/acs6-random-number-generation/index.md diff --git a/docs/Understanding aelf/ACS Introduction/ACS7 - Cross Chain Standard/index.md b/docs/understanding-aelf/acs-introduction/acs7-cross-chain-standard/index.md similarity index 100% rename from docs/Understanding aelf/ACS Introduction/ACS7 - Cross Chain Standard/index.md rename to docs/understanding-aelf/acs-introduction/acs7-cross-chain-standard/index.md diff --git a/docs/Understanding aelf/ACS Introduction/ACS8 - Transaction Resource Token Fee Standard/index.md b/docs/understanding-aelf/acs-introduction/acs8-transaction-resource-token-fee-standard/index.md similarity index 100% rename from docs/Understanding aelf/ACS Introduction/ACS8 - Transaction Resource Token Fee Standard/index.md rename to docs/understanding-aelf/acs-introduction/acs8-transaction-resource-token-fee-standard/index.md diff --git a/docs/Understanding aelf/ACS Introduction/ACS9 - Contract Profit Dividend Standard/index.md b/docs/understanding-aelf/acs-introduction/acs9-contract-profit-dividend-standard/index.md similarity index 100% rename from docs/Understanding aelf/ACS Introduction/ACS9 - Contract Profit Dividend Standard/index.md rename to docs/understanding-aelf/acs-introduction/acs9-contract-profit-dividend-standard/index.md diff --git a/docs/Understanding aelf/ACS Introduction/index.md b/docs/understanding-aelf/acs-introduction/index.md similarity index 100% rename from docs/Understanding aelf/ACS Introduction/index.md rename to docs/understanding-aelf/acs-introduction/index.md diff --git a/docs/Understanding aelf/Addresses/index.md b/docs/understanding-aelf/addresses/index.md similarity index 100% rename from docs/Understanding aelf/Addresses/index.md rename to docs/understanding-aelf/addresses/index.md diff --git a/docs/Understanding aelf/Consensus/index.md b/docs/understanding-aelf/consensus/index.md similarity index 100% rename from docs/Understanding aelf/Consensus/index.md rename to docs/understanding-aelf/consensus/index.md diff --git a/docs/Understanding aelf/Core/Implementation/index.md b/docs/understanding-aelf/core/implementation/index.md similarity index 100% rename from docs/Understanding aelf/Core/Implementation/index.md rename to docs/understanding-aelf/core/implementation/index.md diff --git a/docs/Understanding aelf/Core/index.md b/docs/understanding-aelf/core/index.md similarity index 100% rename from docs/Understanding aelf/Core/index.md rename to docs/understanding-aelf/core/index.md diff --git a/docs/Understanding aelf/Core/Introduction/index.md b/docs/understanding-aelf/core/introduction/index.md similarity index 100% rename from docs/Understanding aelf/Core/Introduction/index.md rename to docs/understanding-aelf/core/introduction/index.md diff --git a/docs/Understanding aelf/Cross Chain/Architecture/index.md b/docs/understanding-aelf/cross-chain/architecture/index.md similarity index 100% rename from docs/Understanding aelf/Cross Chain/Architecture/index.md rename to docs/understanding-aelf/cross-chain/architecture/index.md diff --git a/docs/Understanding aelf/Cross Chain/Cross Chain Transfer/index.md b/docs/understanding-aelf/cross-chain/cross-chain-transfer/index.md similarity index 100% rename from docs/Understanding aelf/Cross Chain/Cross Chain Transfer/index.md rename to docs/understanding-aelf/cross-chain/cross-chain-transfer/index.md diff --git a/docs/Understanding aelf/Cross Chain/Cross Chain Verification/index.md b/docs/understanding-aelf/cross-chain/cross-chain-verification/index.md similarity index 100% rename from docs/Understanding aelf/Cross Chain/Cross Chain Verification/index.md rename to docs/understanding-aelf/cross-chain/cross-chain-verification/index.md diff --git a/docs/Understanding aelf/Cross Chain/index.md b/docs/understanding-aelf/cross-chain/index.md similarity index 100% rename from docs/Understanding aelf/Cross Chain/index.md rename to docs/understanding-aelf/cross-chain/index.md diff --git a/docs/Understanding aelf/Cross Chain/Introduction/index.md b/docs/understanding-aelf/cross-chain/introduction/index.md similarity index 100% rename from docs/Understanding aelf/Cross Chain/Introduction/index.md rename to docs/understanding-aelf/cross-chain/introduction/index.md diff --git a/docs/Understanding aelf/Cross Chain/Verify/index.md b/docs/understanding-aelf/cross-chain/verify/index.md similarity index 100% rename from docs/Understanding aelf/Cross Chain/Verify/index.md rename to docs/understanding-aelf/cross-chain/verify/index.md diff --git a/docs/Understanding aelf/index.md b/docs/understanding-aelf/index.md similarity index 100% rename from docs/Understanding aelf/index.md rename to docs/understanding-aelf/index.md diff --git a/docs/Understanding aelf/Network/index.md b/docs/understanding-aelf/network/index.md similarity index 100% rename from docs/Understanding aelf/Network/index.md rename to docs/understanding-aelf/network/index.md diff --git a/docs/Understanding aelf/Smart Contract/architecture/index.md b/docs/understanding-aelf/smart-contract/architecture/index.md similarity index 100% rename from docs/Understanding aelf/Smart Contract/architecture/index.md rename to docs/understanding-aelf/smart-contract/architecture/index.md diff --git a/docs/Understanding aelf/Smart Contract/event/index.md b/docs/understanding-aelf/smart-contract/event/index.md similarity index 100% rename from docs/Understanding aelf/Smart Contract/event/index.md rename to docs/understanding-aelf/smart-contract/event/index.md diff --git a/docs/Understanding aelf/Smart Contract/index.md b/docs/understanding-aelf/smart-contract/index.md similarity index 100% rename from docs/Understanding aelf/Smart Contract/index.md rename to docs/understanding-aelf/smart-contract/index.md diff --git a/docs/Understanding aelf/Smart Contract/messages/index.md b/docs/understanding-aelf/smart-contract/messages/index.md similarity index 100% rename from docs/Understanding aelf/Smart Contract/messages/index.md rename to docs/understanding-aelf/smart-contract/messages/index.md diff --git a/docs/Understanding aelf/Smart Contract/requirements-and-restrictions/index.md b/docs/understanding-aelf/smart-contract/requirements-and-restrictions/index.md similarity index 100% rename from docs/Understanding aelf/Smart Contract/requirements-and-restrictions/index.md rename to docs/understanding-aelf/smart-contract/requirements-and-restrictions/index.md diff --git a/docs/Understanding aelf/Smart Contract/requirements-and-restrictions/namespace and type restrictions/index.md b/docs/understanding-aelf/smart-contract/requirements-and-restrictions/namespace-and-type-restrictions/index.md similarity index 100% rename from docs/Understanding aelf/Smart Contract/requirements-and-restrictions/namespace and type restrictions/index.md rename to docs/understanding-aelf/smart-contract/requirements-and-restrictions/namespace-and-type-restrictions/index.md diff --git a/docs/Understanding aelf/Smart Contract/requirements-and-restrictions/other restrictions/index.md b/docs/understanding-aelf/smart-contract/requirements-and-restrictions/other-restrictions/index.md similarity index 100% rename from docs/Understanding aelf/Smart Contract/requirements-and-restrictions/other restrictions/index.md rename to docs/understanding-aelf/smart-contract/requirements-and-restrictions/other-restrictions/index.md diff --git a/docs/Understanding aelf/Smart Contract/requirements-and-restrictions/project requirements/index.md b/docs/understanding-aelf/smart-contract/requirements-and-restrictions/project-requirements/index.md similarity index 100% rename from docs/Understanding aelf/Smart Contract/requirements-and-restrictions/project requirements/index.md rename to docs/understanding-aelf/smart-contract/requirements-and-restrictions/project-requirements/index.md diff --git a/docs/Understanding aelf/Smart Contract/requirements-and-restrictions/structure restrictions and requirements/index.md b/docs/understanding-aelf/smart-contract/requirements-and-restrictions/structure-restrictions-and-requirements/index.md similarity index 100% rename from docs/Understanding aelf/Smart Contract/requirements-and-restrictions/structure restrictions and requirements/index.md rename to docs/understanding-aelf/smart-contract/requirements-and-restrictions/structure-restrictions-and-requirements/index.md diff --git a/docs/Understanding aelf/Smart Contract/service/index.md b/docs/understanding-aelf/smart-contract/service/index.md similarity index 100% rename from docs/Understanding aelf/Smart Contract/service/index.md rename to docs/understanding-aelf/smart-contract/service/index.md diff --git a/docs/Understanding aelf/Transactions/index.md b/docs/understanding-aelf/transactions/index.md similarity index 100% rename from docs/Understanding aelf/Transactions/index.md rename to docs/understanding-aelf/transactions/index.md diff --git a/docs/Quick Start/Start and run a node on aelf locally or on cloud/gcp-curl-chain-stat.png b/static/img/gcp-curl-chain-stat.png similarity index 100% rename from docs/Quick Start/Start and run a node on aelf locally or on cloud/gcp-curl-chain-stat.png rename to static/img/gcp-curl-chain-stat.png diff --git a/docs/Quick Start/Start and run a node on aelf locally or on cloud/gcp-deployed.png b/static/img/gcp-deployed.png similarity index 100% rename from docs/Quick Start/Start and run a node on aelf locally or on cloud/gcp-deployed.png rename to static/img/gcp-deployed.png diff --git a/docs/Quick Start/Start and run a node on aelf locally or on cloud/gcp-docker-compose.png b/static/img/gcp-docker-compose.png similarity index 100% rename from docs/Quick Start/Start and run a node on aelf locally or on cloud/gcp-docker-compose.png rename to static/img/gcp-docker-compose.png diff --git a/docs/Quick Start/Start and run a node on aelf locally or on cloud/gcp-ssh-select.png b/static/img/gcp-ssh-select.png similarity index 100% rename from docs/Quick Start/Start and run a node on aelf locally or on cloud/gcp-ssh-select.png rename to static/img/gcp-ssh-select.png diff --git a/docs/Quick Start/Start and run a node on aelf locally or on cloud/gcp-step1.png b/static/img/gcp-step1.png similarity index 100% rename from docs/Quick Start/Start and run a node on aelf locally or on cloud/gcp-step1.png rename to static/img/gcp-step1.png diff --git a/docs/Quick Start/Start and run a node on aelf locally or on cloud/gcp-step2-a.png b/static/img/gcp-step2-a.png similarity index 100% rename from docs/Quick Start/Start and run a node on aelf locally or on cloud/gcp-step2-a.png rename to static/img/gcp-step2-a.png diff --git a/docs/Quick Start/Start and run a node on aelf locally or on cloud/gcp-step2-b.png b/static/img/gcp-step2-b.png similarity index 100% rename from docs/Quick Start/Start and run a node on aelf locally or on cloud/gcp-step2-b.png rename to static/img/gcp-step2-b.png