Giter Club home page Giter Club logo

rps's Introduction

Secret Rock-Paper-Scissors

This repo contains the secret contract implementation of a rock paper scissors game.

It's fairly straightforward if you know your way around a CosmWasm contract, and is mainly intended to be used as an example of some tricks and usages of common libraries or other scenarios contract developers may encounter.

You will find:

  • Usage of Secret Toolkit, specifically the PRNG and generation of a random string
  • Usage of cw-storage-plus
  • Sending native tokens
  • Storing and reading to/from state

Gitpod

Can't run your local secret environment because you're on M1, or too lazy to install docker? We got your back!

Open in Gitpod

Usage

The environment will automatically start with localsecret, and it exposes the ports for application development. Specifically -

  • 26657 - RPC
  • 1317 - LCD/Rest Gateway
  • 9090 - GRPC
  • 9091 - GRPC-Web
  • 5000 - LocalSecret faucet

To connect, prepend the port number with the gitpod url. e.g. if my workspace is at https://scrtlabs-gitpoddevenv-shqyv12iyrv.ws-eu54.gitpod.io then I would be able to connect to the LCD service at https://1317-scrtlabs-gitpoddevenv-shqyv12iyrv.ws-eu54.gitpod.io.

To configure SecretCLI you'll want to use:

secretcli config node `https://26657-scrtlabs-gitpoddevenv-your-workspace-url.gitpod.io`
secretcli config chain-id secret-testnet-1

We also recommend for ease of use while testing

secretcli config keyring-backend test
secretcli config output json

This environment also comes with all the dependencies you need to develop Secret Contracts, and SecretCLI.

To make the most out of the environment, you can switch between two views:

  • LocalSecret will provide the logs from the running secretd node, which can be helpful when testing and debugging contracts.
  • Terminal can allow you to execute secretcli commands or clone a repository.

Switching between the views can be done here:

image

rps's People

Contributors

eshelb avatar cashmaney avatar azaidelson avatar liorbond avatar scrt-tovi avatar

Stargazers

Crypto Wolf ◾️ avatar

Watchers

Tom Langer avatar  avatar Assaf Morami avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.