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

关于第六讲 #688

Open
flandre-crimson opened this issue Mar 22, 2024 · 3 comments
Open

关于第六讲 #688

flandre-crimson opened this issue Mar 22, 2024 · 3 comments

Comments

@flandre-crimson
Copy link

📝 Details(细节)

原文:因为在Solidity中,如果一个值没有指定type的话,默认就是最小单位的该type,这里 uint 的默认最小单位类型就是uint8。

勘误:unit的默认类型应该是uint256。int的默认类型是int256。

🔢 Reference(参考)
参考:https://docs.soliditylang.org/zh/latest/types.html#integers

ps.确认需要修复的话,可以提任务给我。

@AmazingAng
Copy link
Owner

这里的确表达有误,应该改为文档相应的部分

In the example below, the type of [1, 2, 3] is uint8[3] memory, because the type of each of these constants is uint8. If you want the result to be a uint[3] memory type, you need to convert the first element to uint.

欢迎提pr。
https://docs.soliditylang.org/en/latest/types.html#array-literals

@XdpCs
Copy link
Contributor

XdpCs commented Mar 26, 2024

I will fix it.

@XdpCs XdpCs mentioned this issue Mar 26, 2024
4 tasks
@XdpCs
Copy link
Contributor

XdpCs commented Mar 28, 2024

@flandre-crimson 大佬 问题已经修复 有空可以关闭一下issue 谢谢

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

No branches or pull requests

3 participants