eth95 icon indicating copy to clipboard operation
eth95 copied to clipboard

Save added ABIs into LocalStorage

Open stwiname opened this issue 4 years ago • 7 comments

Storing ABIs in local storage rather than the file system via the server would allow the website to be statically hosted

stwiname avatar May 29 '20 09:05 stwiname

This is a pretty often requested feature! Let me plan out how to implement this. Thanks for making this issue!

adrianmcli avatar May 29 '20 14:05 adrianmcli

Server is no longer required!

You can now use Eth95 via any browser: https://eth95.dev/

But I still want to implement localstorage to save ABIs. So I'll leave this issue open and just change the title.

adrianmcli avatar May 30 '20 04:05 adrianmcli

Any updates for this issue?

glazec avatar Dec 21 '21 09:12 glazec

PRs are welcomed!

adrianmcli avatar Dec 21 '21 13:12 adrianmcli

Ok, I will have a try. I am reading the code and locating where should I make changes. I have some experience with React, but not with Express Server. I will first try to implement the localStorage feature. Then I will think about how to store contracts to the server, then read from it.

glazec avatar Dec 21 '21 15:12 glazec

@adrianmcli I am not familiar with your code. I may need some help from you.

The program will save contracts into local storage when addContract() is triggered.

I am thinking about reading the local storage when the compound is mounted. The program reads from the local storage and overwrites the contracts. With the correct contracts, the UI should be updated with saved contracts.

I have two questions here.

  1. How contracts updates the UI.
  2. How can we update contracts? CleanShot 2021-12-30 at 14 58 39@2x

glazec avatar Dec 30 '21 06:12 glazec

I opened pr #38. Please review it. Feel free to comment on it. @adrianmcli

glazec avatar Dec 30 '21 08:12 glazec

Fixed by #38

adrianmcli avatar Aug 08 '23 18:08 adrianmcli