简体   繁体   English

以太坊交易模拟和模拟结果[关闭]

[英]Ethereum transaction simulation and simulation result [closed]

guys.伙计们。

Say that I have some pending transactions in mempool and I would like to simulate these transactions.假设我在 mempool 中有一些未决交易,我想模拟这些交易。 After simulation, I can be able to read the blockchain state simulation results, like balance change, NFT owner, etc. I Googled and I did not manage to find anything useful.模拟后,我可以读取区块链 state 的模拟结果,比如余额变化,NFT 所有者等。我谷歌了一下,但没有找到任何有用的东西。

What I am looking for is something like "blocknative simulation platform".我正在寻找的是“块状模拟平台”之类的东西。 This document mentioned blocknative simulation platform . 本文档提到了 blocknative 仿真平台 But I would like to create a home-made system with my "local Ethereum node".但我想用我的“本地以太坊节点”创建一个自制系统。

Any suggestion will be appreciated.任何建议将不胜感激。

您可以在 remix 编译器中编译您的代码,也可以使用 geth

You can simulate Ethereum transactions on the mai.net with Pelta Shield .您可以使用 Pelta Shield在 mai.net 上模拟以太坊交易。

This tool allows you to see the usual tx info (such as what you would see on Etherscan) before the transaction actually gets included in a block.该工具允许您在交易实际包含在区块中之前查看通常的 tx 信息(例如您在 Etherscan 上看到的信息)。

In fact you can even abort the simulated transactions if you don't like the result of it, and you will not pay any gas.事实上,如果您不喜欢它的结果,您甚至可以中止模拟交易,并且您不会支付任何汽油费。

Note that the results of the simulation will only be accurate as long as the transaction doesn't depend too much on the live state of the Ethereum blockchain.请注意,只有在交易不太依赖以太坊区块链的实时 state 时,模拟结果才会准确。

If the state of the blockchain changes between the simulation and the actual execution, the simulation may not accurately reflect the result of the transaction.如果区块链的state在模拟和实际执行之间发生变化,模拟可能无法准确反映交易结果。

DISCLAIMER: I am the founder of Pelta.tech, the startup that developed Pelta Shield, so I'm definitely biased in my recommendation.免责声明:我是开发 Pelta Shield 的初创公司 Pelta.tech 的创始人,因此我的推荐肯定有偏见。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM