Neo-fairy-test is a set of instruments designed to reinforce the testing and debugging expertise of Neo N3 sensible contracts. Maintained by Neo blockchain developer Hecate2 and packaged as a plugin for NeoCLI, the answer permits builders to check transactions and sensible contracts towards actual world community state.
Fairy operations
The take a look at setting delivers a considerably totally different expertise to Neo Categorical, which affords easy-to-deploy non-public networks. As an alternative, neo-fairy-test permits builders to ship “fairy transactions” or deploy “fairy contracts” to their very own modified model of public networks, equivalent to MainNet or TestNet.
These operations are executed and saved in reminiscence on the native node quite than printed in MainNet blocks. This characteristic allows thorough testing towards actual world on-chain environments, with no need to re-deploy and arrange code, incur gasoline charges, or make unintended modifications to international state.
Debugging
One other benefit of the instrument is its potential to facilitate full testing and debugging. With the DumpNef plugin, builders can leverage functionalities equivalent to setting debug info, breakpoints, and invoking contracts by way of the debug API. This functionality returns an in depth execution hint, making the debugging course of extra environment friendly.
The FairyEngine additionally permits fine-grained management over system time and random numbers. Controlling these often dynamic values is particularly handy for builders interacting with time-locked sensible contracts or debugging code made non-deterministic by randomness.
References
Supplied alongside the sensible instruments is a complete information for debugging Neo N3. It makes use of Visible Studio to reveal how contract exceptions could also be debugged all the way down to the Neo supply code stage. The information educates on many Neo core ideas to assist the developer, together with components equivalent to distant nodes, transactions, blocks, verification, dBFT consensus, and extra.
Lastly, a Python consumer can also be out there, which can be used to simplify interactions with a Neo node working the Fairy plugin. The documentation exhibits the best way to use the consumer to name fairy contracts, clone snapshots, and carry out debugging. It additionally consists of pattern utilization eventualities, equivalent to performing an NFT mortgage, illustrating the capabilities and purposes of the instrument.
Get began with neo-fairy-test on the hyperlink under:
https://github.com/Hecate2/neo-fairy-test/