-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLoyaltypoint.html
More file actions
78 lines (54 loc) · 5.23 KB
/
Loyaltypoint.html
File metadata and controls
78 lines (54 loc) · 5.23 KB
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
<!DOCTYPE html>
<html>
<meta charset="utf-8"/>
<head>
<title>Page Title</title>
<script src="web3.js"></script>
<script>
var web3 = new Web3(new Web3.providers.HttpProvider("http://18.188.87.71:8545"));
var LoyaltyContract = web3.eth.contract([{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"bytes32"}],"name":"ontokenbucket","outputs":[{"name":"Address","type":"address"},{"name":"Name","type":"bytes32"},{"name":"Symbol","type":"bytes32"},{"name":"Currentholdings","type":"uint256"},{"name":"Userstatus","type":"bool"},{"name":"Merchantstatus","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_value","type":"uint256"}],"name":"tradingfrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"},{"name":"_tokenName","type":"bytes32"}],"name":"transfer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_tokenName","type":"bytes32"}],"name":"initialReg","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_tokenName","type":"bytes32"},{"name":"_tokenSymbol","type":"bytes32"}],"name":"registerUsers","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_value","type":"uint256"}],"name":"tradingto","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_initialSupply","type":"uint256"},{"name":"_tokenName","type":"bytes32"},{"name":"_tokenSymbol","type":"bytes32"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"","type":"address"},{"indexed":false,"name":"","type":"bytes32"},{"indexed":false,"name":"","type":"bytes32"},{"indexed":false,"name":"","type":"uint256"}],"name":"UserRegisteredLog","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"from","type":"address"},{"indexed":false,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"TransferLog","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"","type":"address"},{"indexed":false,"name":"","type":"bytes32"},{"indexed":false,"name":"","type":"bytes32"},{"indexed":false,"name":"","type":"uint256"},{"indexed":false,"name":"","type":"bool"},{"indexed":false,"name":"","type":"bool"}],"name":"InitialRegLog","type":"event"}]);
//address of titan token
addr= "0xdb0d1d4948d71ee02e00f07ec0334fc3bc9538bb";
var myContractInstance = LoyaltyContract.at(addr);
console.log(myContractInstance);
//var account ="0x055650c2dee3392aeb73d80ccd0b169c10d379f7";
//var account = "0x99b833b8242dab5cbfc12dd2e4dac340a268f968";
//valid address
var account = "0xb7950e70f188b62a7cb17c9024d5bb9e1085f446";
var account1 = "0x19e1ca3b8d47b30bb37b7ea3b89f311b46f45a37";
var _tokenName = "Titan";
var _tokenSymbol = "T";
var value = 100;
//console.log(isAccountLocked(account));
//console.log(web3.fromWei(web3.eth.getBalance(account)).toString);
//console.log(myContractInstance.propertyRegister(AccountID,Ownername,OwnerAddress,GovID,PropertyID,Pow,{from:AccountID,gas:2500000}));
//ontokenbucket[msg.sender][_tokenName].Merchantstatus
// myContract.methods.displayAward(username).send({from: account_address})
//initialreg Done
//console.log(myContractInstance.initialReg(_tokenName,{from: account, gas:2000000}));
//registerUsers done
//console.log(myContractInstance.registerUsers(_tokenName,_tokenSymbol,{from:account, gas:2000000}));
//display details of thar user done
//console.log(myContractInstance.ontokenbucket.call(account,_tokenName));
console.log("pending..");
console.lgo(transfer(account1, value, _tokenName,{from:account,gas = 2000000}));
console.log("..executed");
//console.log(myContractInstance.transfer();)
//console.log(myContractInstance.propertyRegister(AccountID,Ownername,OwnerAddress,GovID,PropertyID,Pow,{from:AccountID,gas:2500000}));
//console.log(myContractInstance.Verify(PropertyID,AccountID,{from:Govaddress,gas:2500000}));
//console.log(AccountID,transferto,PropertyID,Ownername,OwnerAddress,GovID,{from:AccountID,gas:2500000});
/*
var temp;
temp = myContractInstance.getInstructor(fname,accounts);
console.log(web3.toUtf8(temp[0]));
console.log(temp[1]);
/home/rosebay/Titan/build/bin/gethconsole.log(temp[2]);
var dumpdata = myContractInstance.play.call('black','0x29ab8cebc66dab188494d264348dc81977715ded');
console.log(dumpdata[0]+" another ");
console.log(dumpdata[1]);
*/
</script>
</head>
<body>
</body>
/home/rosebay/Titan/build/bin/geth</html>