Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
AnyHedge Library
AnyHedge Library
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 24
    • Issues 24
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 2
    • Merge Requests 2
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Metrics
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • GeneralProtocols
  • AnyHedge
  • AnyHedge LibraryAnyHedge Library
  • Issues
  • #182

Closed
Open
Opened Nov 26, 2020 by Rosco Kalis@rkalisMaintainer

Extract contract information from settlement transactions

The settlement transaction includes the redeem script + unlocking script + outputs. This information can be used to recover a lot of information about the contract.

Combining all this information it should be possible to reconstruct a full ContractData object. Perhaps a few things will be difficult to figure out, like start price and liquidation multipliers. For some other information might need to look up additional transactions (like the funding transaction to figure out the fee information).

We should implement a utility function that takes in a raw transaction hex, decodes it and reconstructs a full ContractData object for it.

As a start we will only implement simpler version of this utility function that only extracts the price oracle message.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
v0.13
Milestone
v0.13
Assign milestone
Time tracking
None
Due date
None
Reference: GeneralProtocols/anyhedge/library#182