Giter Site home page Giter Site logo

wagerr-dapp's Introduction

Wagerr Smart Contract

Introduction

This repository contains the source code for the Wagerr smart contract written in Ink!, a Rust-based smart contract language for the Polkadot ecosystem.

Build and Deploy

Pre-requisites:

# Install dependencies
pnpm install

# Build contracts and move artifacts to `contracts/deployments/{contract}/` folders
pnpm run build

# Start local node with persistence (contracts stay deployed after restart)
# NOTE: When using Brave, shields have to be taken down for the UIs
pnpm run node

## IMPORTANT: Open a separate terminal window and keep the node running

# Deploy the contracts on the local node
pnpm run deploy

Alternatively, you can also deploy contracts manually using Contracts UI (pnpm contracts-ui) in the browser.

Interacting with the Smart Contract

Once deployed, users can interact with the Wagerr Smart Contract in various ways:

  1. createWager(name: String, terms: String): Create a new wager
  2. getWager(id: String): Retrieve a wager with id.
  3. getPendingWagers(): Get all pending wagers for an active account.
  4. getActiveWagers(): Get all active wagers for an active account.
  5. joinWager(id: String): Join a pending wager.
  6. claimWin(id: String): Claim win for an active wager.
  7. AcceptRejectClaim(id: String, action: ClaimAction): Accept or Reject other party's claim.

Testing

Contributing

Contributions to the Wagerr are welcome! Feel free to fork this repository, make your changes, and submit a pull request. Make sure to follow the contribution guidelines outlined in the repository.

wagerr-dapp's People

Contributors

hylcore-v avatar

Watchers

 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.