GithubHelp home page GithubHelp logo

betos's Introduction

Betos

Aptos price betting platform.

website-preview

Deployments

Code structure

This is basically Move project with several subdirs.

  • app: React frontend
  • cron: Serverless framework to call execute_round every 6 hour.
  • scripts: Admin scripts.

Getting started

Follow this to run on devnet.

$ aptos init --profile test
$ aptos init --profile test2

$ aptos move create-resource-account-and-publish-package --seed 3234 --address-name betos --named-addresses admin=test2 --profile test2 --skip-fetch-latest-git-deps --assume-yes
Do you want to publish this package under the resource account's address xxxx?

Set env vars

Create export-env.sh as below.

export APTOS_KEY=0x...
export TESTNET_BETOS_ADDRESS=0x...
export MAINNET_BETOS_ADDRESS=0x...

Test

aptos move test --ignore-compile-warnings

Run admin functions

Put the resource account address in xxxx.

source export-env.sh
cd scripts
yarn run ts-node execute.ts
yarn run ts-node execute.ts
yarn run ts-node execute.ts
# Now there are 3 rounds: 1 closed, 1 locked, 1 started
# Repeat `yarn run ts-node execute.ts` to progress

pause

You can pause like this.

source export-env.sh
aptos move run --function-id $MAINNET_BETOS_ADDRESS::prediction::pause --profile main

Main account info

main:
  private_key: "_"
  public_key: "_"
  account: c655e88231fc493c0e105caa6ad27849e6b432153ee2c3456e3d88e7a706b1b7
  rest_url: "https://fullnode.mainnet.aptoslabs.com"

betos's People

Contributors

kyoungwan avatar qpzm avatar

Watchers

 avatar  avatar

betos's Issues

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.