Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read lock addresses from address files #11

Open
4 tasks
mkermani144 opened this issue Jul 22, 2024 · 0 comments
Open
4 tasks

Read lock addresses from address files #11

mkermani144 opened this issue Jul 22, 2024 · 0 comments
Labels
500 RSN Bounty contribution friendly Contributions outside Rosen Team are welcomed

Comments

@mkermani144
Copy link
Member

Description

Currently there is an environmental variable for the lock address of each chain supported by Rosen. There is no need for these env vars, because the addresses files from contract repo releases contain not only the lock address, but all other addresses that may be needed in the future.

All of the lock address env vars (which are in the form ofNEXT_PUBLIC_*_LOCK_ADDRESS) should be removed. A new NextJS server action should be introduced (e.g. getNetworkLockAddress), which accepts a network name and returns the lock address for that network (by reading address file contents, etc.). This action can be used in useTransaction hook. Note that there won't be any need for the useLockAddress hook anymore, and it should be removed.

Acceptance conditions

  • All usages of lock address env vars should be updated based on the provided details (note that intermediary codes probably should be removed, too, such as the lockAddress field in Network objects)
  • A server action should be added based on the provided details
  • useLockAddress hook should be removed
  • .env.example should be updated
@mkermani144 mkermani144 added contribution friendly Contributions outside Rosen Team are welcomed 500 RSN Bounty labels Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
500 RSN Bounty contribution friendly Contributions outside Rosen Team are welcomed
Projects
None yet
Development

No branches or pull requests

1 participant