首页 > TAG信息列表 > Solidity0.8
Solidity0.8 call
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-ISolidity0.8-Shadowing Inherited State Variables
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 publSolidity0.8-Error
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 foSolidity0.8.0-Calling Other Contract
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