cryptonative-ch / aqua-js

AquaJS gives you access to the Mesa ecosystem in a single package
GNU Affero General Public License v3.0
2 stars 1 forks source link

completed refund script #23

Closed rossneilson closed 3 years ago

rossneilson commented 3 years ago

22

Added script to refund purchasers for test sale Refer to md file for explanation and instructions

adamazad commented 3 years ago

Closing for now

rossneilson commented 3 years ago

I believe we should close this PR:

  1. Refunds can on FixedPriceSale can be done via calling releaseTokens. It's a public function with zero modifiers.
  2. Invested token are owned by the FixedPriceSale until either released (refunded) or the sale reaches the minimum threshold and can be obtained by the IDO project.

The reason this script was requested by @martinkrung was to have an easy option to refund all testers of a private sale. If we are asking for feedback we shouldn't be inconveniencing testers by making them get their own tokens back. This isn't meant to be some long standing piece of code that our system relies on, just a simple script to quickly refund testers while we gather feedback for the UI. Regardless, you shouldn't really close a request without proper discussion first.

adamazad commented 3 years ago

Ok, I understand now! The correct approach is to fetch all sales from the factory or the subgraph. Then connect to them and call releaseTokens.

The logic is flawed and won't work.

rossneilson commented 3 years ago

Ok, I understand now! The correct approach is to fetch all sales from the factory or the subgraph. Then connect to them and call releaseTokens.

The logic is flawed and won't work.

Ah, that's a good approach. I had forgotten about the subgraph! Thanks for the advice, I'll fix this.

rossneilson commented 3 years ago

I discussed further with Adam and we came to the conclusion that the best solution to refund users is not currently possible without adding extra functionality to the smart contracts. This should be done in future but for now, it has been made clear exactly what this script does and what its limitations are (only working on successful and closed sale).

rossneilson commented 3 years ago

Thank you for the suggestions, changes pushed