Giter VIP home page Giter VIP logo

cw-ticket-auction's Introduction

Ticket Auction Project

This project is about creating the system which allows workers to bet on ticket,
carry out the ticket task, submit the result & get the reward.

Constitution

The project consists of 5 contracts.

  • Admin_Board : admin contract for the system
  • User_Board : contract for fronting worker(user)
  • Auction_Manager : manage the auction(bet, win ...)
  • Ticket_Manager : manage the tickets
  • Collateral_Manager: manage the collateral(stakes)

For the detail, please reference the README.md, which are located in every contract. ([root_dir]/contracts/[contract]/README.md)

How to deploy & test the project

  • Build & deploy the "admin-board" contract
    Use instantiate message.

  • Build & deploy the "ticket_manager" contract
    First, upload the contract wasm to LocalTerra & get the code id.
    After that, deploy the contract using CreateTicketManager execution in admin-board contract.
    Example:

    { 
      "CreateTicketManager": {
        "code_id" : 23 
      }
    }
    

    Record the contract address.

  • Build & deploy the "user_board" contract
    First, upload the contract wasm to LocalTerra & get the code id.
    After that, deploy the contract using CreateUsrBoardManager execution in admin-board contract.
    Example:

    { 
      "CreateUsrBoardManager": { 
        "code_id" : 23 
      }
    }
    

    Record the contract address.

  • Before going through next process, register the addresses of contracts above.
    Use the PostConfig execution in admin_board contract.
    Example:

    { 
      "PostConfg" : { 
        "ticket_manager": "terra...",
        "user_board": "terra...",
      }
    }
    
  • Build & deploy the "auction_manager" contract
    First, upload the contract wasm to LocalTerra & get the code id.
    After that, deploy the contract using CreateAuctionManager execution in admin-board contract.
    Example:

    { 
      "CreateAuctionManager": { 
        "code_id" : 23 
      } 
    }
    

    Record the contract address.

  • Build & deploy the collateral_manager contract
    First, upload the contract wasm to LocalTerra & get the code id.
    After that, deploy the contract using CreateCollateralManager execution in admin-board contract.
    Example:

    { 
      "CreateCollateralManager":  {
        "code_id" : 23 
      }
    }
    

    Record the contract address.

  • Finally, register the addresses of installed contracts.
    Use the PostConfig execution in admin_board contract.
    Example:

    {
      "PostConfig": { 
        "ticket_manager": "terra...",
        "user_board": "terra...",
        "collateral_manager": "terra...",
        "auction_manager": "terra...",
      }
    }
    

cw-ticket-auction's People

Contributors

duguorong009 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.