Skip to content

Constant RWA_CONTRACT on sellTslaAndSendUsdc.js is not known before deploying #12

@sheinix

Description

@sheinix

Hi @PatrickAlphaC great tutorial as always!

One thing I noticed and can't get my head around is that to deploy dTSLA we need to provide the js code in the constructor, but the redeem js code contains the contract address that we get after deploying.

Seems like a 🐔 and 🥚 problem.

Would any of these two options fix the issue? 🤔

  1. Either set an update function to set the updated reedem code js code after deploy, or pass it as a variable on the sendRedeemRequest function.
  2. Deploy with create2 so we can know which address is going to be deployed beforehand so it can containt the correct RWA contract address?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions