Skip to content

AigangNetwork/aigang-contracts

Repository files navigation

Aigang Contracts

Aigang Smart Contracts for:

  • Prediction Market
  • Pools
  • Insurance product

Full image:

Architecture

Structure

Web

This part with detailed configuration instructions can be found at https://github.com/AigangNetwork/aigang-platform-web

AddressManager.sol

This contract manages addresses for the platform. The web page is reading this contract and loads all available Prediction markets, pools and insurance products. All Functions retails can be found at Address Manager spec

Market.sol

This is Prediction Market Contract needed to run prediction market Web and organize predictions. Full detailed spec can be found at Market spec, PrizeCalclulator spec, ResultStorage spec

Pools.sol

This is main contract for token pools collecting. Full detailed spec can be found at Pools spec, PrizeCalclulator spec

Product.sol

This is main contract for insurance product. Full detailed spec can be found at Product spec, PremiumCalculator spec

Development

Run Tests:

    truffle test --network default  
    truffle test = truffle test --network development  

Auto-deployment commands:

    truffle compile

To testrpc

    truffle migrate

To Ropsten Network:

    mnemonic="accountPhrase" apiKey="infuraApiKey" truffle migrate --network ropsten

Flat contracts

    sh ./make_flat.sh  

Contributing

Everyone is welcome to contribute this repository, just make sure your code does not have validation issues and builds without errors. Create your feature branch and send us a pull request to the master branch.

About

Aigang Smart Contracts for our Insurance Protocol

Resources

Stars

Watchers

Forks

Packages

No packages published