Key considerations
Mainly introduce the parameter configuration in smart contract development.
User pay ratio
The user payment ratio is defined as the ratio of expenses that the smart contract user should pay. For example, if the user pay ratio is set to 60, the user pays 60% of the contract cost. This parameter will accept any integer between 0 and 100, including 0 and 100. However, it is strongly recommended to set a value between 1 and 99. The main purpose is to protect yourself and avoid contract developers from malicious infinite loop timeout attacks.
Set up when the contract is deployed:
In Vision-Box
When deploying the contract, use the visionbox.js file and modify the parameter of consume_user_resource_percent:, which refers to the user's payment ratio.
Text
In VisionWeb
The visionWeb.contract.new API call accepts a parameter named userFeePercentage. This parameter refers to the user payment ratio.
Text
Last updated