代码拉取完成,页面将自动刷新
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.4.16 <0.8.0;
// 子合约会继承多个父合约的属性和方法
// 多继承时,父合约有相同同属笥时,按is后的继承顺序继承,后继承的会覆盖前面对象的属性
contract Father{
uint public money = 0;
address public owner;
function increment() public {
money += 10;
}
constructor() public {
owner = msg.sender;
}
modifier check(){
require(msg.sender == owner, "no auth !");
_;
}
function kill() public check{
selfdestruct(owner);
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。