LogoLogo
WebDiscordTelegramBlog
  • Source Protocol
    • Introduction
    • Vision
    • Business Solutions
    • DeFi-as-a-Service
    • Ecosystem Overview
    • JOIN SOURCE
  • SOURCE - $SOURCE
    • Tokenomics
    • Features Part 1
    • Features Part 2
    • Why Guardian Nodes?
    • Source Swap
    • Airdrop
    • Claim Source-Drop
    • How to IBC Transfer
    • Community
  • SourceSwap - On Chain DEX
    • Connect and Deposit
    • Swap
    • Manage Liquidity
  • Governance
    • Before Submitting a Proposal
    • Submitting a Proposal (CLI)
  • COMMAND-LINE INTERFACE (CLI)
    • Introduction
    • Useful CLI Commands
  • SMART CONTRACTS & SOURCED DEVELOPMENT
    • Sourced Local Dev Setup
    • Source Chain Testnet Setup
      • Testnet Links
    • Smart Contracts with COSMWASM
    • CW-20/ERC-20 Tutorial
      • Installation
      • Download, Compile, Store
      • Initialize the Contract
      • Query and run commands
    • CW1 Tutorial
      • Installation
      • Download, Compile, Store
      • Initialize the Contract
      • Query commands
      • Execute commands
  • Nodes & Validators
    • Mainnet: Sourced Installation and Setup
    • Setting up Cosmovisor
    • Mainnet Setup and Tooling
    • Joining Mainnet
    • Mainnet Upgrades
    • Mainnet Resources
    • Block, Height & State-Sync Source with KSYNC
  • PLANQ | SOURCE Bridge
    • Bridging SRCX from BNB Chain to SOURCE Chain
  • SOURCE MARKET DOCUMENTATION
    • Source Market
    • Introduction
    • sTokens
    • Unitroller
    • USX Controller
    • Governance
  • BRANDING & RESOURCES
    • Social, Resources & Updates
    • Branding
    • Videos
    • How to: MetaMask
    • How to: Keplr
  • Gaming
    • Moochkin's Metarun
      • Rewards and Tournaments
  • LEGAL
    • Disclaimer
    • Privacy Policy
Powered by GitBook
On this page
  • Local Source Chain set up with Ignite CLI
  • Install Pre-requisites
  1. SMART CONTRACTS & SOURCED DEVELOPMENT

Sourced Local Dev Setup

PreviousUseful CLI CommandsNextSource Chain Testnet Setup

Last updated 1 year ago

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

Want to use sourced locally for development, or to work with smart contracts? You're in the right place. To get started with smart contract development, we recommend running on a laptop until you are ready to deploy to a public testnet.

Local Source Chain set up with Ignite CLI

Install Pre-requisites

Install Go

Follow the instructions to install Go.

For an Ubuntu LTS, you can probably use:

ver="1.19" && \
wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz" && \
sudo rm -rf /usr/local/go && \
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz" && \
rm "go$ver.linux-amd64.tar.gz" && \
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile && \
source $HOME/.bash_profile && \
go version

Please install Go v1.19 or later.

Install Ignite Cli

sudo curl https://get.ignite.com/cli! | sudo bash

Clone Source Chain Repo

git clone https://github.com/Source-Protocol-Cosmos/source.git

Compile sourced binary and start the local chain

cd ~/source
git fetch
git checkout v3.0.0
ignite chain serve

Your local chain should now be running in development mode with two funded genesis accounts and a single validator for testing purposes.

Follow the instructions to install Ignite CLI. (Ignite CLI can also be used in an online Gitpod container )

here
here
here