Skip to content

Commit dd8143d

Browse files
committed
2 parents 1243e57 + 3d67cb7 commit dd8143d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+258
-258
lines changed

docs/architecture/database.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Database configuration
2-
Java-tron data storage supports LevelDB or RocksDB, and LevelDB is used by default. You can also choose RocksDB, which provides lots of configuration parameters, allowing nodes to be tuned according to their own machine configuration. The node database occupies less disk space than LevelDB. At the same time, RocksDB supports data backup during runtime, and the backup time only takes a few seconds.
2+
java-tron data storage supports LevelDB or RocksDB, and LevelDB is used by default. You can also choose RocksDB, which provides lots of configuration parameters, allowing nodes to be tuned according to their own machine configuration. The node database occupies less disk space than LevelDB. At the same time, RocksDB supports data backup during runtime, and the backup time only takes a few seconds.
33

4-
The following describes how to set the storage engine of the Java-tron node to RocksDB, and how to perform data conversion between leveldb and rocksdb.
4+
The following describes how to set the storage engine of the java-tron node to RocksDB, and how to perform data conversion between leveldb and rocksdb.
55

66
# RocksDB
77

docs/architecture/event.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
### TIP
66

7-
The TIP: [TIP-12:Tron event subscribes model](https://github.com/tronprotocol/tips/blob/master/tip-12.md) .
7+
The TIP: [TIP-12:TRON event subscribes model](https://github.com/tronprotocol/tips/blob/master/tip-12.md) .
88

99
### Event Type
1010

@@ -72,7 +72,7 @@ Contract Event and Contract Log Even support event filter function which include
7272
```
7373
fromBlock: the start block number
7474
toBlock: the end block number
75-
contractAddress: contract adsresses list
75+
contractAddress: contract addresses list
7676
contractTopics: contract topics list
7777
```
7878

@@ -98,21 +98,21 @@ contractTopics: contract topics list
9898

9999
#### Event query
100100

101-
Tron Event Query Service
101+
TRON Event Query Service
102102

103103
TronEventQuery is implemented with Tron's new event subscribe model. It uses same query interface with Tron-Grid. Users can also subscribe block trigger, transaction trigger, contract log trigger, and contract event trigger. TronEvent is independent of a particular branch of java-tron, the new event subscribes model will be released on version 3.5 of java-tron.
104104

105-
For more information of tron event subscribe model, please refer to [TIP-12](https://github.com/tronprotocol/TIPs/issues/12).
105+
For more information of TRON event subscribe model, please refer to [TIP-12](https://github.com/tronprotocol/TIPs/issues/12).
106106

107107
- [Event query deployment](https://tronprotocol.github.io/documentation-en/developers/deployment/#event-subscribe-plugin-deployment)
108108
- [Event query HTTP API](https://github.com/tronprotocol/documentation-en/tree/master/docs_without_index/plugin/event-query-http.md)
109109

110110

111-
## Using Java-tron's Built-in Message Queue for Event Subscription
111+
## Using java-tron's Built-in Message Queue for Event Subscription
112112

113-
TRON provides event subscription service. Developers can not only obtain on-chain events through event plugin, but also through [Java-tron’s built-in ZeroMQ message queue](https://github.com/tronprotocol/tips/blob/master/tip-28.md). The difference is that event plugin needs to be additionally deployed, which is used to implement event storage: developers can choose appropriate storage tools according to their needs, such as MongoDB, Kafka, etc., and the plugin help complete the storage of subscribed events. Java-tron's built-in ZeroMQ does not require additional deployment operations. Event subscribers can directly connect to the publisher's ip and port, set subscription topics, and receive subscribed events. However, this method does not provide event storage. Therefore, when developers want to subscribe to events directly from nodes for a short period of time, then using the built-in message queue will be a more appropriate choice.
113+
TRON provides event subscription service. Developers can not only obtain on-chain events through event plugin, but also through [java-tron’s built-in ZeroMQ message queue](https://github.com/tronprotocol/tips/blob/master/tip-28.md). The difference is that event plugin needs to be additionally deployed, which is used to implement event storage: developers can choose appropriate storage tools according to their needs, such as MongoDB, Kafka, etc., and the plugin help complete the storage of subscribed events. java-tron's built-in ZeroMQ does not require additional deployment operations. Event subscribers can directly connect to the publisher's ip and port, set subscription topics, and receive subscribed events. However, this method does not provide event storage. Therefore, when developers want to subscribe to events directly from nodes for a short period of time, then using the built-in message queue will be a more appropriate choice.
114114

115-
This article will introduce how to subscribe to events through Java-tron's built-in message queue in detail.
115+
This article will introduce how to subscribe to events through java-tron's built-in message queue in detail.
116116

117117

118118
### Configure node
@@ -190,4 +190,4 @@ When the node has a new block, the subscriber will receive block event, the outp
190190
```
191191
received a message related to: blockTrigger, containing message: {"timeStamp":1678343709000,"triggerName":"blockTrigger","blockNumber":1361,"blockHash":"00000000000005519b3995cd638753a862c812d1bda11de14bbfaa5ad3383280","transactionSize":0,"latestSolidifiedBlockNumber":1361,"transactionList":[]}
192192
received a message related to: blockTrigger, containing message: {"timeStamp":1678343712000,"triggerName":"blockTrigger","blockNumber":1362,"blockHash":"0000000000000552d53d1bdd9929e4533a983f14df8931ee9b3bf6d6c74a47b0","transactionSize":0,"latestSolidifiedBlockNumber":1362,"transactionList":[]}
193-
```
193+
```

docs/clients/tron-grid.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ TronGrid provides TRON clients running in the cloud, so you don't have to run on
88

99
TronGrid offers an easy to use hosted API, load balanced full nodes, secure and reliable developer tools with direct access to the TRON Network.
1010

11-
TronGrid uses a set of NodeJS apps to talk with Redis and PostgreSQL to provide a simple, fast and reliable query interface for the Tron API.
11+
TronGrid uses a set of NodeJS apps to talk with Redis and PostgreSQL to provide a simple, fast and reliable query interface for the TRON API.
1212

1313
TronGrid supports 2 types of api:
1414

docs/clients/wallet-cli-command.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ This command is used to manage account permissions, assign permissions to other
209209
* active: access to other features of accounts, and access that authorizes a certain feature. Block production authorization is not included if it's for SR purposes.
210210
* witness: only for super representatives, block production authorization will be granted to one of the other users.
211211

212-
**NOTE** the parameter`Permission` must written in JSON format and entered in line. If the owner accountis not SR, then do not assign super representative permission.
212+
**NOTE** the parameter`Permission` must written in JSON format and entered in line. If the owner account is not SR, then do not assign super representative permission.
213213
```shell
214214
wallet> updateaccountpermission TSzdGHnhYnQKFF4LKrRLztkjYAvbNoxnQ8 {"owner_permission":{"keys":[{"address":"TSzdGHnhYnQKFF4LKrRLztkjYAvbNoxnQ8","weight":1}],"threshold":1,"type":0,"permission_name":"owner"},"active_permissions":[{"operations":"7fff1fc0033e0000000000000000000000000000000000000000000000000000","keys":[{"address":"TB9qhqbev6DpX8mxdf3zDdtSQ6GC6Vb6Ej","weight":1},{"address":"TXBpeye7UQ4dDZEnmGDv4vX37mBYDo1tUE","weight":1}],"threshold":2,"type":2,"permission_name":"active12323"}]}
215215
{
@@ -1222,7 +1222,7 @@ wallet> TriggerContract [ownerAddress] [contractAddress] [method] [args] [isHex]
12221222
```
12231223
12241224
* `OwnerAddress `The address of the account that initiated the transaction, optional, default value is the address of the login account.
1225-
* `ContractAddress` is the smart contarct address.
1225+
* `ContractAddress` is the smart contract address.
12261226
* `method` is the name of the function and parameters, please refer to the example below.
12271227
* `args` is a parameter for placeholding, pass '#' instead when `method` does not need extra parameters.
12281228
* `isHex` controls the format of the parameters method and args, whether they are in hex string or not.
@@ -1884,9 +1884,9 @@ wallet> getproposal 34
18841884
18851885
### VoteWitness
18861886
1887-
Voting requires Tron Power, which can be obtained by freezing funds.
1887+
Voting requires TRON Power, which can be obtained by freezing funds.
18881888
```
1889-
wallet> votewitness [SR(Super Representatives) address] [Tron Power Amount]
1889+
wallet> votewitness [SR(Super Representatives) address] [TRON Power Amount]
18901890
```
18911891
18921892
* The share calculation method is: 1 unit of share can be obtained for every 1TRX frozen.
@@ -1896,7 +1896,7 @@ wallet> votewitness [SR(Super Representatives) address] [Tron Power Amount]
18961896
18971897
For example:
18981898
```shell
1899-
wallet> freezeBalance 100000000 3 1 address # Freeze 10TRX and acquire 10 units of Tron Power
1899+
wallet> freezeBalance 100000000 3 1 address # Freeze 10TRX and acquire 10 units of TRON Power
19001900
19011901
wallet> votewitness [SR1] 4 [SR2] 6 # Cast 4 votes for SR1 and 6 votes for SR2 at the same time
19021902

docs/clients/wallet-cli.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

22
## What is Wallet-CLI?
3-
Wallet-Cli is an interactive command-line wallet that supports the TRON network for signing and broadcasting transactions in a secure local environment, as well as access to on-chain data. Wallet-Cli supports key management, you can import the private key into the wallet, Wallet-Cli will encrypt your private key with a symmetric encryption algorithm and store it in a keystore file. Wallet-Cli does not store on-chain data locally. It uses gRPC to communicate with a Java-tron node. You need to configure the Java-tron node to be linked in the configuration file. The following figure shows the process of the use of Wallet-Cli to sign and broadcast when transferring TRX:
3+
Wallet-Cli is an interactive command-line wallet that supports the TRON network for signing and broadcasting transactions in a secure local environment, as well as access to on-chain data. Wallet-Cli supports key management, you can import the private key into the wallet, Wallet-Cli will encrypt your private key with a symmetric encryption algorithm and store it in a keystore file. Wallet-Cli does not store on-chain data locally. It uses gRPC to communicate with a java-tron node. You need to configure the java-tron node to be linked in the configuration file. The following figure shows the process of the use of Wallet-Cli to sign and broadcast when transferring TRX:
44
![](https://i.imgur.com/NRKmZmE.png)
55

6-
The user first runs the `Login` command to unlock the wallet, and then runs the `SendCoin` command to send TRX, Wallet-Cli will build and sign the transaction locally, and then call the BroadcastTransaction gRPC API of the Java-tron node to broadcast the transaction to the network. After the broadcast is successful, the Java-tron node will return the transaction hash to Wallet-Cli, and Wallet-Cli will display the transaction hash to the user.
6+
The user first runs the `Login` command to unlock the wallet, and then runs the `SendCoin` command to send TRX, Wallet-Cli will build and sign the transaction locally, and then call the BroadcastTransaction gRPC API of the java-tron node to broadcast the transaction to the network. After the broadcast is successful, the java-tron node will return the transaction hash to Wallet-Cli, and Wallet-Cli will display the transaction hash to the user.
77

88
Install and run: [Wallet-Cli](https://github.com/tronprotocol/wallet-cli)
99

docs/contracts/contract.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Smart contract is a computerized transaction protocol that automatically implements its terms. Smart contract is the same as common contract, they all define the terms and rules related to the participants. Once the contract is started, it can runs in the way it is designed.
66

7-
TRON smart contract support Solidity language in (Ethereum). You can find the latest solidity version in the [Tron solidity repository](https://github.com/tronprotocol/solidity/releases). Write a smart contract, then build the smart contract and deploy it to TRON network. When the smart contract is triggered, the corresponding function will be executed automatically.
7+
TRON smart contract support Solidity language in (Ethereum). You can find the latest solidity version in the [TRON solidity repository](https://github.com/tronprotocol/solidity/releases). Write a smart contract, then build the smart contract and deploy it to TRON network. When the smart contract is triggered, the corresponding function will be executed automatically.
88

99
## Smart Contract Features
1010
TRON virtual machine is based on Ethereum solidity language, it also has TRON's own features.
@@ -62,12 +62,12 @@ message SmartContract {
6262
```
6363
origin_address: smart contract creator address
6464
contract_address: smart contract address
65-
abi: the api information of the all the function of the smart contract
65+
abi: the api information of all the function of the smart contract
6666
bytecode: smart contract byte code
6767
call_value: TRX transferred into smart contract while call the contract
6868
consume_user_resource_percent: resource consumption percentage set by the developer
6969
name: smart contract name
70-
origin_energy_limit: energy consumption of the developer limit in one call, must greater than 0. For the old contracts, if this parameter is not set, it will be set 0, developer can use updateEnergyLimit api to update this parameter (must greater than 0)
70+
origin_energy_limit: energy consumption of the developer limit in one call, must be greater than 0. For the old contracts, if this parameter is not set, it will be set 0, developer can use updateEnergyLimit api to update this parameter (must greater than 0)
7171

7272
Through other two grpc message types CreateSmartContract and TriggerSmartContract to create and use smart contract.
7373

@@ -77,13 +77,13 @@ Through other two grpc message types CreateSmartContract and TriggerSmartContrac
7777

7878
There are two types of function according to whether any change will be made to the properties on the chain: constant function and inconstant function
7979
Constant function uses view/pure/constant to decorate, will return the result on the node it is called and not be broadcasted in the form of a transaction
80-
Inconstant function will be broadcasted in the form of a transaction while be called, the function will change the data on the chain, such as transfer, changing the value of the internal variables of contracts, etc.
80+
Inconstant function will be broadcasted in the form of a transaction while being called, the function will change the data on the chain, such as transfer, changing the value of the internal variables of contracts, etc.
8181

8282
Note: If you use create command inside a contract (CREATE instruction), even use view/pure/constant to decorate the dynamically created contract function, this function will still be treated as inconstant function, be dealt in the form of transaction.
8383

8484
* **message calls**
8585

86-
Message calls can call the functions of other contracts, also can transfer TRX to the accounts of contract and none-contract. Like the common TRON triggercontract, Message calls have initiator, recipient, data, transfer amount, fees and return attributes. Every message call can generate a new one recursively. Contract can define the distribution of the remaining energy in the internal message call. If it comes with OutOfEnergyException in the internal message call, it will return false, but not error. In the meanwhile, only the gas sent with the internal message call will be consumed, if energy is not specified in call.value(energy), all the remaining energy will be used.
86+
Message calls can call the functions of other contracts, also can transfer TRX to the accounts of contract and none-contract. Like the common TRON triggercontract, Message calls have initiator, recipient, data, transfer amount, fees and return attributes. Every message call can generate a new one recursively. Contract can define the distribution of the remaining energy in the internal message call. If it comes with OutOfEnergyException in the internal message call, it will return false, but not error. In the meantime, only the gas sent with the internal message call will be consumed, if energy is not specified in call.value(energy), all the remaining energy will be used.
8787

8888
* **delegate call/call code/library**
8989

@@ -135,7 +135,7 @@ Ethereum VM address is 20 bytes, but TRON's VM address is 21 bytes.
135135
Need to convert TRON's address while using in solidity (recommended):
136136
```text
137137
/**
138-
* @dev convert uint256 (HexString add 0x at beginning) tron address to solidity address type
138+
* @dev convert uint256 (HexString add 0x at beginning) TRON address to solidity address type
139139
* @param tronAddress uint256 tronAddress, begin with 0x, followed by HexString
140140
* @return Solidity address type
141141
*/

0 commit comments

Comments
 (0)