Create and Implement the `printChainInfo` Function