-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
135 lines (134 loc) · 4.42 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<!DOCTYPE html>
<html>
<head>
<title>eFiat World</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<link rel="stylesheet" href="./frontend-app/app_style.css">
</head>
<body>
<h1>Efiat.world</h1>
<img src="./frontend-app/image.jpg" class="image">
<h3>System for digital backed currencies</h3>
<p>Disclaimer: This project was developed as a proof of concept and submitted as final project for the Consensys Blockchain Developer Bootcamp. </p>
<p>The contents in this project are not complete and not intended for a production environment.</p>
<p>Test in Kovan Network</p>
<div id="loadcircle"></div>
<hr>
<div>
<h3>How does it work?</h3>
<ol>
<li>Get some mockWeth using the Faucet below</li>
<li>Deposit some mockWeth into the House Of Reserves contract</li>
<li>Mint some efiat pesos by entering amount in the House Of Coin contract</li>
<li>voila!</li>
</ol>
</div>
<hr>
<div class="metamask" >
<button id="connectButton">Connect</button>
<br>
<label>
Account: <span id="getAccountsResult"></span>
</label>
<br>
<label>
Balance: <span id="getAccountBalance"></span> ETH (localhost ETH)
</label>
</div>
<hr>
<div class="asset-interface">
<div class="row1">
<h3>House of Reserves</h3>
</div>
<div class="row2">
<h4>Reserve Asset: MockWETH [<span id="mockwethAddr"></span>]</h4>
<button id="getSomeButton">MockWETH Faucet</button>
<br>
<label>
Current Wallet Balance: <span id="getWETHBalance"></span> WETH
</label>
<br>
<label>
Your Deposited Reserves: <span id="yourReserves"></span> WETH
</label>
<br>
<label>
Locked Reserves: <span id="lockedReserves"></span> WETH
</label>
<br>
<label>
Collateralization Ratio: <span id="collateralRatio"></span> %
</label>
</div>
<div class="row3">
<input id="wethDepositInput" type="text" placeholder="amount to deposit" />
<button id="depositButton">Deposit in Reserve</button>
</div>
<div class="row4">
<input id="wethWithdrawInput" type="text" placeholder="amount to withdraw" />
<button id="withdrawButton">Withdraw from Reserve</button>
</div>
</div>
<hr>
<div class="asset-interface">
<div class="row1">
<h3>House of Coin Minting</h3>
</div>
<div class="row2">
<h4>Backed Asset to Mint: efiat [<span id="efiatAddr"></span>]</h4>
<p>($efiat assumed to represent $MXN for demonstration purposes.)</p>
<label>
Current Wallet Balance: $ <span id="mockEfiatBalance"></span> efiat
</label>
<br>
<label>
Your Minted Amount: $ <span id="yourMinted"></span> efiat
</label>
<br>
<label>
Your Mint Power: $ <span id="yourMintPower"></span> efiat
</label>
</div>
<div class="row3">
<input id="efiatMintInput" type="text" placeholder="amount to mint" />
<button id="mintButton">Mint efiat and Lock Reserve</button>
</div>
<div class="row4">
<input id="efiatPaybackInput" type="text" placeholder="amount to payback" />
<button id="paybackButton">Payback efiat and Unlock Reserve</button>
</div>
</div>
<hr>
<div class="oracle_div">
<div class="row1">
<a href="https://app.redstone.finance/#/app/tokens?selected-tab=3"><h3>Redstone Oracle</h3></a>
<p>Fetched using API</p>
</div>
<div class="row2">
<label>
usd/eFiat: $ <span id="oraclePrice1"></span>
</label>
<br>
<label>
usd/ETH: $ <span id="oraclePrice2"></span>
</label>
<br>
<label>
eFiat/ETH: $ <span id="oraclePrice3"></span>
</label>
<br>
<p>Fetched on-chain</p>
<button id="triggerOnChain">Get On-Chain</button>
<label>
efiat/eth: $ <span id="onChainPrice"></span>
</label>
<hr>
<p>Check Efiat.World Github Source Code: <a href="https://github.com/DaigaroCota/blockchain-developer-bootcamp-final-project"></a></p>
</div>
</div>
<script src="./frontend-app/metamask-onboarding.bundle.js" defer></script>
<script src="https://cdn.ethers.io/lib/ethers-5.1.umd.min.js" type="text/javascript"></script>
<script src="./frontend-app/redstoneFlashStorage.js" type="text/javascript"></script>
<script src="./frontend-app/app.js" type="text/javascript" defer></script>
</body>
</html>