Predictthefuture


文档摘要

Predict the future 题目描述 原题链接 原题目要求 PredictTheFutureChallenge 合约的 ether 余额为 0。参与过程分成两步,第一步时锁定答案,第二步揭示答案。如果锁定的答案等于当前揭示答案是用 blockhash 以及 timestamp 通过 hash 生成的数,即可转移 2 ether 出去。 运行 安装 Foundry 根据Foundry 官方文档配置好运行环境。 运行测试 功能简述 在 PredictTheFutureChallenge 合约中,锁定猜测 lockInGuess 和揭示答案 settle 分成了两步,并且要求 settle 的调用需要在 lockInGuess 两个区块之后。


发布者: 作者: 转发
评论区 (0)
U