惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
V2EX
酷 壳 – CoolShell
酷 壳 – CoolShell
美团技术团队
有赞技术团队
有赞技术团队
Hugging Face - Blog
Hugging Face - Blog
罗磊的独立博客
S
SegmentFault 最新的问题
D
Docker
博客园 - 司徒正美
雷峰网
雷峰网
V
Visual Studio Blog
云风的 BLOG
云风的 BLOG
G
Google Developers Blog
The GitHub Blog
The GitHub Blog
A
About on SuperTechFans
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - Franky
月光博客
月光博客
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
H
Hackread – Cybersecurity News, Data Breaches, AI and More
T
The Blog of Author Tim Ferriss
Google DeepMind News
Google DeepMind News
MyScale Blog
MyScale Blog
MongoDB | Blog
MongoDB | Blog

Solidity

renounced 的合约可以改 tax 吗 线下 | 全职 | 广州 | 8k-12k | Solidity 开发工程师 [Solidity 群] 诚邀各位大佬加入! 接 Dapp 开发 Solidity 入门教程 第一小节(主题有字数限制) 最近上线的 Azuki 项目不仅美术很强, Solidity 程序也很强 社区小伙伴通力合作的结晶:智能合约编程语言 Solidity 最新 0.5.8 中文文档 发布 请问有没有 ETH solidity 的群或者活跃社区呢? solidity 如何正确的产生随机数
想请教一个 solidity 以太坊合约的代码问题
whoami9894 · 2018-12-15 · via Solidity
pragma solidity ^0.4.23;

contract Preservation {

  // public library contracts 
  address public timeZone1Library;
  address public timeZone2Library;
  address public owner; 
  uint storedTime;
  // Sets the function signature for delegatecall
  bytes4 constant setTimeSignature = bytes4(keccak256("setTime(uint256)"));

  event FLAG(string b64email, string slogan);

  constructor(address _timeZone1LibraryAddress, address _timeZone2LibraryAddress) public {
    timeZone1Library = _timeZone1LibraryAddress; 
    timeZone2Library = _timeZone2LibraryAddress; 
    owner = msg.sender;
  }

  // set the time for timezone 1
  function setFirstTime(uint _timeStamp) public {
    timeZone1Library.delegatecall(setTimeSignature, _timeStamp);
  }

  // set the time for timezone 2
  function setSecondTime(uint _timeStamp) public {
    timeZone2Library.delegatecall(setTimeSignature, _timeStamp);
  }

  function CaptureTheFlag(string b64email) public{
    require (owner == msg.sender);
    emit FLAG(b64email, "Congratulations to capture the flag!");
  }
}

// Simple library contract to set the time
contract LibraryContract {

  // stores a timestamp 
  uint storedTime;  

  function setTime(uint _time) public {
    storedTime = _time;
  }
}

对以太坊相关一窍不通,看了不少文章还是有点摸不着头脑....

这是区块链安全想关的,想请教一下这段合约代码放在 Remix 上编译运行后调用CaptureTheFlag函数前有什么约束吗(这里的目的是调用该函数),我的猜想这里时间戳可能与uint256溢出有关