Solidity是否支持浮点数

Does Solidity supports floating point number

我是 solidity 语言的新手。看过他们的文档。有没有 floating point 数据类型?

Solidity 中没有浮点数。您应该以整数格式保存数字。

您可以在前端代码中放置小数位。看看ERC20合约是如何设计的。

读得好:https://medium.com/@jgm.orinoco/understanding-erc-20-token-contracts-a809a7310aa5

核心语言本身不支持浮点数,但可以通过库获得,例如ABDKMathQuad