-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheck.html
43 lines (42 loc) · 2.36 KB
/
check.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
<html>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
<script data-main="scripts/main" src="https://code.jquery.com/jquery-3.4.1.js" integrity="sha256-WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/web3@latest/dist/web3.min.js"></script>
<script src="main.js"></script>
<body>
<div class="container">
<h1 style="text-align: center;">Validate Data</h1></br></br></br>
<div class="form-group">
<form style="text-align: center;" action="upload.php" method="POST" enctype="multipart/form-data">
<input class="form-control-file" type="file" name="file1" id="file1"></br></br></br>
<label>Enter Transaction ID: </label>
<input type="text" class="form-control" id="txt1" size="100" name="txt1"></br>
<input type="submit" value="Submit">
</form>
</div>
<p id="answer"></p>
</div>
</body>
<script>
function verify(){
console.log("inside verify");
web3=new Web3(web3.currentProvider);
eth = web3.eth;
let t_id=document.getElementById("txt1").value;
let data;
async function getAccount(){
ethereum.enable();
eth.getTransaction(t_id).then(
function(result){
data=result.input
console.log(data);
document.getElementById("answer").innerHTML=data;
}
);
}
getAccount();
}
</script>
</html>