当前位置:网站首页>Contract lock loophole
Contract lock loophole
2022-04-23 05:36:00 【Dragon_ Breaking wind】
pragma solidity ^0.4.18;
contract longTest3{
uint public ownerAmount;
struct HoldRecord{
uint amount;
uint time;
}
mapping(address => HoldRecord) public balance;
function payIn(uint holdTime) public payable{
require(msg.value > 0);
HoldRecord newRecord;
// When we lock up our money , In fact, the amount is locked ownerAmount Inside , Without locking in our own address
// This will lead to the theft of funds , Use 5.0 The above version will avoid this problem
newRecord.amount+=msg.value;
newRecord.time=now + holdTime;
balance[msg.sender] = newRecord;
}
}
版权声明
本文为[Dragon_ Breaking wind]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230530580485.html
边栏推荐
- Multi process model in egg -- egg document Porter
- 弘玑|数字化时代下,HR如何进行自我变革和组织变革?
- Relative reference and absolute reference of Excel
- 合约锁仓漏洞
- 提升Facebook触及率和互动率攻略 | 智能客服帮您抓住用户的心
- Find the number of "blocks" in the matrix (BFS)
- qt. qpa. plugin: Could not find the Qt platform plugin “xcb“ in ““
- Frequently asked interview questions - 3 (operating system)
- 3d slicer中拉直体的生成
- Nécessité de précharger les cookies dans le sélénium
猜你喜欢
随机推荐
Box collapse and margin collapse
Sea Level Anomaly 和 Sea Surface Height Anomaly 的区别
String class understanding - final is immutable
世界与个人发展
Utf8 to STD: string and STD: string to utf8
Differences between auto and decltype inference methods (learning notes)
selenium預先加載cookie的必要性
Differences between sea level anatomy and sea surface height anatomy
World and personal development
Reading notes of modern methods of C language programming
Fletter next generation graphics renderer impaller
Data bus realizes the communication between brother components
相机成像+单应性变换+相机标定+立体校正
open3d材质设置参数分析
Hongji micro classroom | cyclone RPA's "flexible digital employee" actuator
AcWing 836. Merge set (merge set)
Deep learning object detection
C, class library
可执行程序执行流程
转置卷积(Transposed Convolution)









