Junø
WebDiscordGithubTwitter
  • Juno
    • Intro
    • Home of CosmWasm
    • Contributors - Core Software
    • Brand Identity
    • Security Disclosures
    • Economic Overview
      • Disclaimer
      • Native Asset (JUNO)
      • Incentive structure
      • Supply API - Data
  • Developer Guides
    • CosmWasm Contracts
      • Compile a Contract
      • Deploy a Contract
      • Guide: How to Upload a Smart Contract on the Juno Chain
      • Use Cw-orchestrator to speed-up your development
      • Query A Contract
      • Send Tokens to a Contract
    • Miscellaneous
      • Conversions
      • Multi Message Transaction
      • Get & Decode Transactions
      • Get Token Prices
      • Get Account Transactions
      • IBC Transfer
      • State Export / Airdrop
    • Juno Modules
      • FeeShare
      • TokenFactory
    • API Endpoints
      • Cosmos
        • Tx
          • V1beta1
            • Simulate
            • Txs
              • Block
        • Params
          • V1beta1
            • Params
        • Bank
          • V1beta1
            • Balances
              • By denom
            • Denoms metadata
            • Params
            • Spendable balances
            • Supply
        • Upgrade
          • V1beta1
            • Applied plan
            • Current plan
            • Module versions
            • Upgraded consensus state
        • Auth
          • V1beta1
            • Accounts
            • Module accounts
            • Params
        • Staking
          • V1beta1
            • Delegations
            • Historical info
            • Params
            • Pool
            • Validators
              • Delegations
                • Unbonding delegation
              • Unbonding delegations
            • Delegators
              • Redelegations
              • Unbonding delegations
              • Validators
        • Evidence
          • V1beta1
            • Evidence
        • Mint
          • V1beta1
            • Annual provisions
            • Inflation
            • Params
        • Feegrant
          • V1beta1
            • Allowance
            • Allowances
            • Issued
        • Gov
          • V1beta1
            • Params
            • Proposals
              • Deposits
              • Tally
              • Votes
        • Distribution
          • V1beta1
            • Community pool
            • Params
            • Delegators
              • Rewards
              • Validators
              • Withdraw address
            • Validators
              • Commission
              • Outstanding rewards
              • Slashes
        • Slashing
          • V1beta1
            • Params
            • Signing infos
        • Authz
          • V1beta1
            • Grants
              • Grantee
              • Granter
        • Base
          • Tendermint
            • V1beta1
              • Blocks
                • Latest
              • Node info
              • Syncing
              • Validatorsets
                • Latest
          • Node
            • V1beta1
              • Config
      • Cosmwasm
        • Wasm
          • V1
            • Code
              • Contracts
            • Contract
              • History
              • Raw
              • Smart
              • State
            • Codes
              • Params
              • Pinned
            • Contracts
              • Creator
      • Juno
        • Feeshare
          • V1
            • Fee shares
            • Params
        • Tokenfactory
          • V1beta1
            • Denoms from creator
            • Params
            • Denoms
              • Authority metadata
      • Ibc
        • Apps
          • Router
            • V1
              • Params
      • API Specification
    • Local Interchain
      • Local Interchain Rust Example
    • Junod Local Dev Setup
    • Integrate Leap wallet
    • SubQuery Indexer
  • Governance
    • Before submitting a proposal
    • Submitting a Proposal (CLI)
      • Formatting Proposal Markdown
  • Command-Line Interface (CLI)
    • Introduction
    • Useful CLI Commands
    • Module Reference
      • bank
      • distribution
      • gov
      • keys
      • params
      • slashing
      • staking
      • status
      • tendermint
      • upgrade
      • wasm
  • Nodes & Validators
    • Junod Installation and setup
    • Setting up Cosmovisor
    • Mainnet Setup and Tooling
    • Joining Mainnet
      • Sync from Snapshot
      • Sync with state-sync
      • Mainnet Upgrades
    • Joining Testnet
    • Relaying
    • Juno Delegations Program
Powered by GitBook
On this page
  • Using the Seed User
  • Run Juno
  • Quick(est) start dev build
  • Interacting with Juno in Docker
  • Quickstart on the testnet with a public node
  • Further reading

Was this helpful?

  1. Developer Guides

Junod Local Dev Setup

PreviousLocal Interchain Rust ExampleNextIntegrate Leap wallet

Last updated 1 year ago

Was this helpful?

These settings are only for development use of Juno on a local machine.

Want to use junod locally for development, or to work with smart contracts? You're in the right place. Running locally is a much easier solution than interacting with a testnet.

This guide focuses on running the chain. If you want to build the binary or develop in go, then check out:

Using the Seed User

Juno ships with an unsafe seed user in dev mode when you run the prebuilt docker container below, or one of the options that uses docker-compose. You can import this user into the CLI by using the mnemonic from the Juno repo, i.e.:

junod keys add <unsafe-test-key-name> --recover

When prompted, add the mnemonic:

clip hire initial neck maid actor venue client foam budget lock catalog sweet steak waste crater broccoli pipe steak sister coyote moment obvious choose

You will then be returned an address to use: juno16g2rahf5846rxzp3fwlswy08fz8ccuwk03k57y

Run Juno

There is a prebuilt docker image . This will start a container with a seeded user. The address and mnemonic used here can be found in the docker/ directory of the repo. When you're done, you can use ctrl+c to stop the container running.

Always pick a tagged version to run, ideally one that matches mainnet. The example below may be outdated as Juno releases frequently - you should check the to see which is current for you.

docker run -it \
  --name juno_node_1 \
  -p 1317:1317 \
  -p 26656:26656 \
  -p 26657:26657 \
  -e STAKE_TOKEN=ujunox \
  -e UNSAFE_CORS=true \
  ghcr.io/cosmoscontracts/juno:14.1.0 \
  ./setup_and_run.sh juno16g2rahf5846rxzp3fwlswy08fz8ccuwk03k57y

Quick(est) start dev build

The quickest way to get up-and-running for development purposes, as is documented in the main repo, is to run:

STAKE_TOKEN=ujunox UNSAFE_CORS=true docker-compose up

If you're on the latest version of Docker, you may need to do `docker compose up` rather than `docker-compose up`

This builds and runs the node and:

  • Creates and initialises a validator

  • Adds a default user with a known address (juno16g2rahf5846rxzp3fwlswy08fz8ccuwk03k57y)

To use a specific version of Juno, check out a tag before running docker compose.

Interacting with Juno in Docker

To call Juno inside a container, use docker exec like so:

# compile wasm - run this in your smart contract folder
docker run --rm -v "$(pwd)":/code \
  --mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \
  --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
  cosmwasm/rust-optimizer:0.12.11

# copy wasm to container
docker cp artifacts/your_compiled.wasm juno_node_1:/your_compiled.wasm

# store wasm
docker exec -i juno_node_1 \
  junod tx wasm store "/your_compiled.wasm" \
  --gas-prices 0.1ujunox --gas auto --gas-adjustment 1.3 \
  -y -b block --chain-id testing \
  --from validator --output json 

Quickstart on the testnet with a public node

If you don't want to go through the process of setting up a node and just want to experiment with the Juno uni testnet:

  1. Get a public node's RPC address. These can be found pinned in Discord in the dev channel.

  2. In ~/.juno/config/client.toml set node="<public node RPC address>" and chain-id="uni-6".

  3. Create a key to use by running junod keys add <key-name>.

  4. Get that key's public address by running junod keys show <key-name> -a.

  5. Get some test Juno by sending $request <key-address> in the #faucet Discord channel.

You can then verify that you have funds by running junod query bank balances <key-address>. Happy hacking!

Further reading

For a video that guides you through the above steps, some Juno contributors made a series called CosmWasm By Dummies that guides you through writing your first contract after setting up Juno:

For additional information on CosmWasm, check out the and their .

for you to use
Juno GitHub repository
official docs
tutorials
CosmWasm by Dummies #1 - Juno QuickstartYouTube
Logo
Page cover image