Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/prediction markets #2

Draft
wants to merge 189 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
189 commits
Select commit Hold shift + click to select a range
555fe4d
added PredictionMarket contract
rsmarques Apr 3, 2021
2544aad
remove legacy variables
rsmarques Apr 3, 2021
9a0090c
remove legacy functions
rsmarques Apr 3, 2021
c93d9c1
PredictionMarket contract migration deployment
rsmarques Apr 3, 2021
6f08fb6
Application.js code cleanup
rsmarques Apr 3, 2021
a471811
add predictionMarket model
rsmarques Apr 3, 2021
5add29c
add predicitonMarket unit tests
rsmarques Apr 3, 2021
5e2f88f
update market getters methods + tests
rsmarques Apr 4, 2021
26e3a9b
reorganize predictionMarketContract test framework
rsmarques Apr 4, 2021
32e0772
add unit tests for PredictionMarket buy + add liquidity
rsmarques Apr 4, 2021
6b6ae1c
add remove liquidity tests
rsmarques Apr 4, 2021
ed5e85f
PredictionMarketContract tweaks
rsmarques Apr 4, 2021
28465ce
unit tests for PredictionMarket sell
rsmarques Apr 4, 2021
392fb2d
more test cases for PredictionMarket
rsmarques Apr 4, 2021
2bfc1f7
more liquidity test cases for PredictionMarket
rsmarques Apr 4, 2021
91ca781
update tests index; fix PredictionMarketContract getMarkets
rsmarques Apr 4, 2021
a38de5f
indent fixes
rsmarques Apr 4, 2021
aee3ee8
add PredictionMarket contract build
rsmarques Apr 6, 2021
653aa9d
add more getters methods
rsmarques Apr 10, 2021
0bd542d
add isLoggedIn function to Application
rsmarques Apr 11, 2021
e60ca26
add getMyPortfolio function
rsmarques Apr 11, 2021
abfe858
add PredictionMarketContract events
rsmarques Apr 12, 2021
fd9a49b
update PredictionMarket abi
rsmarques Apr 12, 2021
df94e5a
add getMyActions contract function
rsmarques Apr 15, 2021
3671b47
add PredictionMarketContract resolve outcome + withdraw winnigs
rsmarques Apr 19, 2021
2e3edb8
add claimWinnings / resolveMarket events
rsmarques Apr 19, 2021
d143e60
add myMarketShares and myClaimStatus functions
rsmarques Apr 20, 2021
f2a1136
update liquidity price events; emit events on market creation
rsmarques Apr 20, 2021
4290258
update PredictionMarket contract abi
rsmarques Apr 20, 2021
442c622
add getMarketResolvedOutcome to PredictionMarket contract
rsmarques Apr 20, 2021
1965804
emit addLiquidity participant action on market create
rsmarques Apr 20, 2021
96ecef7
update getMyPortfolio method
rsmarques Apr 20, 2021
19d0009
add resolveMarket, claimWinnings, claimLiquidity to PredictionMarketC…
rsmarques Apr 20, 2021
686dfd7
fix resolved market outcome price
rsmarques Apr 20, 2021
1b58a81
emit MarketLiquidity on resolve market
rsmarques Apr 20, 2021
4ec7e21
liquidity event tweaks
rsmarques Apr 21, 2021
a16adf5
add getMarketPrices function to contract
rsmarques Apr 22, 2021
d4c1e70
add average buy price to PredictionMarketContract
rsmarques Apr 22, 2021
affbcb7
refactor market create duration
rsmarques Apr 25, 2021
ce59759
liquidity withdraw bugfix
rsmarques Apr 25, 2021
1aec4d9
add getMarketPrices function
rsmarques May 7, 2021
650bf47
add Claim Winnings/Claim Liquidity actions to myActions
rsmarques May 12, 2021
9ff907a
add fees to liquidity providers
rsmarques Jun 2, 2021
599f118
migrate PredictionMarket to proxy
rsmarques Jun 7, 2021
6719df8
upgrade PredictionMarket proxy
rsmarques Jun 7, 2021
8c3b8c2
add missing migrations contract
rsmarques Jun 7, 2021
399136d
remove build/ folder
rsmarques Jun 23, 2021
3a46982
add realitio migration
rsmarques Jun 23, 2021
1e920fd
remove holders from PredictionMarket contract
rsmarques Jun 23, 2021
a702aca
integrate Realitio into PredictionMarket
rsmarques Jun 25, 2021
fda6f3d
add RealitioERC20Contract model
rsmarques Jun 28, 2021
65272d0
upgrade package.json build
rsmarques Jun 28, 2021
db1174b
fix RealitioERC20 model contract import
rsmarques Jun 29, 2021
6f684e0
add more methods to RealitioERC20 model
rsmarques Jun 29, 2021
333de70
add realitio to interfaces
rsmarques Jun 29, 2021
8bff7ec
add truffle/openzeppelin missing packages
rsmarques Jul 8, 2021
347ee1c
code cleanup; remove unused contracts
rsmarques Jul 8, 2021
d876656
refactor smart contracts to use openzeppelin; upgrade to truffle 0.6.2
rsmarques Jul 8, 2021
050dda0
PredictionMarket contract struct refactors
rsmarques Jul 9, 2021
2417b48
PredictionMarket: remove unused functions
rsmarques Jul 9, 2021
7460bc2
add prettier
rsmarques Jul 9, 2021
f8de982
PredictionMarket contract rename market variables
rsmarques Jul 12, 2021
5d69b23
more PredictionMarket contract refactors
rsmarques Jul 12, 2021
232337c
more PredictionMarket contract refactors
rsmarques Jul 12, 2021
834780e
trigger event on claimFees
rsmarques Jul 12, 2021
7e20253
fix bepro interface
rsmarques Jul 12, 2021
7b471fa
add initializable to PredictionMarket contract
rsmarques Jul 14, 2021
0996fb9
update web3js
rsmarques Jul 15, 2021
f689559
fix unit tests
rsmarques Jul 15, 2021
3c64df9
more model refactors
rsmarques Jul 15, 2021
3b9273f
fix erc20 migration
rsmarques Jul 15, 2021
28a9f2c
PredictionMarket: move createMarket outcomes arg to array
rsmarques Jul 15, 2021
2d98449
remove unused package
rsmarques Jul 15, 2021
3666ea8
More PredictionMarket contract optimizations
rsmarques Jul 15, 2021
f7a2d69
predictionMarket getAltData function
rsmarques Jul 26, 2021
737af8f
fix IContract __metamaskCall
rsmarques Jul 26, 2021
452300c
fix PredictionMarket model resolveOutcome
rsmarques Jul 26, 2021
5274329
fix RealitioERC20 model submitAnswerERC20 call
rsmarques Jul 26, 2021
8f7aa60
remove exchange contract
rsmarques Jul 26, 2021
24a8bac
add liquidity fees to user claim status
rsmarques Jul 26, 2021
7304fee
move claimFees event to ParticipantAction
rsmarques Jul 27, 2021
0645f72
add "Claim Fees" to actions list
rsmarques Jul 27, 2021
4d7596d
add timestamp to event MarketResolved in PredictionMarket
rsmarques Jul 28, 2021
a151165
re-add build/contracts folder
rsmarques Jul 28, 2021
a5e1fb2
add mnemonic to truffle config
rsmarques Jul 28, 2021
53cbbc1
fix: getETHBalance
rsmarques Jul 28, 2021
395ac92
fix PredictionMarket contract question formatting
rsmarques Aug 2, 2021
3456733
add more data to gewtMarketAltData; reset OZ-1337 data
rsmarques Aug 2, 2021
f1ec934
new OP kovan build
rsmarques Aug 2, 2021
47d89d0
fix: convert submitAnswerERC20 to eth decimals
rsmarques Aug 9, 2021
c5d76fd
add getMyBonds to realitioErc20 model
rsmarques Aug 12, 2021
c5beb7a
add getQuestion method to realitioERC20 contract
rsmarques Aug 13, 2021
97365dd
refactor realitio getMyBonds function
rsmarques Aug 13, 2021
9c1c25f
add isClaimed field to realtio question
rsmarques Aug 17, 2021
e093ad7
add claimWinnings method to realitio
rsmarques Aug 17, 2021
6eb55d2
add bonds claimed to realitio
rsmarques Aug 17, 2021
deaef2a
refactor realitio claimWinnings
rsmarques Aug 17, 2021
e76f195
add withdrawn status to realitio bonds
rsmarques Aug 17, 2021
ada939b
add realitio getMyActions
rsmarques Aug 17, 2021
3be1234
refactor typescript syntax to javascript
rsmarques Aug 18, 2021
54ffb86
indentation fixes
rsmarques Aug 18, 2021
d4e5ea7
fix: remove window web3 throw error
rsmarques Aug 18, 2021
6edf85b
fix models export
rsmarques Aug 18, 2021
325de76
store market and outcome details on events; use realitio question for…
rsmarques Aug 24, 2021
8439cd1
store image ipfs hash on createMarket
rsmarques Aug 25, 2021
5a97a89
update kovan contracts build
rsmarques Aug 25, 2021
045ff09
refactor Application web3 provider
rsmarques Aug 25, 2021
18ec0ce
fix predictionMarket unit tests
rsmarques Aug 25, 2021
9aa593d
add getMarketDetails function
rsmarques Aug 25, 2021
17e4308
fix realitioERC20 get lastWithdrawBlockNumber
rsmarques Aug 25, 2021
0ea9617
require ERC20 to create markets
rsmarques Aug 26, 2021
123b744
update kovan contracts build
rsmarques Aug 30, 2021
0e63f2e
add getFee method to PredictionMarketContract
rsmarques Aug 30, 2021
e6a8c27
Merge pull request #91 from bepronetwork/feature/prediction-markets-j…
rsmarques Aug 31, 2021
8b3e7de
prettier: PredictionMarketContract
rsmarques Sep 7, 2021
d040696
fix unit tests
rsmarques Sep 7, 2021
c103b26
refactor internal functions to addSharesToMarket and removeSharesFrom…
rsmarques Sep 8, 2021
89433c7
refactor PredictionMarket methods
rsmarques Sep 9, 2021
bd15782
use addLiquidity on createMarket
rsmarques Sep 9, 2021
d88902e
add slippage verification on buy/sell shares
rsmarques Sep 9, 2021
000c817
emit buy events on add/remove liquidity
rsmarques Sep 9, 2021
3141d71
remove deprecated variables from PredictionMarket; refactor comments
rsmarques Sep 13, 2021
948dde6
rename PredictionMarket contract variables
rsmarques Sep 13, 2021
c3644ef
prettier: PredictionMarketContract
rsmarques Sep 13, 2021
f18b45c
fix: Add/Remove liquidity event values
rsmarques Sep 14, 2021
c5c2bc2
update PredictionMarketContract.js to new smart contract
rsmarques Sep 14, 2021
18077c2
add truffle moonriver config
rsmarques Sep 17, 2021
f017a31
PredictionMarket: allow users to claim shares back from invalid markets
rsmarques Sep 18, 2021
9ec42a4
PredictionMarket: add claimVoided event
rsmarques Sep 20, 2021
6c160e4
update build/contracts
rsmarques Sep 20, 2021
a49c682
PredictionMarket: remove Ownable role from contract
rsmarques Sep 20, 2021
bdf997e
Update contract builds
rsmarques Sep 21, 2021
c138764
refactor getEvents function
rsmarques Sep 21, 2021
fcf8fc3
PredictionMarket: fix claimVoided event outcomeId
rsmarques Sep 22, 2021
732b164
Merge pull request #96 from bepronetwork/feature/prediction-markets-r…
rsmarques Sep 23, 2021
33d8d91
add calcBuyAmount and calcSellAmount methods
rsmarques Sep 28, 2021
a6aee66
add address(0) verification for realitio on constructor
rsmarques Oct 1, 2021
c4fd6ec
fix unit tests
rsmarques Oct 5, 2021
63e2a97
update tests; add config vars
rsmarques Oct 5, 2021
3cf69d0
address hacken suggested changes
rsmarques Oct 5, 2021
44901d2
add claimVoidedOutcomeShares method
rsmarques Oct 6, 2021
f867417
fix getEvents sorting
rsmarques Oct 13, 2021
afd025d
Merge pull request #103 from bepronetwork/feature/prediction-markets-…
rsmarques Oct 18, 2021
ad66316
Merge pull request #104 from bepronetwork/feature/prediction-markets-…
rsmarques Oct 18, 2021
194fcd6
add state verification to market nextState
rsmarques Nov 3, 2021
362bcec
PMSC02: Fix PredictionMarket Improvable Comparisons
rsmarques Nov 3, 2021
e668338
PMSC03: add verification for constructor
rsmarques Nov 3, 2021
7a1f4c9
PMSC05: fix comment mismatch
rsmarques Nov 3, 2021
f8856f1
PMSC06: add message to require statements
rsmarques Nov 3, 2021
b7939fe
fetch events from web3 events provider
rsmarques Nov 5, 2021
659241e
move truffle-hdwallet-provider to devDependencies
rsmarques Nov 5, 2021
a8a189f
fix web3 providers query filter
rsmarques Nov 5, 2021
99553c9
fix fromBigNumberToInteger issue
rsmarques Nov 5, 2021
e7725e7
Update README.md
rsmarques Nov 16, 2021
7776dd1
Update README.md
rsmarques Nov 16, 2021
413c9aa
Merge pull request #117 from bepronetwork/feature/prediction-markets-…
rsmarques Nov 24, 2021
972338a
standardize code
rsmarques Nov 25, 2021
3984bc5
Merge pull request #119 from bepronetwork/feature/prediction-markets-…
rsmarques Nov 25, 2021
6ee8ba6
fix PredictionMarket SafeMath overflow issue
rsmarques Jan 14, 2022
98548b5
Merge pull request #141 from bepronetwork/feature/prediction-markets-…
rsmarques Jan 14, 2022
c547a6a
remove nextState verification
rsmarques Jan 20, 2022
c1af350
update truffle config
rsmarques Jan 31, 2022
33c2f5b
add gasPrice config to smart contract calls
rsmarques Feb 17, 2022
11a26fd
upgrade migrations
rsmarques Feb 17, 2022
ddaf4da
init PredictionMarketAchievement contract
rsmarques Nov 25, 2021
ca38ce4
refactor NFT claim verification process
rsmarques Dec 1, 2021
21deff4
PredictionMarketAchievement: developments
rsmarques Feb 22, 2022
209d299
PredictionMarketAchievement: developments
rsmarques Feb 23, 2022
88eeaa8
Rename PredictionMarketAchievement to Achievements
rsmarques Feb 23, 2022
2ca4195
js: rename PredictionMarketAchievement to Achievements
rsmarques Feb 23, 2022
ace2e52
Achievements: fix setBaseURI method; add return to has* methods
rsmarques Feb 23, 2022
02d3d29
Achievements: add migration
rsmarques Feb 23, 2022
847c494
Achievement contract tweaks; update build folder
rsmarques Mar 1, 2022
2666809
Update Moonriver rpc
rsmarques Mar 1, 2022
d2422ff
Achievements contract: update tokens method; add tokenIndex method
rsmarques Mar 5, 2022
8793b76
Fix Contract model constructor params
rsmarques Mar 9, 2022
64da36a
PredictionMarketContract: optimize get portfolio call
rsmarques Mar 9, 2022
f795287
AchievementsContract: userStats, claimAchievement methods
rsmarques Mar 9, 2022
b65b37a
Achievements contract: add helper methods
rsmarques Mar 9, 2022
63b5848
Achievements contract: refactor claim process
rsmarques Mar 9, 2022
d645102
AchievementContract model: fix claimAchievement method
rsmarques Mar 9, 2022
9b8f3e2
AchievementContract model claimAchievement fix
rsmarques Mar 9, 2022
a590011
update build folder
rsmarques Mar 9, 2022
97bfbab
AchievementsContract: claim achievement for realitio bonds
rsmarques Mar 10, 2022
b8aab8d
AchievementsContract: add get user tokens method
rsmarques Mar 15, 2022
104bb2d
AchievementContract: getUserTokens non blocking call
rsmarques Mar 18, 2022
14f25ce
update build folder
rsmarques Mar 18, 2022
e8287e7
Merge pull request #157 from bepronetwork/feature/prediction-markets-…
rsmarques Mar 22, 2022
2e98a31
fix SafeMath overflow portfolio fetch
rsmarques Apr 7, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .DS_Store
Binary file not shown.
11 changes: 8 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
node_modules
/node_modules
node_modules/
.env
package-lock.json
package-lock.json
.idea
xunit.xml
docs/

xunit.xml
.DS_Store
Loading