This is our entry into the dApp contest. Information on our project in terms of the contest's four evaluation topics follows.
This project contains three main parts, each in separate directories in the repository.
The smart contract was painstakingly crafted.
Originally it followed the two step withdrawal method. This method was deemed to be less than secure as the verification could pass allowing the assets to leave and the invocation could fail, meaning the user's balance would stay the same.
The contract was completely rewritten to give the escrow account ownership to the specified incoming txId when the sender deposits. The beauty of this approach is that the NEO nodes handle security 100%. The escrow account can withdraw specifying the original vin txid. Once this is used it can never be used again, by definition. Change is not allowed to go back to the contract, ensuring that all assets are withdrawn.
The autorescind code is an optional addon to the contract. It runs on cron and sends out any deposits that have sat in the contract for at least 7 days. The contract allows any address to make these withdrawals but the destination address must be the original sender's address. We think this is a nice technical feature to showcase because generally with blockchain a user must initiate any action. We, of course, take advantage of NEO's zero fee (under 10 GAS) for invocations. If this changes this feature could break. However, we have a manual rescind button in the dApp website as well.
The dApp website features a variety of interesting ways to use neon-js to interact with storage, transactions and the contract itself. Additionally it integrates with the new, in-development React version of NeoLink.
The idea of this dApp is to bring more people into the NEO community and get them to feel comfortable with crypto in general. Also, at the bottom of this document is a list of community contributions.
There's this, the readme, the dApp website itself and the comments in the contract and the React code. We've made an effort to write automated tests which is, of course, a form of documentation.
Effort has been made to interact in the community, both in the Discord channel as well as the open source contributions below.
The following work was done for or inspired by this project:
- Move to react, first round
- Send invoke implementation
- Allow for send invoke calls from websites the user visits
- Put login screen in front of auth-required panes
- Implement testing with jest/enzyme and move from Preact to React
- Private network support
- Prepush runs lint + tests
- Properly validate send form
- Into ixje's branch: Syncing code updates to work without lastTrustedBlock preset