-
Notifications
You must be signed in to change notification settings - Fork 0
/
contract-addresses.js
85 lines (68 loc) · 41.5 KB
/
contract-addresses.js
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
/*
* Testnet Ethereum (Goerli)
*/
/* Document Authenticity */
var docAuthAddress = '0xeba98614f58eb67f607a3227d0e1663e4951e9a7' ///Testnet Goerli
var docAuthAbi = [{"constant":false,"inputs":[{"name":"sha256","type":"string"}],"name":"storeAuthenticity","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"sha256","type":"string"}],"name":"checkAuthenticity","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"}]
var docAuth = web3.eth.contract(docAuthAbi).at(docAuthAddress)
/* Sign Documents */
var docSignAddress = '0x84b69a6196be91a7656882d6837f937d5ba208c5' // Testnet Goerli
var docSignAuthAbi = [ { "constant": true, "inputs": [ { "name": "", "type": "address" } ], "name": "registrator", "outputs": [ { "name": "", "type": "bool", "value": false } ], "payable": false, "type": "function" }, { "constant": false, "inputs": [ { "name": "sha256", "type": "string" }, { "name": "index", "type": "uint256" }, { "name": "signature", "type": "string" } ], "name": "registerSignature", "outputs": [ { "name": "timestamp", "type": "uint256" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "sha256", "type": "string" }, { "name": "signerIndex", "type": "uint256" } ], "name": "getSignerBySignerIndex", "outputs": [ { "name": "index", "type": "uint256" }, { "name": "id", "type": "bytes32" }, { "name": "wallet", "type": "bytes32" }, { "name": "signature", "type": "string" }, { "name": "timestamp", "type": "uint256" } ], "payable": false, "type": "function" }, { "constant": false, "inputs": [ { "name": "sha256", "type": "string" }, { "name": "signers", "type": "bytes32[]" }, { "name": "walletAddressesEncoded", "type": "bytes32[]" } ], "name": "newDocument", "outputs": [ { "name": "timestamp", "type": "uint256" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "", "type": "bytes32" }, { "name": "", "type": "uint256" } ], "name": "userDocuments", "outputs": [ { "name": "", "type": "uint256", "value": "0" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "sha256", "type": "string" }, { "name": "signerId", "type": "bytes32" } ], "name": "getSignerBySignerId", "outputs": [ { "name": "index", "type": "uint256", "value": "0" }, { "name": "id", "type": "bytes32", "value": "0x" }, { "name": "wallet", "type": "bytes32", "value": "0x" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [], "name": "owner", "outputs": [ { "name": "", "type": "address", "value": "0x10e01b95d75cfee477da50dd1a72c8d4db668146" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "sha256", "type": "string" }, { "name": "signerWallet", "type": "bytes32" } ], "name": "getSignerIdByWallet", "outputs": [ { "name": "index", "type": "uint256", "value": "0" }, { "name": "id", "type": "bytes32", "value": "0x0000000000000000000000000000000000000000000000000000000000000000" }, { "name": "wallet", "type": "bytes32", "value": "0x0000000000000000000000000000000000000000000000000000000000000000" } ], "payable": false, "type": "function" }, { "constant": false, "inputs": [ { "name": "registratorAddress", "type": "address" }, { "name": "status", "type": "bool" } ], "name": "updateRegistratorStatus", "outputs": [], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "userId", "type": "bytes32" } ], "name": "listDocuments", "outputs": [ { "name": "", "type": "uint256[]", "value": [] } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "sha256", "type": "string" } ], "name": "checkTimestamp", "outputs": [ { "name": "timestamp", "type": "uint256", "value": "0" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "sha256", "type": "string" } ], "name": "countSigners", "outputs": [ { "name": "count", "type": "uint256", "value": "0" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "", "type": "uint256" } ], "name": "documents", "outputs": [ { "name": "docTimestamp", "type": "uint256", "value": "0" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "sha256", "type": "string" } ], "name": "checkCompleted", "outputs": [ { "name": "status", "type": "bool", "value": true } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "sha256", "type": "string" }, { "name": "signerId", "type": "bytes32" } ], "name": "checkDocSigner", "outputs": [ { "name": "signed", "type": "bool" }, { "name": "timestamp", "type": "uint256" }, { "name": "signature", "type": "string" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "sha256", "type": "string" } ], "name": "countSignatures", "outputs": [ { "name": "count", "type": "uint256", "value": "0" } ], "payable": false, "type": "function" }, { "constant": false, "inputs": [ { "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "payable": false, "type": "function" }, { "payable": false, "type": "fallback" }, { "anonymous": false, "inputs": [ { "indexed": false, "name": "sha256", "type": "string" }, { "indexed": false, "name": "signers", "type": "bytes32[]" }, { "indexed": false, "name": "timestamp", "type": "uint256" } ], "name": "NewDocument", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "name": "sha256", "type": "string" }, { "indexed": false, "name": "index", "type": "uint256" }, { "indexed": false, "name": "signature", "type": "string" }, { "indexed": false, "name": "timestamp", "type": "uint256" } ], "name": "RegisterSignature", "type": "event" } ];
var docSign = web3.eth.contract(docSignAuthAbi).at(docSignAddress)
/* CPF IDs and wallets repository */
var repoAddress = '0xc85245d3cdec6ca9561bf897175e63009360aba0' ///Testnet Goerli
var repoAbi = [{"constant":false,"inputs":[{"name":"id","type":"bytes32"},{"name":"wallet","type":"string"}],"name":"newUser","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"userIds","outputs":[{"name":"userId","type":"bytes32"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"id","type":"bytes32"}],"name":"getLastWallet","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"id","type":"bytes32"}],"name":"getWalletsFromUser","outputs":[{"name":"wallets","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"wallet","type":"string"}],"name":"checkUserByWallet","outputs":[{"name":"","type":"bytes32"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"userIdIndex","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalWallets","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalUsers","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"id","type":"bytes32"},{"name":"wallet","type":"string"}],"name":"isWalletFromUser","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"type":"function"},{"inputs":[],"payable":false,"type":"constructor"},{"payable":false,"type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"id","type":"bytes32"}],"name":"User","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"id","type":"bytes32"}],"name":"CheckUserByWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"wallet","type":"string"}],"name":"ShowLastWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"text","type":"string"}],"name":"LogS","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"number","type":"uint256"}],"name":"LogN","type":"event"}];
var idRepo = web3.eth.contract(repoAbi).at(repoAddress)
/*
* Testnet Ethereum (Rinkeby)
*/
/* Document Authenticity */
var docAuthAddress = '0x2aa3da3dede1550832c2fc541da12d3936b7248c' ///Testnet
var docAuthAbi = [{"constant":false,"inputs":[{"name":"sha256","type":"string"}],"name":"storeAuthenticity","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"sha256","type":"string"}],"name":"checkAuthenticity","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"}]
var docAuth = web3.eth.contract(docAuthAbi).at(docAuthAddress)
/* Sign Documents */
var docSignAddress = '0x7470566ff67992a135780303297580968be0256d' // Testnet
var docSignAuthAbi = [ { "constant": true, "inputs": [ { "name": "", "type": "address" } ], "name": "registrator", "outputs": [ { "name": "", "type": "bool", "value": false } ], "payable": false, "type": "function" }, { "constant": false, "inputs": [ { "name": "sha256", "type": "string" }, { "name": "index", "type": "uint256" }, { "name": "signature", "type": "string" } ], "name": "registerSignature", "outputs": [ { "name": "timestamp", "type": "uint256" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "sha256", "type": "string" }, { "name": "signerIndex", "type": "uint256" } ], "name": "getSignerBySignerIndex", "outputs": [ { "name": "index", "type": "uint256" }, { "name": "id", "type": "bytes32" }, { "name": "wallet", "type": "bytes32" }, { "name": "signature", "type": "string" }, { "name": "timestamp", "type": "uint256" } ], "payable": false, "type": "function" }, { "constant": false, "inputs": [ { "name": "sha256", "type": "string" }, { "name": "signers", "type": "bytes32[]" }, { "name": "walletAddressesEncoded", "type": "bytes32[]" } ], "name": "newDocument", "outputs": [ { "name": "timestamp", "type": "uint256" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "", "type": "bytes32" }, { "name": "", "type": "uint256" } ], "name": "userDocuments", "outputs": [ { "name": "", "type": "uint256", "value": "0" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "sha256", "type": "string" }, { "name": "signerId", "type": "bytes32" } ], "name": "getSignerBySignerId", "outputs": [ { "name": "index", "type": "uint256", "value": "0" }, { "name": "id", "type": "bytes32", "value": "0x" }, { "name": "wallet", "type": "bytes32", "value": "0x" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [], "name": "owner", "outputs": [ { "name": "", "type": "address", "value": "0x10e01b95d75cfee477da50dd1a72c8d4db668146" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "sha256", "type": "string" }, { "name": "signerWallet", "type": "bytes32" } ], "name": "getSignerIdByWallet", "outputs": [ { "name": "index", "type": "uint256", "value": "0" }, { "name": "id", "type": "bytes32", "value": "0x0000000000000000000000000000000000000000000000000000000000000000" }, { "name": "wallet", "type": "bytes32", "value": "0x0000000000000000000000000000000000000000000000000000000000000000" } ], "payable": false, "type": "function" }, { "constant": false, "inputs": [ { "name": "registratorAddress", "type": "address" }, { "name": "status", "type": "bool" } ], "name": "updateRegistratorStatus", "outputs": [], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "userId", "type": "bytes32" } ], "name": "listDocuments", "outputs": [ { "name": "", "type": "uint256[]", "value": [] } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "sha256", "type": "string" } ], "name": "checkTimestamp", "outputs": [ { "name": "timestamp", "type": "uint256", "value": "0" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "sha256", "type": "string" } ], "name": "countSigners", "outputs": [ { "name": "count", "type": "uint256", "value": "0" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "", "type": "uint256" } ], "name": "documents", "outputs": [ { "name": "docTimestamp", "type": "uint256", "value": "0" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "sha256", "type": "string" } ], "name": "checkCompleted", "outputs": [ { "name": "status", "type": "bool", "value": true } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "sha256", "type": "string" }, { "name": "signerId", "type": "bytes32" } ], "name": "checkDocSigner", "outputs": [ { "name": "signed", "type": "bool" }, { "name": "timestamp", "type": "uint256" }, { "name": "signature", "type": "string" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "sha256", "type": "string" } ], "name": "countSignatures", "outputs": [ { "name": "count", "type": "uint256", "value": "0" } ], "payable": false, "type": "function" }, { "constant": false, "inputs": [ { "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "payable": false, "type": "function" }, { "payable": false, "type": "fallback" }, { "anonymous": false, "inputs": [ { "indexed": false, "name": "sha256", "type": "string" }, { "indexed": false, "name": "signers", "type": "bytes32[]" }, { "indexed": false, "name": "timestamp", "type": "uint256" } ], "name": "NewDocument", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "name": "sha256", "type": "string" }, { "indexed": false, "name": "index", "type": "uint256" }, { "indexed": false, "name": "signature", "type": "string" }, { "indexed": false, "name": "timestamp", "type": "uint256" } ], "name": "RegisterSignature", "type": "event" } ];
var docSign = web3.eth.contract(docSignAuthAbi).at(docSignAddress)
/* CPF IDs and wallets repository */
var repoAddress = '0x3afcce40a569a15d5ec18df48fc5bc3b7317e615' ///Testnet
var repoAbi = [{"constant":false,"inputs":[{"name":"id","type":"bytes32"},{"name":"wallet","type":"string"}],"name":"newUser","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"userIds","outputs":[{"name":"userId","type":"bytes32"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"id","type":"bytes32"}],"name":"getLastWallet","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"id","type":"bytes32"}],"name":"getWalletsFromUser","outputs":[{"name":"wallets","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"wallet","type":"string"}],"name":"checkUserByWallet","outputs":[{"name":"","type":"bytes32"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"userIdIndex","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalWallets","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalUsers","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"id","type":"bytes32"},{"name":"wallet","type":"string"}],"name":"isWalletFromUser","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"type":"function"},{"inputs":[],"payable":false,"type":"constructor"},{"payable":false,"type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"id","type":"bytes32"}],"name":"User","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"id","type":"bytes32"}],"name":"CheckUserByWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"wallet","type":"string"}],"name":"ShowLastWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"text","type":"string"}],"name":"LogS","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"number","type":"uint256"}],"name":"LogN","type":"event"}];
var idRepo = web3.eth.contract(repoAbi).at(repoAddress)
/* TESTNET ABC - Anti Bureaucracy Coin TESTNET */
var abcAddress = '0xeec0de4a3ebb0233b10f255da9cb8057205744ea';
var abcAbi = [{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"version","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_vanishQty","type":"uint256"}],"name":"vanishToken","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"frozenAccount","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_issueQty","type":"uint256"}],"name":"issueNew","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"},{"name":"_extraData","type":"bytes"}],"name":"approveAndCall","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_target","type":"address"},{"name":"_freeze","type":"bool"}],"name":"freezeAccount","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_initialAmount","type":"uint256"},{"name":"_tokenName","type":"string"},{"name":"_decimalUnits","type":"uint8"},{"name":"_tokenSymbol","type":"string"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":true,"name":"_to","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_spender","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_target","type":"address"},{"indexed":false,"name":"_frozen","type":"bool"}],"name":"FrozenFunds","type":"event"}];
var abc = web3.eth.contract(abcAbi).at(abcAddress)
/*
* Mainnet Ethereum Classic
*/
/* Document Authenticity */
var docAuthAddress = '0x888157b2f8f6263f820cddcca95a4c614a01df03' ///Producao
var docAuthAbi = [{"constant":false,"inputs":[{"name":"sha256","type":"string"}],"name":"storeAuthenticity","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"sha256","type":"string"}],"name":"checkAuthenticity","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"}]
var docAuth = web3.eth.contract(docAuthAbi).at(docAuthAddress)
/* Sign Documents */
var docSignAddress = '0x7901ccebb23e41919f517ce2e3a66144d9a14fc8' // Producao
var docSignAuthAbi = [ { "constant": true, "inputs": [ { "name": "", "type": "address" } ], "name": "registrator", "outputs": [ { "name": "", "type": "bool", "value": false } ], "payable": false, "type": "function" }, { "constant": false, "inputs": [ { "name": "sha256", "type": "string" }, { "name": "index", "type": "uint256" }, { "name": "signature", "type": "string" } ], "name": "registerSignature", "outputs": [ { "name": "timestamp", "type": "uint256" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "sha256", "type": "string" }, { "name": "signerIndex", "type": "uint256" } ], "name": "getSignerBySignerIndex", "outputs": [ { "name": "index", "type": "uint256" }, { "name": "id", "type": "bytes32" }, { "name": "wallet", "type": "bytes32" }, { "name": "signature", "type": "string" }, { "name": "timestamp", "type": "uint256" } ], "payable": false, "type": "function" }, { "constant": false, "inputs": [ { "name": "sha256", "type": "string" }, { "name": "signers", "type": "bytes32[]" }, { "name": "walletAddressesEncoded", "type": "bytes32[]" } ], "name": "newDocument", "outputs": [ { "name": "timestamp", "type": "uint256" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "", "type": "bytes32" }, { "name": "", "type": "uint256" } ], "name": "userDocuments", "outputs": [ { "name": "", "type": "uint256", "value": "0" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "sha256", "type": "string" }, { "name": "signerId", "type": "bytes32" } ], "name": "getSignerBySignerId", "outputs": [ { "name": "index", "type": "uint256", "value": "0" }, { "name": "id", "type": "bytes32", "value": "0x" }, { "name": "wallet", "type": "bytes32", "value": "0x" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [], "name": "owner", "outputs": [ { "name": "", "type": "address", "value": "0xc07b45dbba809ca38e225dcb8f9b6298123ce1b5" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "sha256", "type": "string" }, { "name": "signerWallet", "type": "bytes32" } ], "name": "getSignerIdByWallet", "outputs": [ { "name": "index", "type": "uint256", "value": "0" }, { "name": "id", "type": "bytes32", "value": "0x0000000000000000000000000000000000000000000000000000000000000000" }, { "name": "wallet", "type": "bytes32", "value": "0x0000000000000000000000000000000000000000000000000000000000000000" } ], "payable": false, "type": "function" }, { "constant": false, "inputs": [ { "name": "registratorAddress", "type": "address" }, { "name": "status", "type": "bool" } ], "name": "updateRegistratorStatus", "outputs": [], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "userId", "type": "bytes32" } ], "name": "listDocuments", "outputs": [ { "name": "", "type": "uint256[]", "value": [] } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "sha256", "type": "string" } ], "name": "checkTimestamp", "outputs": [ { "name": "timestamp", "type": "uint256", "value": "0" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "sha256", "type": "string" } ], "name": "countSigners", "outputs": [ { "name": "count", "type": "uint256", "value": "0" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "", "type": "uint256" } ], "name": "documents", "outputs": [ { "name": "docTimestamp", "type": "uint256", "value": "0" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "sha256", "type": "string" } ], "name": "checkCompleted", "outputs": [ { "name": "status", "type": "bool", "value": true } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "sha256", "type": "string" }, { "name": "signerId", "type": "bytes32" } ], "name": "checkDocSigner", "outputs": [ { "name": "signed", "type": "bool" }, { "name": "timestamp", "type": "uint256" }, { "name": "signature", "type": "string" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "sha256", "type": "string" } ], "name": "countSignatures", "outputs": [ { "name": "count", "type": "uint256", "value": "0" } ], "payable": false, "type": "function" }, { "constant": false, "inputs": [ { "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "payable": false, "type": "function" }, { "payable": false, "type": "fallback" }, { "anonymous": false, "inputs": [ { "indexed": false, "name": "sha256", "type": "string" }, { "indexed": false, "name": "signers", "type": "bytes32[]" }, { "indexed": false, "name": "timestamp", "type": "uint256" } ], "name": "NewDocument", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "name": "sha256", "type": "string" }, { "indexed": false, "name": "index", "type": "uint256" }, { "indexed": false, "name": "signature", "type": "string" }, { "indexed": false, "name": "timestamp", "type": "uint256" } ], "name": "RegisterSignature", "type": "event" } ];
var docSign = web3.eth.contract(docSignAuthAbi).at(docSignAddress)
/* CPF IDs and wallets repository */
var repoAddress = '0xb0964e6d643cc9edaf11bb04d8e438284bf1b311' // Producao
var repoAbi = [{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"userIds","outputs":[{"name":"userId","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"id","type":"uint256"}],"name":"getLastWallet","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"wallet","type":"string"}],"name":"checkUserByWallet","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"id","type":"uint256"}],"name":"getWalletsFromUser","outputs":[{"name":"wallets","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"id","type":"uint256"},{"name":"wallet","type":"string"}],"name":"newUser","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalWallets","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"userIdIndex","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalUsers","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"id","type":"uint256"},{"name":"wallet","type":"string"}],"name":"isWalletFromUser","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"type":"function"},{"inputs":[],"payable":false,"type":"constructor"},{"payable":false,"type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"id","type":"uint256"}],"name":"User","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"id","type":"uint256"}],"name":"CheckUserByWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"wallet","type":"string"}],"name":"ShowLastWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"text","type":"string"}],"name":"LogS","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"number","type":"uint256"}],"name":"LogN","type":"event"}]
var idRepo = web3.eth.contract(repoAbi).at(repoAddress)
/*
* Mainnet Ethereum
*/
/* Document Authenticity */
var docAuthAddress = '0x0b5DcD8cf2E32C2CEbEAd397eA857D2E8547f297' ///Producao
var docAuthAbi = [{"constant":false,"inputs":[{"name":"sha256","type":"string"}],"name":"storeAuthenticity","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"sha256","type":"string"}],"name":"checkAuthenticity","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"}]
var docAuth = web3.eth.contract(docAuthAbi).at(docAuthAddress)
/* Sign Documents */
var docSignAddress = '0x3766122C5c03e776976b6c2a9fb7F5DD5aBd09eB' // Producao
var docSignAuthAbi = [ { "constant": true, "inputs": [ { "name": "", "type": "address" } ], "name": "registrator", "outputs": [ { "name": "", "type": "bool", "value": false } ], "payable": false, "type": "function" }, { "constant": false, "inputs": [ { "name": "sha256", "type": "string" }, { "name": "index", "type": "uint256" }, { "name": "signature", "type": "string" } ], "name": "registerSignature", "outputs": [ { "name": "timestamp", "type": "uint256" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "sha256", "type": "string" }, { "name": "signerIndex", "type": "uint256" } ], "name": "getSignerBySignerIndex", "outputs": [ { "name": "index", "type": "uint256" }, { "name": "id", "type": "bytes32" }, { "name": "wallet", "type": "bytes32" }, { "name": "signature", "type": "string" }, { "name": "timestamp", "type": "uint256" } ], "payable": false, "type": "function" }, { "constant": false, "inputs": [ { "name": "sha256", "type": "string" }, { "name": "signers", "type": "bytes32[]" }, { "name": "walletAddressesEncoded", "type": "bytes32[]" } ], "name": "newDocument", "outputs": [ { "name": "timestamp", "type": "uint256" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "", "type": "bytes32" }, { "name": "", "type": "uint256" } ], "name": "userDocuments", "outputs": [ { "name": "", "type": "uint256", "value": "0" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "sha256", "type": "string" }, { "name": "signerId", "type": "bytes32" } ], "name": "getSignerBySignerId", "outputs": [ { "name": "index", "type": "uint256", "value": "0" }, { "name": "id", "type": "bytes32", "value": "0x" }, { "name": "wallet", "type": "bytes32", "value": "0x" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [], "name": "owner", "outputs": [ { "name": "", "type": "address", "value": "0xc07b45dbba809ca38e225dcb8f9b6298123ce1b5" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "sha256", "type": "string" }, { "name": "signerWallet", "type": "bytes32" } ], "name": "getSignerIdByWallet", "outputs": [ { "name": "index", "type": "uint256", "value": "0" }, { "name": "id", "type": "bytes32", "value": "0x0000000000000000000000000000000000000000000000000000000000000000" }, { "name": "wallet", "type": "bytes32", "value": "0x0000000000000000000000000000000000000000000000000000000000000000" } ], "payable": false, "type": "function" }, { "constant": false, "inputs": [ { "name": "registratorAddress", "type": "address" }, { "name": "status", "type": "bool" } ], "name": "updateRegistratorStatus", "outputs": [], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "userId", "type": "bytes32" } ], "name": "listDocuments", "outputs": [ { "name": "", "type": "uint256[]", "value": [] } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "sha256", "type": "string" } ], "name": "checkTimestamp", "outputs": [ { "name": "timestamp", "type": "uint256", "value": "0" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "sha256", "type": "string" } ], "name": "countSigners", "outputs": [ { "name": "count", "type": "uint256", "value": "0" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "", "type": "uint256" } ], "name": "documents", "outputs": [ { "name": "docTimestamp", "type": "uint256", "value": "0" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "sha256", "type": "string" } ], "name": "checkCompleted", "outputs": [ { "name": "status", "type": "bool", "value": true } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "sha256", "type": "string" }, { "name": "signerId", "type": "bytes32" } ], "name": "checkDocSigner", "outputs": [ { "name": "signed", "type": "bool" }, { "name": "timestamp", "type": "uint256" }, { "name": "signature", "type": "string" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "sha256", "type": "string" } ], "name": "countSignatures", "outputs": [ { "name": "count", "type": "uint256", "value": "0" } ], "payable": false, "type": "function" }, { "constant": false, "inputs": [ { "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "payable": false, "type": "function" }, { "payable": false, "type": "fallback" }, { "anonymous": false, "inputs": [ { "indexed": false, "name": "sha256", "type": "string" }, { "indexed": false, "name": "signers", "type": "bytes32[]" }, { "indexed": false, "name": "timestamp", "type": "uint256" } ], "name": "NewDocument", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "name": "sha256", "type": "string" }, { "indexed": false, "name": "index", "type": "uint256" }, { "indexed": false, "name": "signature", "type": "string" }, { "indexed": false, "name": "timestamp", "type": "uint256" } ], "name": "RegisterSignature", "type": "event" } ];
var docSign = web3.eth.contract(docSignAuthAbi).at(docSignAddress)
/* CPF IDs and wallets repository */
var repoAddress = '0x7b65b5b95391d6b3d77031a889279376e27572d5' // Producao
var repoAbi = [{ "constant": true, "inputs": [{ "name": "", "type": "uint256" }], "name": "userIds", "outputs": [{ "name": "userId", "type": "uint256" }], "payable": false, "type": "function" }, { "constant": false, "inputs": [{ "name": "id", "type": "uint256" }], "name": "getLastWallet", "outputs": [{ "name": "", "type": "string" }], "payable": false, "type": "function" }, { "constant": true, "inputs": [{ "name": "", "type": "uint256" }, { "name": "", "type": "uint256" }], "name": "walletsFromUser", "outputs": [{ "name": "", "type": "string" }], "payable": false, "type": "function" }, { "constant": false, "inputs": [{ "name": "wallet", "type": "string" }], "name": "checkUserByWallet", "outputs": [{ "name": "", "type": "uint256" }], "payable": false, "type": "function" }, { "constant": false, "inputs": [{ "name": "id", "type": "uint256" }], "name": "getWalletsFromUser", "outputs": [{ "name": "wallets", "type": "string" }], "payable": false, "type": "function" }, { "constant": false, "inputs": [{ "name": "id", "type": "uint256" }, { "name": "wallet", "type": "string" }], "name": "newUser", "outputs": [{ "name": "", "type": "bool" }], "payable": false, "type": "function" }, { "constant": true, "inputs": [], "name": "owner", "outputs": [{ "name": "", "type": "address" }], "payable": false, "type": "function" }, { "constant": true, "inputs": [], "name": "totalWallets", "outputs": [{ "name": "", "type": "uint256" }], "payable": false, "type": "function" }, { "constant": true, "inputs": [{ "name": "", "type": "uint256" }], "name": "userIdIndex", "outputs": [{ "name": "", "type": "uint256" }], "payable": false, "type": "function" }, { "constant": true, "inputs": [], "name": "totalUsers", "outputs": [{ "name": "", "type": "uint256" }], "payable": false, "type": "function" }, { "constant": false, "inputs": [], "name": "owned", "outputs": [], "payable": false, "type": "function" }, { "constant": false, "inputs": [{ "name": "id", "type": "uint256" }, { "name": "wallet", "type": "string" }], "name": "isWalletFromUser", "outputs": [{ "name": "", "type": "bool" }], "payable": false, "type": "function" }, { "constant": false, "inputs": [{ "name": "newOwner", "type": "address" }], "name": "transferOwnership", "outputs": [], "payable": false, "type": "function" }, { "inputs": [], "payable": false, "type": "constructor" }, { "payable": false, "type": "fallback" }, { "anonymous": false, "inputs": [{ "indexed": false, "name": "id", "type": "uint256" }], "name": "User", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "name": "id", "type": "uint256" }], "name": "CheckUserByWallet", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "name": "wallet", "type": "string" }], "name": "ShowLastWallet", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "name": "text", "type": "string" }], "name": "LogS", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "name": "number", "type": "uint256" }], "name": "LogN", "type": "event" }]
var idRepo = web3.eth.contract(repoAbi).at(repoAddress)
/* ABC - Anti Bureaucracy Coin */
var abcAddress = '0xAfd75caff5c1d402cbF3692e289775438dF6a9F0';
var abcAbi = [{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"version","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_vanishQty","type":"uint256"}],"name":"vanishToken","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"frozenAccount","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_issueQty","type":"uint256"}],"name":"issueNew","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"},{"name":"_extraData","type":"bytes"}],"name":"approveAndCall","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_target","type":"address"},{"name":"_freeze","type":"bool"}],"name":"freezeAccount","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_initialAmount","type":"uint256"},{"name":"_tokenName","type":"string"},{"name":"_decimalUnits","type":"uint8"},{"name":"_tokenSymbol","type":"string"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":true,"name":"_to","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_spender","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_target","type":"address"},{"indexed":false,"name":"_frozen","type":"bool"}],"name":"FrozenFunds","type":"event"}];
var abc = web3.eth.contract(abcAbi).at(abcAddress)