Skip to content

Web App Contracts methods validation and missing info #106

@flaviocastro

Description

@flaviocastro

Summary

@naps62 Please take a look at the invoked methods bellow to check that all info is as expected by the app design.
We are missing a few config variable in order to have a stable version, check the "Missing Configs" section bellow.

Data Methods Validation

Project Info Card

  • Contributions - sale1.investorCount().toString()
  • Raised - formatUnits(sale1.tokenToPaymentToken(sale1.allocated()).toString())
  • Price - sale1.rate().toString()
  • My contribution - formatUnits(sale1.paymentTokenToToken(uncappedAllocation(address)).toString())

Sale Form - Buy Flow

  • Check Allowance - aUsd.allowance(address, sale1.address)
  • Request Allowance - await (await contracts.aUsd.connect(signer).approve(sale1.address, amount)).wait() // This is optional, if no allowance left, we ask for more.
  • Buy - sale1.connect(signer).buy(sale1.paymentTokenToToken(amount))
  • Converted aUSD to CTND - amount.times(sale1.rate().toString()).decimalPlaces(4).toString() // This is done on the client side so it can be sync.

Vesting Cards

  • My Tokens - citizend.balanceOf(address).toString()
  • Total Claimed - vesting.claimed(address).toString()
  • Next Release - Anything to do with publicSaleVestingMonths(3) vs publicSaleCliffMonths(0). How can we calculate a date?
  • Available to Claim - vesting.claimablePublic(account).toString()
  • Refund - vesting.claimablePrivate(account).toString()

Missing Configs

Missing App Links URL's

  • TERMS_URL - Terms of Service URL.
  • PRIVACY_POLICY_URL Privacy Policy URL.
  • CAP_CALCULATION_INFO_URL - Sale form Cap Info URL
  • CONTRIBUTE_AGAIN_INFO_URL - Sale modal Cap Info URL
  • FRACTAL_KYC_URL - Fractal profile/KYC URL

Chain ID's Configs:

  • Production Chain ID: [686]
  • Staging Chain ID: [595]
  • Development Chain ID: [595, 31337]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions