Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get the mapping between number of network parameter and string name of it #6179

Closed
GrothenDI opened this issue Feb 13, 2025 · 7 comments

Comments

@GrothenDI
Copy link

No description provided.

@ferdinand026
Copy link

@GrothenDI This doc provides the network id and the parameter name and value: https://developers.tron.network/reference/wallet-getchainparameters .

@King31T
Copy link

King31T commented Feb 14, 2025

This doc provides the network id and the parameter name and value: https://developers.tron.network/reference/wallet-getchainparameters .

@ferdinand026 i have 2 questions

  1. Why the number of parameters are not continuous?
  2. We can see 70 parameters by using the api, but in tronscan there are only 65, the other 5 parameters don't have value, so how to assign values when these 5 parameters are used in main network?

@Sunny6889
Copy link

@King31T Which of these 5 parameters?

@King31T
Copy link

King31T commented Feb 14, 2025

@Sunny6889 Actually, there are 15 keys don't have pairing values according to the return by api getchainparameters of mainnet, they are:
getAllowUpdateAccountName
getAllowAdaptiveEnergy
getTotalEnergyAverageUsage
getAllowAccountStateRoot
getAllowProtoFilterNum
getForbidTransferToContract
getAllowMarketTransaction
getMarketSellFee
getMarketCancelFee
getAllowPBFT
getAllowTransactionFeePool
getAllowNewResourceModel
getAllowTvmFreeze
getAllowTvmCompatibleEvm
getAllowAccountAssetOptimization

@laurenceja
Copy link

This doc provides the network id and the parameter name and value: https://developers.tron.network/reference/wallet-getchainparameters .

@ferdinand026 i have 2 questions

  1. Why the number of parameters are not continuous?
  2. We can see 70 parameters by using the api, but in tronscan there are only 65, the other 5 parameters don't have value, so how to assign values when these 5 parameters are used in main network?

@King31T 1. If multiple features are developed at the same time, each of which contains a parameter, but only one of them is released first, at this time it is possible that the IDs are not continuous.
2. Some parameters are deprecated, so they are not shown on tronscan.
3. If the value of the parameter is zero, getchainparameters will returns empty for that parameter.

@King31T
Copy link

King31T commented Mar 4, 2025

This doc provides the network id and the parameter name and value: https://developers.tron.network/reference/wallet-getchainparameters .
@ferdinand026 i have 2 questions

  1. Why the number of parameters are not continuous?
  2. We can see 70 parameters by using the api, but in tronscan there are only 65, the other 5 parameters don't have value, so how to assign values when these 5 parameters are used in main network?

@King31T 1. If multiple features are developed at the same time, each of which contains a parameter, but only one of them is released first, at this time it is possible that the IDs are not continuous. 2. Some parameters are deprecated, so they are not shown on tronscan. 3. If the value of the parameter is zero, getchainparameters will returns empty for that parameter.

@laurenceja Is the parameter ID assigned during the release or during development?

@laurenceja
Copy link

This doc provides the network id and the parameter name and value: https://developers.tron.network/reference/wallet-getchainparameters .
@ferdinand026 i have 2 questions

  1. Why the number of parameters are not continuous?
  2. We can see 70 parameters by using the api, but in tronscan there are only 65, the other 5 parameters don't have value, so how to assign values when these 5 parameters are used in main network?

@King31T 1. If multiple features are developed at the same time, each of which contains a parameter, but only one of them is released first, at this time it is possible that the IDs are not continuous. 2. Some parameters are deprecated, so they are not shown on tronscan. 3. If the value of the parameter is zero, getchainparameters will returns empty for that parameter.

@laurenceja Is the parameter ID assigned during the release or during development?

I think development.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants