Guide: How to Upload a Smart Contract on the Juno Chain
Welcome to this tutorial on deploying a smart contract to the Juno testnet. This guide will show you how to deploy and interact with a contract using CLI. For scripting using Rust, you can use [cw-orc
Preparation:
Required Materials: A computer with an internet connection, familiarity with GitHub, and basic knowledge of smart contracts.
Steps:
Find an Example Smart Contract:
(Note: The steps here mainly involve browsing, no specific bash commands.)
In this tutorial we will be using https://github.com/Reecepbcups/cw-clock-exampl
Connect to the Juno Testnet:
Check out our new video that shows you how to deploy a local env
https://github.com/Reecepbcups/cw-clock-example
Create a Juno Wallet:
5. Claim junox Test Tokens:
Head to Juno Discord https://discord.com/invite/caEBtA4QDb and find FAUCET section. In there you can get some using the API provided and inputting the wallet address you created in the previous step. https://faucet.reece.sh/uni-6/JUNO_ADDRESS_HERE
6. Verify Token Receipt:
7. Configure the Juno Command Line:
8. Deploy the Smart Contract:
Assuming you've downloaded clock_example.wasm to your current directory
9. Instantiate the Smart Contract:
Replace [CODE_ID] with the code ID obtained from the previous step e.g 3785
10. Interact with the Smart Contract:
Query the smart contract (replace [CONTRACT_ADDRESS] with the address from instantiation) junod query wasm contract [CONTRACT_ADDRESS]
Conclusion:
You've now successfully uploaded, instantiated, and interacted with a smart contract on the Juno testnet.
If you have further questions or ideas, join the Juno community on Discord, particularly the "developer lounge".
Note: Adjust the bash commands to fit your specific situation, and always double-check them, especially when working with real tokens or live environments.\
Last updated