Skip to content

V2 Optimizations #1

@sudo-owen

Description

@sudo-owen
  1. Use CloneFactory to deploy XTokens. Check for whitelisted deployed addresses in XStore to prevent issues.
    DONE, pending merge approval.
  2. Merge setters into XStore so that one setter can take in a code and modify the appropriate param. Ditto for the NFTX controller.
  3. Might be easiest to just make vaults public and remove all of the extra get functions. No need for getVault then either.
  4. Remove xTokenAddress and nftAddress in the Vault struct because you can get them by looking at IXToken and IERC721 and using address(IXToken) etc.
  5. Better packing of variables in Vault struct to allow for dense representation. (Compiler optimization likely already does this).
  6. No need for initOwnable to be called in most cases. (Contracts inheriting from Ownable auto-set msg.sender to be owner.)
  7. RandNonce in XStore seems to do nothing? (And also isn't random?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions