Skip to content

Read lock addresses from address files #11

@mkermani144

Description

@mkermani144

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions