ConseilJs is a library for decentralized applications, it allows connection to tezos node for live chain data and operations. Cryptonomic offers Nautilus cloud an infrastructure service that makes the access to tezos platform easier.
First of all we declare our variables like contract address, Tezos node, parameters format and conseil server from nautilus cloud, then add our contract secret key and faucet account as follows:
An application needs to sign transactions submitted by some accounts, which funds the execution of the transaction, therefore conseilJs offers mean of signing operations based on user's private key.
To make sure the operation was succeed we use await OperationConfirmation(groupId) with the keyword await that wait until the transaction is sent successfully.
Then we encode the user inputs to the appropriate format and then submit the transaction like shown below:
At this stage, the operation is normally succeed and broadcasted into the blockchain, from which a tezos baker will pull operations for inclusion in a block.
With this we are able to interact with our deployed smart contract in previous article with conseilJs and blockchain infrastructure with Nautilus Cloud. This is certainly an highlight to main useful functions but many other details are not covered here please refer to https://developers.tezos.com/ for more other details.