Chainlink官方文档翻译(二) 中间件-随机数 Intermediates - Random Numbers)

本文档介绍了如何在智能合约中使用Chainlink VRF生成随机数,包括请求和接收周期、使用LINK支付预言机费用、与Chainlink预言机交互的过程。通过实例展示了创建一个基于《权力的游戏》主题的合约,该合约使用Chainlink VRF模拟20面骰子的滚动,并分配给不同的房子。合约中包含的功能有rollDice、fulfillRandomness、house等。
摘要由CSDN通过智能技术生成

Intermediates - Random Numbers

intermediates
[,ɪntɚ’midɪət]
n. 中型物;中间事物;光泽辊;媒介(intermediate的复数)
v. 调解;充当调解人(intermediate的三单形式)

一、介绍

官网:https://docs.chain.link/docs/intermediates-tutorial

Randomness is very difficult to generate on blockchains. The reason for this is because every node must come to the same conclusion, forming a consensus. There’s no way to generate random numbers natively in smart contracts, which is unfortunate because they can be very useful for a wide range of applications. Fortunately, Chainlink provides Chainlink VRF, AKA Chainlink Verifiable Random Function.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值