Open Sourcing Sentio Composer — The Aptos View Function Simulator
We are proud to announce the open sourcing of Sentio Composer, a view function simulator for the Aptos blockchain.
We have had the privilege to work with many top projects in the Aptos community since the mainnet launch in October. The lack of an easy way to simulate a read-only call against a function, especially against a historical version, has constantly been brought up as a pain point in development and debugging.
This is why we decided to give back to the Aptos community by building a library that enables developers to easily query a view function at any historical version, and open-source the entire project under Apache License.
We also built a web demo with which you can try out the functionality. Please note the demo instance is not intended for production use. If you are interested in using the composer as a hosted service you can contact us at: https://forms.gle/wKRVX529JarmDauG8
Sentio Composer is implemented based on Move VM and built-in native functions of Aptos. It will query the local cache or Aptos blockchain for the module it belongs to based on the input function ID, and then pass the resulting bytecode to the Move Virtual Machine. Move VM then executes the said function.
During function execution, the VM will also query its dependencies and resources. Sentio Composer queries this data from Aptos blocks via Aptos REST API. The function execution can take a while when being called for the first time, as the modules are not cached. When the function execution is completed, the execution result is collected from the VM return value. The whole process is shown in the figure below:
Although in principle the tool can be used to execute any function on Aptos, we do encourage the usage to be limited to view functions only, as 1) any side effect expected by calling a non-view function will not take effect on the blockchain obviously and 2) The tool itself will not return the result of the side effects.
Supported argument types
The CLI takes string formatted arguments as the arguments of the view function. The following argument types are supported:
- bool literals (true, false)
- integer literals (e.g., 10, 58)
- address literals (e.g., 0x12, 0x0000000000000000000000000000000f)
- u8 vector, bytes string representation (e.g., foo)
Sentio is an observability platform for Web3. Sentio generates metrics, logs, and traces from existing smart contracts data through our low code solution, which could be used to build dashboards, set up alerts, analyze user behaviors, create API/Webhooks, and more. Sentio supports Ethereum, BSC, Polygon, Solana, and Aptos.
Sentio is built by veteran engineers from Google, Linkedin, Microsoft and TikTok, and backed by top investors like Lightspeed Venture Partners, Hashkey Capital and Canonical Crypto.
We are currently in closed beta. Follow us on Twitter for more updates. Contact us at: https://forms.gle/wKRVX529JarmDauG8 if you want to work with us.