Tech Specs
Mainnet addresses
PGT: 0x817c201c4Bc769CCdE4f0a20BEA442b17913Ec83
Staking helper: 0x42d56F1147916067dfCff08FdBf83C2d8dEa0c8A
Staking (LP): 0xeE7CCd15c4ee726221BdF5279845372457a4A716
PGT-BNB LP: 0x3998B1Fe9F78EdD356DE28827733902E152031F7
Prediction game: 0x81EC13411D98CD674d75A691C273c43855C76A0D (bet BNB price)
Prediction game: 0xF76E10BBCa32D740367702665a6e8f770DD2F9b7 (bet BTC price)
Prediction game: 0x8dF2A4fDAeec8d74255A895546125d40e11D7eF4 (bet CAKE price)
Prediction game: 0x2dF7CfF13D74d1A596f37a6fba80982a01c81844 (bet ADA price)
PGT Escrow for prediction game: 0x7A5A951b686846B343FF89A66A4E388c4f585950
Testnet addresses
PGT: 0x8e6176021aD9eea87C1eB9277270e7679062163B
Staking helper: 0xe061Fd0F826e261A8ede0a0f3cE413Af69f344ED
Staking (LP): 0x752Ad8c3316ed064B2a5313A03EeF79f69eAa535
PGT-BNB LP: 0x6E34041210F929E2cB0dDb9385eec73aEbCFD9aF
Prediction game: 0x6a5E9d59bC82dB38110e2eBaCF1F55C4FDD1BBfF (bet BNB price)
Prediction game: 0x39Ab86A95b9e50864700C9B7c96f2756DE22AA68 (bet BTC price)
Prediction game: 0xEfF936F12c1600B8Ce60F0e0575F520F82AEdce3 (bet CAKE price)
Prediction game: 0xa6174e047882A3c38Fd910dA64ed95D9Df9A98Ab (bet ADA price)
PGT Escrow for prediction game: 0x99AafEA8B38BC781684B5747a03BeEEc848bE960
Integration
Refer test/testWhole.js
for integration example.
Get
Get amount in PGT (including multiplier)
API (temporarily): https://siewchongche.space/predictionGame/getAmountInPGT/?amountInUSD=${amountInUSD}
Get amount in BNB
API (temporarily): https://siewchongche.space/predictionGame/getAmountInBNB/?amountInUSD=${amountInUSD}
Result might be different when actual claim
Claim
Call API for parameters
API (temporarily): https://siewchongche.space/predictionGame/getSignature/?account=${userAddress}&amountInUSD=${amountInUSD}
Where
userAddress
= address to claim, only whitelisted address able to claim
amountInUSD
= amount in USD to claim, options include 50, 100 and 500.
Return amountInBNB
, amountInPGT
, amountInPGTMin
and signature
.
Bet (from PGT escrow after claim)
When call with escrow contract, contract will check first if betAmount
< escrowPGT
.
If betAmount
> escrowPGT
, contract will transfer remaining PGT from user, user need to approve PGT to escrow contract before transfer.
Check user escrow PGT
Staking (with BNB)
Claim stake rewards (in PGT)
Check current rewards which avalaible to claim
Unstake all
Deployment sequence
deployPGT.js
deployPredictionGame.js
deployEscrow.js
deployStakingHelper.js
addLiquidity.js
Repo
Smart contract: https://github.com/daoventures/prediction-game-contracts
API: https://github.com/daoventures/prediction-game-api
Bot: https://github.com/daoventures/prediction-game-bot
Last updated