Conversation
ilgooz
left a comment
There was a problem hiding this comment.
I run some manual tests and seems ok, let's merge 👍
| description: "" | ||
| inputs: | ||
| sid: *sid | ||
| price: |
There was a problem hiding this comment.
any reason why price is in string ? what's the format ? why not number ?
Same for duration
It makes more sense to have number here, the contract definition accepts number and string and I think we will not use bignumber for duration or price.
Also could be good to add some details on the duration is it seconds / hours / months... maybe having duration + unit.
There was a problem hiding this comment.
Every number that can be big or too many decimal are as String in the JSON and as BigNumber in the service.
I can add more comment and description for sure ;)
antho1404
left a comment
There was a problem hiding this comment.
Great work everything is working great.
Some stuff that could be improved:
- Documentation
- Error handling on the transactions for now it's a bit ugly
› Error: Error: Transaction has been reverted by the EVM:
› {
› "blockHash": "0xdf6eee18dc677118d4923101c008b39c9430da5345fc268cb904c18732e11498",
› "blockNumber": 5232953,
› "contractAddress": null,
› "cumulativeGasUsed": 1105990,
› "from": "0xf46109df80c953dc747c44b0c18482e252ee59c9",
› "gasUsed": 25806,
› "logs": [],
› "logsBloom":
› "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
› 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
› 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
› 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
› 0000000000000000000000000000000000000000000000000000000000000000000000000000000",
› "status": false,
› "to": "0x94f4cb92fe9f547574aec617b1594b13abd47ad3",
› "transactionHash": "0xd841b618d4140cc5ab4aec1259d933e484f8b70dc87601a75c7b4ce1535db710",
› "transactionIndex": 16
› }
If you get error like
error while downloading manifest ipfs :: QmUoE4fsthoirJRWtqosNMQF79DYBWbgtGw37Sgg2eMdre RequestError: Error: ESOCKETTIMEDOUTit's because ipfs gateway remove the file from its cache. We need to host an IPFS node to guarantee availability. The first version's manifest file is not on ipfs anymore, but I upload the second recently, so it should work.Start service
List service
Get service
Publish service version
Send sign transaction
Create service offer
Purchase
Is Authorized
with hash
with sid
Note:
To send the transaction returned by some commands, execute:
With
sign.jsonfile like (you need to replace the data):{ "address": "0xcAB79fA69c68CB4C65fa5C6E05BC4dBa5FB57D11", "passphrase": "1", "transaction": { "chainID": 3, "data": "0x095ea7b300000000000000000000000094f4cb92fe9f547574aec617b1594b13abd47ad300000000000000000000000000000000000000000000003635c9adc5dea00000", "gas": 1000000, "gasPrice": "1000000000", "nonce": 21, "to": "0x5861B3DC52339d4f976B7fa5d80dB6cd6f477F1B", "value": "0" } }Then, publish transaction, copy past after
signedTransaction=the tx outputted: