Skip to content

This repository provides a quick and easy way to get up and running creating smart contracts.

Notifications You must be signed in to change notification settings

xian-network/contract-dev-environment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Xian Smart Contract Development Environment

This repository provides a quick and easy way to get up and running creating smart contracts. Included are an example contract, associated tests and instructions on how to get started.

Features

  • Start writing & testing smart-contracts quickly.
  • Quick deployment of contracts to Xian networks
  • No configuration of the host system needed.
  • One dependency, available on all platforms (Docker)
  • Example contract + tests included

Who is this for ?

  • Everyone interested in writing smart contracts on Xian

Instructions

Quick Start

  1. Install Docker
  • MacOS
  • Windows
  • Linux
    • curl -fsSL https://get.docker.com -o get-docker.sh
    • sudo sh get-docker.sh
    • sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
    • sudo chmod +x /usr/local/bin/docker-compose
  1. Clone this repository
  2. Run make build from cli
  3. Run make test-shell from cli
    • This will open a command shell inside the container
  4. To execute your tests :
    • pytest tests/test.py from the shell
  5. To exit the test shell type exit
  6. Happy coding !

Development Guide

  1. Smart contract develeopment docs available here
  2. Example tests can be in tests/test.py, these show :
    • How to import and register contracts to the test harness
    • How to perform actions from different accounts
    • How to interrogate the state of the contract
    • How to configure the execution environment of the test (Time, Random Number Seed, etc.)

The docker container reads the files in /contracts, any changes you make while the container is running will be reflected in the container environment.

Deployment Guide

TO-DO !

(Interested in doing a bounty for this ? Talk to us in telegram)

Support

Want to show us what you made, get feedback or need support ? Telegram Discord Forum Github

Any suggestions ?

  • Do you have any suggestions on how to improve this tool ?
    • Open an issue or message us on any of our comms channels
  • Any improvements you'd like to make yourself ?
    • PR's welcome - if it's good we'll award a bounty !
  • Is there any tooling you'd love to see included (linters, formatters, etc) Let us know ! <3

About

This repository provides a quick and easy way to get up and running creating smart contracts.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published