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

maping的读取消耗gas是否有误 #16

Open
river-zhou opened this issue Dec 30, 2023 · 1 comment
Open

maping的读取消耗gas是否有误 #16

river-zhou opened this issue Dec 30, 2023 · 1 comment

Comments

@river-zhou
Copy link

https://github.com/WTFAcademy/WTF-EVM-Opcodes/blob/main/01_HelloOpcodes/readme.md
image
为啥读取也会消耗gas呢,从实践上来看我们直接访问mapping得键值并不需要支付任何gas

@AmazingAng
Copy link
Member

如果你通过一个非view/pure的函数读取就会有gas消耗。
平常咱们只读时用的rpc方法不同,不用付gad。

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

2 participants