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

Attestation improvements #2559

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Attestation improvements #2559

wants to merge 1 commit into from

Conversation

onnovisser
Copy link
Collaborator

@onnovisser onnovisser commented Dec 17, 2024

Description

#2557

  • Include onchainReserve in the assets-section - TAKE from runtimeApi Nav.reserve
  • Include ALL assets in the assets-section - currently, cash items are missing
  • Include total accrued-unpaid fees as 1 asset item - price = -1 with right decimals, TAKE from runtimeApi Nav.navFees
  • Adjust quantity field to pool decimals - currently, it is 18 decimals
  • Change asset structure
    • assetassetId - 0 for onchainReserve
    • New assetname retrieved for the asset from ipfs data, onchainReserve for onchainReserve
  • Remove netFeeValue
  • Add "tokenAddresses" → list addresses of tranche tokens on the relevant networks, identified by chainId - see json for details
  • Add timestamp when this was signed to portfolio - unix timestamp in seconds
  • Adapt signature to be a struct containing signature and publicKey of signer
  • Ensure netAssetValue is correct - TAKE from runtimeApi Nav.total

Approvals

  • Dev

Screenshots

Impact

Copy link

PR deployed in Google Cloud
URL: https://app-pr2559.k-f.dev
Commit #: bc8dd91
To access the functions directly check the corresponding deploy Action

Copy link

PR deployed in Google Cloud
URL: https://pr2559-app-ff-production.k-f.dev
Commit #: bc8dd91
To access the functions directly check the corresponding deploy Action


let signature: { hash: string; publicKey: string } | null = null
try {
const message = JSON.stringify(attestation)
Copy link
Contributor

@hieronx hieronx Dec 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is now signing { portfolio: { ... } }. It would be cleaner if it's just signing the inner part, so just { ... }, and then it's combined into a new object that is

{
  "portfolio": { ... },
  "signature": { ... }
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can make this change in the next few days though, don't worry about it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants