Skip to content

Commit

Permalink
Merge pull request #201 from pheuberger/safe-integration-profile
Browse files Browse the repository at this point in the history
Safe integration for profile updates
  • Loading branch information
bitbeckers authored Dec 19, 2024
2 parents c1c6e7c + 3f83f99 commit 87817a4
Show file tree
Hide file tree
Showing 43 changed files with 2,020 additions and 212 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
"@hypercerts-org/sdk": "2.3.0",
"@ipld/car": "^5.2.5",
"@openzeppelin/merkle-tree": "^1.0.5",
"@safe-global/api-kit": "^2.5.4",
"@safe-global/protocol-kit": "^5.0.4",
"@sentry/integrations": "^7.114.0",
"@sentry/node": "^8.2.1",
"@sentry/profiling-node": "^8.2.1",
Expand Down
327 changes: 236 additions & 91 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

79 changes: 79 additions & 0 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,11 @@ type GetSalesResponse {
data: [Sale!]
}

type GetSignatureRequestResponse {
count: Int
data: [SignatureRequest!]
}

type GetUsersResponse {
count: Int
data: [User!]
Expand Down Expand Up @@ -505,6 +510,9 @@ type HyperboardOwner {
"""The display name of the user"""
display_name: String
percentage_owned: Float!

"""Pending signature requests for the user"""
signature_requests: [SignatureRequest!]
}

input HyperboardSortOptions {
Expand Down Expand Up @@ -832,6 +840,7 @@ type Query {
metadata(first: Int, offset: Int, sort: MetadataFetchInput, where: MetadataWhereInput): GetMetadataResponse!
orders(first: Int, offset: Int, sort: OrderFetchInput, where: OrderWhereInput): GetOrdersResponse!
sales(first: Int, offset: Int, sort: SaleFetchInput, where: SaleWhereInput): GetSalesResponse!
signatureRequests(first: Int, offset: Int, sort: SignatureRequestFetchInput, where: SignatureRequestWhereInput): GetSignatureRequestResponse!
users(first: Int, offset: Int, where: UserWhereInput): GetUsersResponse!
}

Expand Down Expand Up @@ -941,6 +950,9 @@ type SectionEntryOwner {
"""The display name of the user"""
display_name: String
percentage: Float!

"""Pending signature requests for the user"""
signature_requests: [SignatureRequest!]
units: BigInt
}

Expand All @@ -949,6 +961,70 @@ type SectionResponseType {
data: [Section!]!
}

"""Pending signature request for a user"""
type SignatureRequest {
"""The chain ID of the signature request"""
chain_id: EthBigInt!

"""The message data in JSON format"""
message: String!

"""The hash of the Safe message (not the message to be signed)"""
message_hash: String!

"""The purpose of the signature request"""
purpose: SignatureRequestPurpose!

"""The safe address of the user who needs to sign"""
safe_address: String!

"""The status of the signature request"""
status: SignatureRequestStatus!

"""Timestamp of when the signature request was created"""
timestamp: EthBigInt!
}

input SignatureRequestFetchInput {
by: SignatureRequestSortOptions
}

"""Purpose of the signature request"""
enum SignatureRequestPurpose {
UPDATE_USER_DATA
}

input SignatureRequestPurposeSearchOptions {
eq: SignatureRequestPurpose
}

input SignatureRequestSortOptions {
message_hash: SortOrder
purpose: SortOrder
safe_address: SortOrder
timestamp: SortOrder
}

"""Status of the signature request"""
enum SignatureRequestStatus {
CANCELED
EXECUTED
PENDING
}

input SignatureRequestStatusSearchOptions {
eq: SignatureRequestStatus
}

input SignatureRequestWhereInput {
chain_id: BigIntSearchOptions
message_hash: StringSearchOptions
purpose: SignatureRequestPurposeSearchOptions
safe_address: StringSearchOptions
status: SignatureRequestStatusSearchOptions
timestamp: BigIntSearchOptions
}

"""The direction to sort the query results"""
enum SortOrder {
"""Ascending order"""
Expand Down Expand Up @@ -988,6 +1064,9 @@ type User {

"""The display name of the user"""
display_name: String

"""Pending signature requests for the user"""
signature_requests: [SignatureRequest!]
}

input UserWhereInput {
Expand Down
93 changes: 91 additions & 2 deletions src/__generated__/routes/routes.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 87817a4

Please sign in to comment.