基于区块链的毕业设计Trustless state oracle for ETH/stETH Curve pool – ETH/stETH曲线池的无信任状态oracle

本文提供基于区块链的毕业设计国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,基于区块链的毕业设计Trustless state oracle for ETH/stETH Curve pool – ETH/stETH曲线池的无信任状态oracle 是一篇很好的国外资料

Trustless state oracle for ETH/stETH Curve pool

A trustless oracle for the ETH/stETH Curve pool balances using Merkle Patricia proofs of Ethereum state.

Sending oracle transaction

Use the following command to generate a proof correnspoding to the block latest - 15:

python offchain/generate_steth_price_proof.py    --rpc <RPC endpoint of a geth node>    --keyfile <path to a JSON file containing an encrypted private key>    --gas-price <tx gas price in wei>    --contract <oracle contract address> 

Skip --keyfile and --gas-price flags to print the proof without sending a tx.

Reading the reported balances

Use oracle.getState() function that returns a (timestamp, etherBalance, stethBalance) tuple corresponding to the most fresh data, where timestamp is the one of the block the proof was generated for.


无信任状态oracle for ETH/stETH曲线池

使用Merkle Patricia以太坊eth状态证明的ETH/stETH曲线池余额的无信任预言。

发送oracle事务

使用以下命令生成与块latest-15对应的校样:

python offchain/generate_steth_price_proof.py    --rpc <RPC endpoint of a geth node>    --keyfile <path to a JSON file containing an encrypted private key>    --gas-price <tx gas price in wei>    --contract <oracle contract address> 

跳过–keyfile和–gas price标志以打印校样而不发送tx。

读取报告的余额

使用oracle.getState()函数,该函数返回与最新数据对应的(timestamp、etherBalance、stethBalance)元组,其中timestamp是为其生成证明的块之一。

部分转自网络,侵权联系删除区块链源码网

www.interchains.cc

https://www.interchains.cc/20879.html

区块链毕设网(www.interchains.cc)全网最靠谱的原创区块链毕设代做网站 部分资料来自网络,侵权联系删除! 最全最大的区块链源码站 ! QQ3039046426
区块链知识分享网, 以太坊dapp资源网, 区块链教程, fabric教程下载, 区块链书籍下载, 区块链资料下载, 区块链视频教程下载, 区块链基础教程, 区块链入门教程, 区块链资源 » 基于区块链的毕业设计Trustless state oracle for ETH/stETH Curve pool – ETH/stETH曲线池的无信任状态oracle

提供最优质的资源集合

立即查看 了解详情