A sample project that demonstrate the call to Casper Kotlin SDK This sample call 2 RPC methods: chain_get_state_root_hash and info_get_deploy, then print the result to the log panel.
Open IntelliJ IDEA and choose "Get from VCS"
Enter the URL of the project: https://github.com/hienbui9999/SampleCallCasperKotlinSDK.git
Click "Clone"
Click "Trust Project"
The project is then loaded to IntelliJ IDEA, but at first with many error. Since we have not imported the CasperKotlinSDK.jar file to the project.
Get the "CasperKotlinSDK.jar" file from this address https://drive.google.com/drive/u/0/folders/1BE8G2dSK-RaiFwJqehlxujs5YCGCS7QV
Download and put it to some place in your computer, for example "Downloads" folder
Back to the IntelliJ IDEA with the "SampleCallCasperKotlinSDK" project. Choose "File->Project Structure ..."
Choose "Libaries" and do as the image below
Next step is to add the "CasperKotlinSDK.jar" file by hitting the "+" button
Browse for the "CasperKotlinSDK.jar" file that you have already downloaded in the "Downloads" folder.
Click "Open" button.
You will see the "CasperKotlinSDK.jar" file being imported.
Click "Apply" and then "OK"
Wait for a while, the project will be loaded without error, like this
If not, please choose "File-> Invalidate Caches..."
Check all the check box and hit "Invalidate and Restart"
Wait for a while for the project to fully loaded.
Right click on any blank region in the file "Main.kt" and hit "Run MainKt"
You will then see the state root hash being retrieved and printed in the log. There is also a call to "info_get_deploy" RPC being implemented and you can see some information of the deploy, original at this address: https://testnet.cspr.live/deploy/9ff98d8027795a002e41a709d5b5846e49c2e9f9c8bfbe74e4c857adc26d5571