ICode9

精准搜索请尝试: 精确搜索
  • Solidity0.8 call2022-08-02 12:34:03

    call is a low level function to interact with other contracts. This is the recommended method to use when you're just sending Ether via calling the fallback function. However it is not the recommend way to call existing functions.   // SPDX-License-I

  • Solidity0.8-Shadowing Inherited State Variables2022-07-31 22:35:26

    Unlike functions, state variables cannot be overridden by re-declaring it in the child contract. Let's learn how to correctly override inherited state variables.   // SPDX-License-Identifier: MIT pragma solidity ^0.8.13; contract A { string publ

  • Solidity0.8-Error2022-07-31 22:34:28

    An error will undo all changes made to the state during a transaction. You can throw an error by calling require, revert or assert. require is used to validate inputs and conditions before execution. revert is similar to require. See the code below fo

  • Solidity0.8.0-Calling Other Contract2022-07-31 22:01:26

    Contract can call other contracts in 2 ways. The easiest way to is to just call it, like A.foo(x, y, z). Another way to call other contracts is to use the low-level call. This method is not recommended.   // SPDX-License-Identifier: MIT pragma solidity ^0

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有