Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
c218956
Feat: Cancel streams using permissions
iamsamgibbs May 3, 2024
991b0ce
Feat: Added isCancelled field to streaming payment model
iamsamgibbs May 8, 2024
29e76ee
Merge pull request #2321 from JoinColony/feat/2215-cancel-streams-usi…
iamsamgibbs May 9, 2024
97ebcd7
Create claim streaming payment saga
davecreaser May 3, 2024
e704dca
Fix claim streaming payment saga
davecreaser May 3, 2024
bf25de4
Add streaming payment claims
davecreaser May 7, 2024
10328c0
Add useStreamingPaymentAmountsLeft hook
davecreaser May 7, 2024
c87567a
Correct min claim value error
davecreaser May 7, 2024
f7f49a3
Remove unnecessary BigNumber call
davecreaser May 7, 2024
fa4cb0e
Add timestamp to streaming payment claims and code cleanup
davecreaser May 8, 2024
29f92ac
Add missing i18n properties
davecreaser May 9, 2024
a55cbdf
Schema update: Add action type for creating streaming payment
jakubcolony May 23, 2024
2d718c5
Feat: update createStreamingPayments to be compatible with new contracts
jakubcolony Jun 6, 2024
2967f9b
Schema update: adjust streaming payment model for a single token
jakubcolony Jun 6, 2024
fa18393
Fix: units of value returned by useStreamingPaymentAmountsLeft
jakubcolony Jun 6, 2024
e4e178a
Fix: claiming streaming payments following contracts update
jakubcolony Jun 6, 2024
f2b6d25
Schema update: remove token address from StreamingPaymentClaim
jakubcolony Jun 6, 2024
21da50e
Fix: order of math operations causing loss of precision when calculat…
jakubcolony Jun 7, 2024
6d65c36
feat: handle the cancelAndWaive action
rumzledz Jun 11, 2024
55c4fe4
feat: add a ColonyActionType enum entry for cancel and waive
rumzledz Jun 11, 2024
e0eefbe
feat: fix typo and add validation to make sure that the stream recipi…
rumzledz Jun 11, 2024
65d107c
feat: rename variable to enhance the narrative
rumzledz Jun 11, 2024
9fb78a2
feat: handle cancelAndWaive method call in existing cancel stream pay…
rumzledz Jun 12, 2024
7837b31
feat: use same batchkey for both cancelled and waived streaming payments
rumzledz Jun 13, 2024
e46a57c
Set correct end time for streaming payments based on end condition
davecreaser Jun 14, 2024
4dc5f03
Fix typings
davecreaser Jun 14, 2024
eb48881
feat: enable payment stream cancellation via motion
rumzledz Jun 11, 2024
ac5f621
feat: revert unintentional amplify changes
rumzledz Jun 11, 2024
49ccfc7
feat: fix permission proof for StreamingPayment cancel
rumzledz Jun 12, 2024
062e623
eat: update createMotion params
rumzledz Jun 14, 2024
6a8329f
feat: update error message
rumzledz Jun 14, 2024
60566df
feat: update function calls
rumzledz Jun 14, 2024
1fad3a9
feat: update block ingestor hash
rumzledz Jun 17, 2024
a4a6957
feat: check minimum colony version compliance for an action
rumzledz Jun 19, 2024
6cf7b38
feat: genericise error message used for colony compliance version check
rumzledz Jun 20, 2024
7356de8
feat: add tmp context
rumzledz Jun 20, 2024
98ce35f
chore: fix rebase conflicts
jakubcolony Jun 28, 2024
0f586b2
Feat: Edit streams using permissions
iamsamgibbs May 8, 2024
6bd79e7
Fix: Update block-ingestor hash and adjust start timestamp
iamsamgibbs May 8, 2024
5e98cec
Fix: Remove unnecessary use of useExtensionData hook
iamsamgibbs May 10, 2024
d44650b
Fix: Align after rebase
iamsamgibbs Jun 11, 2024
a742fbc
Feat: Update editStreamingPayments saga after contract update
iamsamgibbs Jun 12, 2024
9f28251
Feat: Add start time to temporary UI
iamsamgibbs Jun 20, 2024
be3af7f
Fix: Properly handle end conditions and update endTime appropriately
iamsamgibbs Jun 24, 2024
2152ce3
Feat: Remove limit amount from streamingPaymentMetadata
iamsamgibbs Jul 10, 2024
e1a478c
Fix: Adjust getEndTimeByEndCondition and getStreamingPaymentLimit to …
iamsamgibbs Jul 11, 2024
6f7e0a2
Feat: Edit streams using motions
iamsamgibbs Jul 18, 2024
bba5426
Feat: Add changelog to streaming payment and streaming payment metadata
iamsamgibbs Jul 22, 2024
e138a54
Fix: Store streaming payment changes on colony action, and tidy up ed…
iamsamgibbs Jul 23, 2024
a4ebd97
Feat: Only update streaming payment metadata changelog if end conditi…
iamsamgibbs Jul 25, 2024
d56751c
Chore: fixes after rebase
jakubcolony Aug 30, 2024
de261c7
Feat: Add colonyId field to streaming payment model
jakubcolony Sep 17, 2024
717bf48
Schema update: Add creatorAddress to StreamingPayment, make it @searc…
jakubcolony Oct 4, 2024
c5952d9
Chore: update generated and block-ingestor hash post-rebase
jakubcolony Nov 6, 2024
0a52ff5
Chore: Add streaming payment extension config post-rebase
jakubcolony Nov 6, 2024
528a7b5
Fix: wrong permission proofs in createStreamingPayment saga
jakubcolony Jun 16, 2024
119aabb
Cleanup: remove duplicated utils, simplify putting error action in sagas
jakubcolony Jun 16, 2024
6ca285a
Feat: createStreamingPaymentMotion saga
jakubcolony Jun 16, 2024
dd9262a
Fix: edit streaming payment and cancel staked expenditure motion sagas
jakubcolony Jan 30, 2025
0391b99
Schema update: Add action type for create stream motion
jakubcolony Jan 30, 2025
130c746
Feat: Working createStreamingPaymentMotion saga
jakubcolony Jan 30, 2025
f01e12f
Temp: Render TmpStreamingPayments for testing purposes
jakubcolony Jan 30, 2025
924eb19
Update ingestor image hash
jakubcolony Feb 7, 2025
b84a0b5
Add missing translations
jakubcolony Feb 7, 2025
221df75
Merge pull request #2544 from JoinColony/feat/2212-create-stream-usin…
jakubcolony Feb 7, 2025
2efab44
Schema update: Add pending streaming payment to colony motion
jakubcolony Apr 1, 2025
02ed049
Add streaming payment metadata when creating using motions
jakubcolony Apr 1, 2025
9c5b88e
Add pendingStreamingPayment to ColonyMotion fragment
jakubcolony Apr 1, 2025
1622357
Add pendingStreamingPayment to ColonyMotion fragment
jakubcolony Apr 1, 2025
4196cd3
Update ingestor image hash
jakubcolony Apr 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
213 changes: 208 additions & 5 deletions amplify/backend/api/colonycdapp/schema/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,34 @@ enum ColonyActionType {
"""
FINALIZE_EXPENDITURE_MOTION
"""
An action related to creating a streaming payment
"""
CREATE_STREAMING_PAYMENT
"""
An action related to creating a streaming payment via a motion
"""
CREATE_STREAMING_PAYMENT_MOTION
"""
An action related to cancelling a streaming payment
"""
CANCEL_STREAMING_PAYMENT
"""
An action related to cancelling and waiving a streaming payment
"""
CANCEL_AND_WAIVE_STREAMING_PAYMENT
"""
An action related to cancelling a streaming payment via a motion
"""
CANCEL_STREAMING_PAYMENT_MOTION
"""
An action related to editing a streaming payment
"""
EDIT_STREAMING_PAYMENT
"""
An action related to editing a streaming payment via a motion
"""
EDIT_STREAMING_PAYMENT_MOTION
"""
An action related to adding / removing approved colony tokens
"""
MANAGE_TOKENS
Expand Down Expand Up @@ -1627,8 +1655,16 @@ type Colony @model {
"""
reputation: String

"""
Expenditures within the colony
"""
expenditures: [Expenditure] @hasMany(indexName: "byColony", fields: ["id"])
"""
Streaming payments within the colony
"""
streamingPayments: [StreamingPayment]
@hasMany(indexName: "byColony", fields: ["id"])
"""
Global claim delay for expenditures (in seconds)
"""
expendituresGlobalClaimDelay: String
Expand Down Expand Up @@ -3010,6 +3046,40 @@ type ColonyMotion @model {
the details of tokens and amounts to be funded
"""
expenditureFunding: [ExpenditureFundingItem!]

"""
ID of the associated streaming payment, if any
"""
streamingPaymentId: ID
@index(
name: "byStreamingPaymentId"
queryField: "getMotionByStreamingPaymentId"
)

"""
Streaming payment associated with the action, if any
"""
streamingPayment: StreamingPayment @hasOne(fields: ["streamingPaymentId"])

"""
Pending streaming payment to be created by motion, if any
"""
pendingStreamingPayment: PendingStreamingPayment

"""
Streaming Payment changes by the action
"""
pendingStreamingPaymentChanges: StreamingPaymentChanges

"""
Identifier of streaming payment metadata that is stored temporarily and committed to the database once the corresponding motion passes
"""
pendingStreamingPaymentMetadataId: ID
"""
Streaming payment metadata that is stored temporarily and committed to the database once the corresponding motion passes
"""
pendingStreamingPaymentMetadata: StreamingPaymentMetadata
@hasOne(fields: ["pendingStreamingPaymentMetadataId"])
}

type ExpenditureFundingItem {
Expand Down Expand Up @@ -3525,6 +3595,41 @@ type ColonyAction @model @searchable {
expenditureSlotIds: [Int!]

arbitraryTransactions: [ColonyActionArbitraryTransaction!]
"""
ID of the associated streaming payment, if any
"""
streamingPaymentId: ID
@index(
name: "byStreamingPaymentId"
queryField: "getActionByStreamingPaymentId"
)
"""
Streaming payment associated with the action, if any
"""
streamingPayment: StreamingPayment @hasOne(fields: ["streamingPaymentId"])
"""
Changes to the streaming payment associated with the action, if any
Applicable to `EDIT_STREAMING_PAYMENT` action only
"""
streamingPaymentChanges: StreamingPaymentChangeSet
}

type StreamingPaymentChangeSet {
"""
The values before the change
"""
oldValues: StreamingPaymentChanges!
"""
The values before the change
"""
newValues: StreamingPaymentChanges!
}

type StreamingPaymentChanges {
startTime: String!
endTime: String!
interval: String!
amount: String!
}

"""
Expand Down Expand Up @@ -3978,23 +4083,121 @@ type ExpenditureStage {
name: String!
}

type StreamingPayment @model {
type StreamingPayment @model @searchable {
id: ID! # Self-managed, formatted as colonyId_nativeId
"""
Native ID of the streaming payment within a colony
"""
nativeId: Int!
"""
Colony ID (address) to which the expenditure belongs
"""
colonyId: ID!
@index(
name: "byColony"
queryField: "getStreamingPaymentsByColony"
sortKeyFields: ["createdAt"]
)
"""
The Colony to which the expenditure belongs
"""
colony: Colony! @belongsTo(fields: ["colonyId"])
createdAt: AWSDateTime!
recipientAddress: String!
nativeDomainId: Int!
startTime: AWSTimestamp!
endTime: AWSTimestamp!
startTime: String!
endTime: String!
interval: String!
payouts: [ExpenditurePayout!]
tokenAddress: ID!
token: Token @hasOne(fields: ["tokenAddress"])
amount: String!
claims: [StreamingPaymentClaim!]
metadata: StreamingPaymentMetadata @hasOne(fields: ["id"])
"""
Actions associated with the streaming payment
"""
actions: [ColonyAction!]
@hasMany(indexName: "byStreamingPaymentId", fields: ["id"])
"""
Is the stream cancelled?
"""
isCancelled: Boolean
"""
Is the stream waived?
"""
isWaived: Boolean
"""
The motions created that relate to this streaming payment, if there are any
"""
motions: [ColonyMotion]
@hasMany(indexName: "byStreamingPaymentId", fields: ["id"])
"""
Address of the stream creator, can be a user or an extension
"""
creatorAddress: ID!
}

type PendingStreamingPayment {
"""
Address of the recipient
"""
recipientAddress: String!
"""
Native domain ID where the streaming payment will be created
"""
nativeDomainId: Int!
"""
Start time in seconds since epoch
"""
startTime: String!
"""
End time in seconds since epoch
"""
endTime: String!
"""
Payment interval in seconds
"""
interval: String!
"""
Token address used for payments
"""
tokenAddress: ID!
"""
Amount per interval
"""
amount: String!
}

type StreamingPaymentMetadata @model {
id: ID! # Self-managed, formatted as colonyId_nativeId
endCondition: StreamingPaymentEndCondition!
limitAmount: String
"""
List of Streaming Payment metadata changelog entries
"""
changelog: [StreamingPaymentMetadataChangelog!]
}

"""
Represents a changelog entry for Streaming Payment metadata
"""
type StreamingPaymentMetadataChangelog {
"""
Transaction hash associated with the changelog entry
"""
transactionHash: String!
"""
The end condition before the change
"""
oldEndCondition: StreamingPaymentEndCondition!
"""
The end condition after the change
"""
newEndCondition: StreamingPaymentEndCondition!
}

type StreamingPaymentClaim {
amount: String!
timestamp: String!
}

"""
Expand Down
Loading