-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: 🎸 Revamp settlements related entities #245
base: alpha
Are you sure you want to change the base?
Conversation
cdd60ea
to
5169556
Compare
236e22f
to
b6bc40e
Compare
BREAKING CHANGE: 🧨 Since some of the settlements related entities have been removed and new ones have been added, this will require a full resync. Following are the breaking changes: - Entities `Settlement`, `MediatorAffirmation`, `IdentityInstructions` have been removed - Changes in `Venue` entity 1. New attribute `signers` has been added to track all the allowed signers associated with them 2. New derived field `instructions: [Instruction]!` has been added to track instruction info associated a Venue - Adds new enum `InstructionTypeEnum` to track instruction type - Changes in `Instruction` entity 1. `eventId`, `eventIdx` have been removed 2. `settlementType: String!` has been modified to `type: InstructionTypeEnum!` 3. `endAfterBlock: Int` has been added to track block after which `SettleManual` type instructions can be executed 4. `mediators: [String!]!` has been added to track list of mediators for an instruction 5. New derived fields namely - `parties: [InstructionParty]!`, `affirmations: [InstructionAffirmation]!`, `events: [InstructionEvent]!` have been added to query more information about an instruction - Changes in `Leg` entity 1. Attribute `settlement: Settlement` has been removed 2. Attribute `instruction` is now non-null 3. The `from` and `to` part of the legs have been split separately into identity and portfolio number to support off chain legs. The new attributes are `from: String!`, `fromPortfolio: number`, `to: String!`, `toPortfolio: number` - Following new entities have been added: 1. `InstructionParty` - to track all the DIDs associated with an instruction. 2. `InstructionAffirmation`- to track all the affirmations received for an instruction 3. `OffChainReceipt` - to track all the receipts used in affirming off chain legs 4. `InstructionEvent` - to track all the event associated with an instruction. This will give a clear picture about the lifetime of an instruction on how it got created, to affirming, to execution
b6bc40e
to
8255c13
Compare
|
|
||
export const handleAssetCompliancePaused = async (event: SubstrateEvent): Promise<void> => { | ||
const { params, blockId } = extractArgs(event); | ||
const [, rawTicker] = params; | ||
|
||
const ticker = serializeTicker(rawTicker); | ||
|
||
const asset = await getAsset(ticker); | ||
const asset = await await getAsset(ticker); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const asset = await await getAsset(ticker); | |
const asset = await getAsset(ticker); |
@@ -29,7 +29,7 @@ export const handleAssetComplianceResumed = async (event: SubstrateEvent): Promi | |||
|
|||
const ticker = serializeTicker(rawTicker); | |||
|
|||
const asset = await getAsset(ticker); | |||
const asset = await await getAsset(ticker); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const asset = await await getAsset(ticker); | |
const asset = await getAsset(ticker); |
@@ -41,7 +41,7 @@ export const handleNftCollectionCreated = async (event: SubstrateEvent): Promise | |||
const { params, blockId } = extractArgs(event); | |||
const [, rawTicker] = params; | |||
const ticker = serializeTicker(rawTicker); | |||
const asset = await getAsset(ticker); | |||
const asset = await await getAsset(ticker); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const asset = await await getAsset(ticker); | |
const asset = await getAsset(ticker); |
@@ -73,7 +73,7 @@ export const handleNftPortfolioUpdates = async (event: SubstrateEvent): Promise< | |||
|
|||
const { ticker, ids } = getNftId(rawNftId); | |||
|
|||
const asset = await getAsset(ticker); | |||
const asset = await await getAsset(ticker); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const asset = await await getAsset(ticker); | |
const asset = await getAsset(ticker); |
import { CallIdEnum, ModuleIdEnum, EventIdEnum } from 'src/types'; | ||
import { PolyxTransactionProps } from '../types/models/PolyxTransaction'; | ||
|
||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about disabling for the whole file?
Description
Settlement
,MediatorAffirmation
,IdentityInstructions
have been removedVenue
entitysigners
has been added to track all the allowed signers associated with theminstructions: [Instruction]!
has been added to track instruction infoassociated a Venue
InstructionTypeEnum
to track instruction typeInstruction
entityeventId
,eventIdx
have been removedsettlementType: String!
has been modified totype: InstructionTypeEnum!
endAfterBlock: Int
has been added to track block after whichSettleManual
typeinstructions can be executed
mediators: [String!]!
has been added to track list of mediators for an instructionparties: [InstructionParty]!
,affirmations: [InstructionAffirmation]!
,events: [InstructionEvent]!
have been added toquery more information about an instruction
Leg
entitysettlement: Settlement
has been removedinstruction
is now non-nullfrom
andto
part of the legs have been split separately into identity andportfolio number to support off chain legs. The new attributes are
from: String!
,fromPortfolio: number
,to: String!
,toPortfolio: number
InstructionParty
- to track all the DIDs associated with an instruction.InstructionAffirmation
- to track all the affirmations received for an instructionOffChainReceipt
- to track all the receipts used in affirming off chain legsInstructionEvent
- to track all the event associated with an instruction.This will give a clear picture about the lifetime of an instruction on how it got created,
to affirming, to execution
Breaking Changes
Since some of the settlements related entities have been removed and new ones have been added, this will require a full resync
JIRA Link
DA-1232
Checklist