Skip to content

Commit 6f7b21f

Browse files
added footer
1 parent f762afe commit 6f7b21f

14 files changed

+161
-39
lines changed

pythia-frontend/src/App.vue

+4-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@
1717

1818
<style>
1919
html, body {
20-
height: 100vh;
20+
height: 100%;
21+
width: 100%;
22+
overflow-x: hidden;
23+
padding: 0px;
2124
background: linear-gradient(90deg, rgb(9, 25, 37) 0%, #06121c 53%, #0b1d2c 100%);
2225
margin:0px;
2326
font-family: ui-sans-serif;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
<template>
2+
<div class="footer">
3+
<span style="display:flex;justify-content:center;align-items:center">
4+
<img src="../../../public/pythia-icon.svg" width='120' height='100' fill="none"/>
5+
<h1 class="title">Pythia</h1>
6+
</span>
7+
<ul class="no-bullets">
8+
<span class="list-title">Email</span>
9+
<div style="user-select:text;cursor:default;padding:3px">[email protected]</div>
10+
</ul>
11+
<ul class="no-bullets">
12+
<span class="list-title">Social media</span>
13+
<li @click="open('telegram')">Telegram</li>
14+
<li @click="open('twitter')">Twitter</li>
15+
<li @click="open('linkedIn')">LinkedIn</li>
16+
</ul>
17+
<ul class="no-bullets">
18+
<span class="list-title">Other</span>
19+
<li @click="open('github')">GitHub</li>
20+
</ul>
21+
</div>
22+
</template>
23+
24+
<script>
25+
export default {
26+
data(){
27+
return {
28+
telegram: 'https://t.me/+861c-md9WcVkZmQy',
29+
github: 'https://github.com/antonkravchenko2001/Pythia',
30+
twitter: 'https://twitter.com/PythiaCompany',
31+
linkedIn: 'https://www.linkedin.com/company/pythia-company/about/?viewAsMember=true',
32+
}
33+
},
34+
methods: {
35+
open(path){
36+
window.open(this[path])
37+
}
38+
}
39+
}
40+
</script>
41+
42+
<style scoped>
43+
.footer {
44+
display:flex;
45+
justify-content: center;
46+
gap: 10%;
47+
max-width: max-content;
48+
min-width: 100%;
49+
padding-top: 10%;
50+
padding-bottom: 5%;
51+
font-family: 'Montserrat';
52+
font-weight: 350;
53+
font-size: 12px;
54+
color: #909090;
55+
}
56+
57+
.no-bullets {
58+
list-style-type: none; /* Remove bullets */
59+
padding: 0; /* Remove padding */
60+
margin: 0; /* Remove margins */
61+
}
62+
63+
li {
64+
padding: 3px;
65+
}
66+
67+
li:hover {
68+
text-decoration: underline;
69+
}
70+
71+
.list-title {
72+
font-size: 14px;
73+
font-weight: 400;
74+
padding-left: 3px;
75+
padding-bottom: 5px;
76+
color:#ffffff;
77+
}
78+
79+
.title {
80+
color:#574eb8;
81+
}
82+
</style>

pythia-frontend/src/components/HomeContent/CreateMarketButton.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<template>
22
<div class="create-market-div">
3-
<span style="position:relative">
4-
<button v-if='isLoggedIn' @click="click" class="create-market-button">
3+
<span v-if='isLoggedIn' style="position:relative">
4+
<button @click="click" class="create-market-button">
55
CREATE MARKET
66
</button>
7-
<span v-if='isLoggedIn' style="left: 170px; top: 37%;position: absolute;">
7+
<span style="left: 170px; top: 37%;position: absolute;">
88
<PopUpWindow
99
text='Create your own market so that other can check verify expertise by weging money on it'
1010
background="#121f2a"

pythia-frontend/src/components/HomeContent/CreateMarketForm.vue

+3-2
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,10 @@
181181
},
182182
async getAsset(){
183183
const assetName = this.$refs.dropdown.input;
184+
console.log(assetName);
184185
const res = await Moralis.Cloud.run(
185186
'getAssets',
186-
{asset: assetName}
187+
{asset: assetName.toLowerCase()}
187188
)
188189
let asset = res[0];
189190
return asset;
@@ -359,7 +360,7 @@
359360
font-family: 'Montserrat';
360361
font-size: 12px;
361362
position: absolute;
362-
top: 55%;
363+
top: 45vh;
363364
left: 50%;
364365
transform: translate(-50%, -50%);
365366
}

pythia-frontend/src/components/HomeContent/HomeContent.vue

+11-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div style="display:flex; justify-content:center; height: 85vh;" :class="{'scroll-disable': $store.state.showForm}">
2+
<div style="display:flex; justify-content:center; height: max-content;position:relative">
33
<div class='home-content' :class="{'blur-class': condition}">
44
<span>
55
<h1 class="platform-description" style="font-size:48px">
@@ -19,8 +19,8 @@
1919
<div v-if="$store.state.showForm" style="height: 88vh">
2020
<CreateMarketForm :assetNames="filters.assetNames.slice(1)"/>
2121
</div>
22-
<div v-if="!$store.state.chainCorrect">
23-
<Alert background='#ff000080' color='white' message='Error:' text='Incorrect network, please switch to Kovan'/>
22+
<div v-if="!$store.state.chainCorrect" class="alert">
23+
<Alert background='#ff000080' color='white' message='Error:' text='Incorrect network, please switch to Polygon'/>
2424
</div>
2525
</div>
2626
</template>
@@ -113,7 +113,8 @@ export default {
113113
<style scoped>
114114
115115
.home-content{
116-
width: 75%;
116+
max-width: 97%;
117+
min-width: 80%;
117118
display: grid;
118119
grid-template-rows: repeat(3, max-content);
119120
gap: 25px;
@@ -133,7 +134,11 @@ export default {
133134
text-shadow: 2px 2px #3f189a;
134135
}
135136
136-
.scroll-disable {
137-
overflow: hidden;
137+
.alert{
138+
position: absolute;
139+
width:max-content;
140+
right:5px;
141+
z-index:100;
142+
top: 0px;
138143
}
139144
</style>

pythia-frontend/src/components/Market/MarketActions.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ import Moralis from '../../main.js';
185185
186186
//reload the page
187187
this
188-
.delay(1000)
188+
.delay(3000)
189189
.then(
190190
() => this.$router.go()
191191
);

pythia-frontend/src/components/Market/MarketDisplay.vue

+10-3
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@
88
</div>
99
</div>
1010
</div>
11-
<div v-if="!$store.state.chainCorrect">
12-
<Alert background='#ff000080' color='white' message='Error:' text='Incorrect network, please switch to Kovan'/>
11+
<div v-if="!$store.state.chainCorrect" class="alert">
12+
<Alert background='#ff000080' color='white' message='Error:' text='Incorrect network, please switch to Polygon'/>
1313
</div>
1414
<div v-if="!marketExists">
1515
<PageNotFound/>
1616
</div>
17-
1817
</template>
1918

2019
<script>
@@ -161,4 +160,12 @@ export default {
161160
display: grid;
162161
grid-template-rows: 1fr 2fr;
163162
}
163+
164+
.alert{
165+
position: absolute;
166+
width:max-content;
167+
right:5px;
168+
z-index:100;
169+
top: 33px;
170+
}
164171
</style>

pythia-frontend/src/components/subcomponents/AlertWindow.vue

-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@
2121
gap: 10px;
2222
padding: 10px;
2323
border-radius: 5px;
24-
position: absolute;
25-
right: 10px;
26-
top: 10%;
2724
}
2825
2926
.alert-text {

pythia-frontend/src/config.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
export const serverUrl = 'https://uj5tozevki90.usemoralis.com:2053/server';
2-
export const appId = 'cKC95YPjyNN8qvLLqEEeGiYZwwc1qRZd8MqoBegb';
1+
export const serverUrl = 'https://jiissmcimlux.usemoralis.com:2053/server';
2+
export const appId = '3APgJrIFnjueQ1M3pmhJiSCxS31uI7OpDfCL1jag';
33
export const marketsABI = [
44
{
55
"inputs": [
@@ -333,7 +333,7 @@ export const marketsABI = [
333333
"type": "function"
334334
}
335335
];
336-
export const marketsAddress = '0xA44451D86c825042D370aEd06DDaCb6d440eAD70';
336+
export const marketsAddress = '0xDfEc2EC7E96f54fD41B229122c30874e49c23a5F';
337337
export const ERC20ABI = [
338338
{
339339
"anonymous": false,
@@ -519,11 +519,11 @@ export const ERC20ABI = [
519519
"type": "function"
520520
}
521521
];
522-
export const payTokenAddress = '0x04DF6e4121c27713ED22341E7c7Df330F56f289B';
523-
export const chain = 'kovan';
524-
export const chainId = "0x2a";
522+
export const payTokenAddress = '0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063';
523+
export const chain = 'polygon';
524+
export const chainId = "0x89";
525525

526-
export const minSharesCreate = 10;
527-
export const minMoneyCreate = 10;
526+
export const minSharesCreate = 5;
527+
export const minMoneyCreate = 5;
528528

529-
export const minMoney = 5;
529+
export const minMoney = 2;

pythia-frontend/src/utils.js

+3
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ export const determineExpertise = async (player) => {
7474
'getTopPerformers',
7575
player
7676
)
77+
if(!results[0]){
78+
return 'Novice';
79+
}
7780
const expertScore = results[0].expertScore;
7881
if(expertScore < 100){
7982
return 'Novice';

pythia-frontend/src/views/HomePage.vue

+20-4
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,24 @@
11
<template>
2-
<NavBar />
3-
<HomeContent />
2+
<div :class="{'scroll-disable': $store.state.showForm}">
3+
<NavBar />
4+
<HomeContent />
5+
<FooterComp />
6+
</div>
47
</template>
58

69
<script>
710
import HomeContent from '../components/HomeContent/HomeContent.vue'
811
import NavBar from '@/components/NavBar/NavBar.vue'
12+
import { defineAsyncComponent } from 'vue'
913
import { checkChain } from '@/utils';
1014
1115
export default {
1216
components: {
1317
HomeContent,
14-
NavBar
18+
NavBar,
19+
FooterComp: defineAsyncComponent(() =>
20+
import('../components/Footer/FooterComponent.vue')
21+
),
1522
},
1623
computed: {
1724
correctChain(){
@@ -28,4 +35,13 @@ export default {
2835
console.log(chainCorrect);
2936
}
3037
}
31-
</script>
38+
</script>
39+
40+
41+
<style>
42+
.scroll-disable {
43+
overflow: hidden;
44+
height: 100vh;
45+
}
46+
47+
</style>

pythia-frontend/src/views/LeaderBoard.vue

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,22 @@
22
<div>
33
<NavBar/>
44
<LeaderTable/>
5+
<FooterComp/>
56
</div>
67
</template>
78

89
<script>
910
import NavBar from '@/components/NavBar/NavBar.vue'
11+
import { defineAsyncComponent } from 'vue'
1012
import LeaderTable from '@/components/LeaderTable.vue'
1113
1214
export default {
1315
components:{
1416
NavBar,
15-
LeaderTable
17+
LeaderTable,
18+
FooterComp: defineAsyncComponent(() =>
19+
import('../components/Footer/FooterComponent.vue')
20+
),
1621
}
1722
}
1823
</script>
+6-1
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
<template>
22
<NavBar />
33
<MarketDisplay />
4+
<FooterComp />
45
</template>
56

67
<script>
78
import MarketDisplay from '../components/Market/MarketDisplay.vue'
89
import NavBar from '@/components/NavBar/NavBar.vue'
10+
import { defineAsyncComponent } from 'vue'
911
1012
export default {
1113
components: {
1214
MarketDisplay,
13-
NavBar
15+
NavBar,
16+
FooterComp: defineAsyncComponent(() =>
17+
import('../components/Footer/FooterComponent.vue')
18+
),
1419
}
1520
}
1621
</script>

smart_contracts/Markets.sol

+3-5
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ contract Markets is KeeperCompatibleInterface{
5454

5555
//multiplier used in computations
5656
uint256 constant MULTIPLIER = 10 ** 18;
57-
//alpha hyperparamter used in the price function for a market
58-
uint256 constant ALPHA = 5;
5957
//the maximum amount of markets that can be resolved within one block
6058
uint256 constant MAX_MARKETS_UPDATE = 30;
6159
//maximum amount of markets that can be stored in the contract
@@ -540,8 +538,8 @@ contract Markets is KeeperCompatibleInterface{
540538
[1 - _outcome]
541539
);
542540

543-
//ln(1 + m1 / M1) * alpha * N2
544-
//ln((M1 + m1) * ONE / M1) * alpha * N2 / ONE
541+
//ln(1 + m1 / M1) * N2
542+
//ln((M1 + m1) * ONE / M1) * N2 / ONE
545543
return (
546544
(
547545
(
@@ -551,7 +549,6 @@ contract Markets is KeeperCompatibleInterface{
551549
).ln()
552550
) *
553551
_sharesOppositeOutcome /
554-
ALPHA /
555552
MathContract.one()
556553
);
557554
}
@@ -602,3 +599,4 @@ contract Markets is KeeperCompatibleInterface{
602599
}
603600

604601
}
602+

0 commit comments

Comments
 (0)