--- tags: Smart Invoice --- # Smart Invoice Testing Notes ### Reference - Smart Invoice contract factory (xDAI): [0x61cEBDf43a96581E6E144395fBA18f9D1a43e558](https://blockscout.com/poa/xdai/address/0x61cEBDf43a96581E6E144395fBA18f9D1a43e558/contracts) - Smart Invoice dapp: https://smart-invoice-factory.web.app/ ## Spencer's testing notes - [x] Try to find a way to auto-detect web URLs vs. ipfs URIs so that we don't have to require users to include the http part of a web URL - [x] Date pickers end up with the day before what the user selects (maybe this is this a UTC conversion thing?). For example, if I click on 2/19, the field displays 2/18. - [x] Change the `XWETH` label to `WETH` - Succesfully [created a new invoice](https://blockscout.com/poa/xdai/tx/0x1ff75b1c4f38b0e6c4c3c82f33cf8b8db5c1a07ecab92d9371cc942eaa377cba/internal-transactions) at contract `0x01F743fC883C5CD68d69dfe75D46b5A9A1792b97` - [x] View existing invoices isn't working for me. None of the values I've entered returned any results. Here are the values I tried: - the client address - `0x15c6ac4cf1b5e49c44332fb0a1043ccab19db80a` - the resolver address - `0xa7a5a2745f10d5c23d75a6fd228a408cede1cae5` - the service provider address - `0x624123ec4a9f48be7aa8a307a74381e4ea7530d4` - the invoice contract address - `0x01F743fC883C5CD68d69dfe75D46b5A9A1792b97` - the project name (or parts of it) - `Spencer's test invoice #1` - [x] I also am not able to see the invoice I created by going to the direct url https://smart-invoice-factory.web.app/invoice/0x01F743fC883C5CD68d69dfe75D46b5A9A1792b97 - [x] Is it possible to have the individual invoice contracts auto-verified on blockscout? - All individual contracts henceforth will be verified automatically. - This requires any one contract with the same ABI to be verified. - https://blockscout.com/poa/xdai/address/0x01F743fC883C5CD68d69dfe75D46b5A9A1792b97/read- - [x] When resolving a dispute where all the funds (apart from the resolver fee) go to the winning party, the contract still initiates a transfer of 0 tokens to the losing party. With gas fees so cheap this is not a practical issue, but it may be cleaner to send only non-zero amounts. @dan13ram what do you think? ## Future feature ideas > out of scope for the current project, but potentially interesting future improvements - In the Pay Invoice modal, selecting a payment milestone fills the amount field with the remaining amount necessary to fulfill that payment. For example, consider an invoice of 9 total xdai with 3 equal payments... - When there have been no deposits yet, checking the box for the second payment will enter `6` into the amount field. - When the first payment has been fully deposited, checking the box for the second payment will enter `3` into the amount field - If there has been a partial deposit (e.g. `2`), then checking the box for the second payment will enter `5` into the amount field - Allow client to make a deposit after the full amount has been deposited. Currently, once the full amount has been deposited, the Deposit button becomes inactive. We should enable it so that clients can send tips or handle additional scope. - this is only on the assumption that it won't mess up the contract logic - Allow invoice creator to set the dispute fee rate for custom resolvers.