Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2064 from rishabhkeshan/gsoc-challenge-3/Wallet2.0
Add a new Crypto Wallet Exploit Challenge
- Loading branch information
Showing
22 changed files
with
1,152 additions
and
529 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<mat-card class="mat-elevation-z6"> | ||
<div class="header_container"> | ||
<h1>Crypto Wallet</h1> | ||
<div class="metamask-button"> | ||
<button | ||
mat-raised-button | ||
color="accent" | ||
type="button" | ||
(click)="handleAuth()" | ||
> | ||
<span *ngIf="!session">Connect your MetaMask</span> | ||
<span *ngIf="session" | ||
>{{ userData.address.substring(0, 6) }}...{{ | ||
userData.address.slice(-6) | ||
}}</span | ||
> | ||
</button> | ||
</div> | ||
</div> | ||
<p> | ||
<b> | ||
<span>Your Wallet Balance:</span> | ||
<span class="confirmation"> {{ walletBalance }} ETH</span> | ||
</b> | ||
</p> | ||
<div> | ||
<mat-form-field style="width: 100%" color="accent" appearance="outline"> | ||
<mat-label>Enter amount:</mat-label> | ||
<input | ||
matInput | ||
placeholder="Enter ether amount to deposit/withdraw" | ||
type="number" | ||
id="inputAmount" | ||
[(ngModel)]="inputAmount" | ||
aria-label="Text field for the withdrawal amount" | ||
/> | ||
</mat-form-field> | ||
<h5 class="error">{{ errorMessage }}</h5> | ||
</div> | ||
<div class="dwbutton_container"> | ||
<button | ||
type="submit" | ||
class="deposit_withdraw_button" | ||
mat-raised-button | ||
color="primary" | ||
aria-label="Button to deposit" | ||
(click)="depositETH()" | ||
> | ||
Deposit | ||
</button> | ||
<button | ||
type="submit" | ||
class="deposit_withdraw_button" | ||
mat-raised-button | ||
color="warning" | ||
aria-label="Button to withdraw" | ||
(click)="withdrawETH()" | ||
> | ||
Withdraw | ||
</button> | ||
</div> | ||
</mat-card> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
.header_container { | ||
display: flex; | ||
justify-content: space-between; | ||
margin-bottom: 30px; | ||
} | ||
|
||
.dwbutton_container { | ||
display: flex; | ||
gap: 12px; | ||
justify-content: space-between; | ||
|
||
} | ||
|
||
mat-card { | ||
display: block; | ||
margin-left: 30%; | ||
margin-right: 30%; | ||
} | ||
|
||
mat-form-field { | ||
padding-top: 10px; | ||
width: 100%; | ||
} | ||
|
||
.form-container { | ||
min-width: 350px; | ||
} | ||
|
||
.deposit_withdraw_button { | ||
width: 100%; | ||
} | ||
|
||
.heading { | ||
background: rgba(0, 0, 0, 0.2); | ||
font-size: x-large; | ||
justify-content: center; | ||
padding: 12px 20px; | ||
} |
Oops, something went wrong.