-
Notifications
You must be signed in to change notification settings - Fork 8
Service Provider examples
Daniel Luque Quintana edited this page May 23, 2020
·
1 revision
Output
------ Example of adding the entity1 like a Entity ------
The transaction bytes data is: 0xf90288820a8a80830927c094bd4a2c84edb97be5beff7cd341bd63567e73f8c980b90224c4c0233300000000000000000000000020668a6a410edb611a0d394866462508e5d5e60a00000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000008456e746964616432000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a412d39353937343738360000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000157777772e656e7469646164322e636f6d2f6c6f676f000000000000000000000000000000000000000000000000000000000000000000000000000000000000147777772e656e7469646164322e636f6d2f41494400000000000000000000000000000000000000000000000000000000000000000000000000000000000000147777772e656e7469646164322e636f6d2f414f410000000000000000000000001ca0c3af3116146020f36559101d0e3fa71729bd4f3980594e211d2599d84dddd7dba01b2eaf467289b93eeac150375d73a7d2c90a86b91530850d94a00ffad7a3dd3e
HASH: 0x06f9c162ef58dbf0d6f3235e83a441c6a4df96d13ec610ff4a35a1c7eda1ce38
Account unlocked: true
RECEIPT: { blockHash:
'0xbf40e92accda1ad7f4ff0350b83601f1b27e6d589e47a665d872260aaafb42ed',
blockNumber: 40134622,
contractAddress: null,
cumulativeGasUsed: 182579,
from: '0xa9728125c573924b2b1ad6a8a8cd9bf6858ced49',
gasUsed: 182579,
logs: [],
logsBloom:
'0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
status: true,
to: '0xbd4a2c84edb97be5beff7cd341bd63567e73f8c9',
transactionHash:
'0x06f9c162ef58dbf0d6f3235e83a441c6a4df96d13ec610ff4a35a1c7eda1ce38',
transactionIndex: 0 }
Output
------ Example of adding the entity2 like a Service Provider ------
The transaction bytes data is: 0xf886820a8980830927c094bd4a2c84edb97be5beff7cd341bd63567e73f8c980a40ebbbffc00000000000000000000000020668a6a410edb611a0d394866462508e5d5e60a1ca0242cfe943c5dcd202e9d53cff44914918ff496719e56872641de3bbcd4f0de80a0654959fec99c5fe36926ba1743345dbcac7c899a5cf994331a64c6d586dec887
HASH: 0xa18dbc66bad0d3c13c8927308ddcfc9b1887c6114dacf099dbc205cd6a81959f
Account unlocked: true
RECEIPT: { blockHash:
'0x70c7e9d93f213abc2569213c5130c404c7e2072bdd112954239233908279119d',
blockNumber: 40134610,
contractAddress: null,
cumulativeGasUsed: 44178,
from: '0xa9728125c573924b2b1ad6a8a8cd9bf6858ced49',
gasUsed: 44178,
logs: [],
logsBloom:
'0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
status: true,
to: '0xbd4a2c84edb97be5beff7cd341bd63567e73f8c9',
transactionHash:
'0xa18dbc66bad0d3c13c8927308ddcfc9b1887c6114dacf099dbc205cd6a81959f',
transactionIndex: 0 }
Output
------ Example of deleting the entity2 like Service Provider ------
transaction { to: '0xbd4a2c84edb97be5beff7cd341bd63567e73f8c9',
data:
'0x3bf4721500000000000000000000000020668a6a410edb611a0d394866462508e5d5e60a',
gasLimit: 600000,
gasPrice: 0,
nonce: '0x0' }
The transaction bytes data is: 0xf886820a8880830927c094bd4a2c84edb97be5beff7cd341bd63567e73f8c980a43bf4721500000000000000000000000020668a6a410edb611a0d394866462508e5d5e60a1ca09482aaf146034d156e104d1866133fbe677554abaf446afc2a98174f053aa20da00b8500cc7b0fdd483d3e923267b3530dddd2b6a36135077f2329af0e23f583d7
HASH: 0x50ba56162e876507553b295c75268ceb54bbb4093944e52acad3f7e913389f1e
Account unlocked: true
Error: Transaction has been reverted by the EVM:
{
"blockHash": "0xb339bfd7699439d81ab89bb853c002c6ae9f630fecfdb7bb8918545c325473d9",
"blockNumber": 40134594,
"contractAddress": null,
"cumulativeGasUsed": 23532,
"from": "0xa9728125c573924b2b1ad6a8a8cd9bf6858ced49",
"gasUsed": 23532,
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": false,
"to": "0xbd4a2c84edb97be5beff7cd341bd63567e73f8c9",
"transactionHash": "0x50ba56162e876507553b295c75268ceb54bbb4093944e52acad3f7e913389f1e",
"transactionIndex": 0
}
at /Users/danielluquequintana/Github/alastria-identity-example/node_modules/web3-core-method/src/index.js:364:46
at process._tickCallback (internal/process/next_tick.js:68:7)
Output
------ Example of deleting the entity2 like Service Provider ------
transaction { to: '0xbd4a2c84edb97be5beff7cd341bd63567e73f8c9',
data:
'0x3bf4721500000000000000000000000020668a6a410edb611a0d394866462508e5d5e60a',
gasLimit: 600000,
gasPrice: 0,
nonce: '0x0' }
The transaction bytes data is: 0xf886820a8d80830927c094bd4a2c84edb97be5beff7cd341bd63567e73f8c980a43bf4721500000000000000000000000020668a6a410edb611a0d394866462508e5d5e60a1ca072a0cf4ade85b6708a1e35c5bc63dfbf695962d5283ea45b13760e57d8465885a042605cb5252e37b15374a786ab510c46a0d7c362a1f3af55e382c07d9a93e22e
HASH: 0x5ee45c7bcd6ec9cda4a1801336a567ae8e46a9fa23df3c7a94d8380b8851cd6a
Account unlocked: true
RECEIPT: { blockHash:
'0x8961733d3f7936125dd07f720e4a2408c3cd3abc83360931eac6a2dbe7661462',
blockNumber: 40134642,
contractAddress: null,
cumulativeGasUsed: 14654,
from: '0xa9728125c573924b2b1ad6a8a8cd9bf6858ced49',
gasUsed: 14654,
logs: [],
logsBloom:
'0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
status: true,
to: '0xbd4a2c84edb97be5beff7cd341bd63567e73f8c9',
transactionHash:
'0x5ee45c7bcd6ec9cda4a1801336a567ae8e46a9fa23df3c7a94d8380b8851cd6a',
transactionIndex: 0 }
Output
------ Example of asking for isIdentityServiceProvider ------
isServiceProviderTransaction { to: '0xbd4a2c84edb97be5beff7cd341bd63567e73f8c9',
data:
'0xd024d9a400000000000000000000000020668a6a410edb611a0d394866462508e5d5e60a',
gasLimit: 600000,
gasPrice: 0,
nonce: '0x0' }
isServiceProvider? -----> false
Account unlocked: true
Output
------ Example of asking for isIdentityServiceProvider ------
isServiceProviderTransaction { to: '0xbd4a2c84edb97be5beff7cd341bd63567e73f8c9',
data:
'0xd024d9a400000000000000000000000020668a6a410edb611a0d394866462508e5d5e60a',
gasLimit: 600000,
gasPrice: 0,
nonce: '0x0' }
isServiceProvider? -----> true
Account unlocked: true