Neo-fairy-test is a set of instruments designed to boost the testing and debugging expertise of Neo N3 good contracts. Maintained by Neo blockchain developer Hecate2 and packaged as a plugin for NeoCLI, the answer permits builders to check transactions and good contracts in opposition to actual world community state.
Fairy operations
The take a look at setting delivers a considerably completely different expertise to Neo Specific, which affords easy-to-deploy personal 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, similar to MainNet or TestNet.
These operations are executed and saved in reminiscence on the native node relatively than revealed in MainNet blocks. This characteristic allows thorough testing in opposition to actual world on-chain environments, while not having to re-deploy and arrange code, incur fuel charges, or make unintended modifications to world state.
Debugging
One other benefit of the instrument is its capability to facilitate full testing and debugging. With the DumpNef plugin, builders can leverage functionalities similar 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 normally dynamic values is very handy for builders interacting with time-locked good contracts or debugging code made non-deterministic by randomness.
References
Offered alongside the sensible instruments is a complete information for debugging Neo N3. It makes use of Visible Studio to display how contract exceptions could also be debugged right down to the Neo supply code stage. The information educates on many Neo core ideas to assist the developer, together with components similar to distant nodes, transactions, blocks, verification, dBFT consensus, and extra.
Lastly, a Python shopper can also be obtainable, which can be used to simplify interactions with a Neo node working the Fairy plugin. The documentation exhibits tips on how to use the shopper to name fairy contracts, clone snapshots, and carry out debugging. It additionally contains pattern utilization situations, similar to performing an NFT mortgage, illustrating the capabilities and purposes of the instrument.
Get began with neo-fairy-test on the hyperlink beneath:
https://github.com/Hecate2/neo-fairy-test/