BetMe is is a decentralised, peer-to-peer prediction market
BetMe is a decentralised, peer-to-peer prediction market, built via Account Abstraction technologies for improve UI experience.
For build AA and gasless transaction we use combination of Gelato 1Balance && Relay, Web3Auth and Safe Contract Address. To display current prices on the UI, we using the RedStone API. On the contract side, we implemented the RedStone Price Feed to obtain current prices and close bets. The Gelato Web3 functions are responsible for generating and updating the redstonePayload (byte code required for the getPrice function) and controlled the expiration of bets for distribute funds.
Three smart contracts were written in Solidity for BetMe:
CustomChallenge.sol
- This contract responsible for Custom bets. Deployed on Mumbai Testnet 0xDb0C8933A0EEe4a07d8A524f27E9041fA58C0AFc
PriceChallenge.sol
- This contract responsible for Price bets. Extend RedStonePrice contract. Deployed on Mumbai
Testnet 0xbB2c5955eFf974Dd4F870f4902183732318C9415
Here are some quick links to code in this repo, including some examples of where hackathon sponsor tech was used:
These instructions will get you a copy of the project up and running on your Mumbai testnet for development and testing purposes.
nodeJS >= 16.0
npm
Install dependencies and create environment file:
npm install
cp .env-example .env
Fill environment variables.
npx hardhat run smart_contract/scripts/deploy.js --network mumbai
npm run start
npm run build
git clone https://github.com/darcksday/betme-gelato-functions
npm install
cp .env-example .env
npx w3f deploy src/web3-functions/my-web3-function/index.ts