Skip to content

Commit

Permalink
chore: update as per API change
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarenaldi committed Dec 5, 2024
1 parent 2fe3769 commit c3a714f
Show file tree
Hide file tree
Showing 4 changed files with 144 additions and 35 deletions.
7 changes: 2 additions & 5 deletions packages/client/src/viem/signer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,8 @@ async function sendTransaction(
account: walletClient.account,
data: request.raw.data,
gas: BigInt(request.raw.gasLimit),

// TODO Replace this workaround hack once the gas price estimation is clarified.
maxFeePerGas: BigInt(request.raw.gasPrice),
maxPriorityFeePerGas: BigInt(request.raw.gasPrice),
// gasPrice: BigInt(request.raw.gasPrice),
maxFeePerGas: BigInt(request.raw.maxFeePerGas),
maxPriorityFeePerGas: BigInt(request.raw.maxPriorityFeePerGas),
nonce: request.raw.nonce,
paymaster: request.raw.customData.paymasterParams?.paymaster,
paymasterInput: request.raw.customData.paymasterParams?.paymasterInput,
Expand Down
138 changes: 119 additions & 19 deletions packages/graphql/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ type App {
defaultFeedAddress: EvmAddress
namespaceAddress: EvmAddress
treasuryAddress: EvmAddress
sourceStampVerificationEnabled: Boolean!
verificationEnabled: Boolean!
createdAt: DateTime!
metadata: AppMetadata
owner: EvmAddress!
Expand Down Expand Up @@ -593,6 +593,9 @@ type AppMetadata {
"""The name of the app."""
name: String!

"""The tagline of the app."""
tagline: String

"""The platforms supported by the app."""
platforms: [AppMetadataLensPlatformsItem!]!

Expand Down Expand Up @@ -620,6 +623,11 @@ input AppRequest {
txHash: TxHash
}

input AppServerApiKeyRequest {
"""The app address."""
app: EvmAddress!
}

type AppSigner {
signer: EvmAddress!
timestamp: DateTime!
Expand All @@ -636,6 +644,23 @@ input AppSignersRequest {
app: EvmAddress!
}

type AppUser {
account: Account!
lastActiveOn: DateTime!
firstLoginOn: DateTime!
}

input AppUsersRequest {
"""The App to filter by."""
app: EvmAddress!

"""The page size."""
pageSize: PageSize! = FIFTY

"""The cursor."""
cursor: Cursor
}

type ApprovalGroupRule {
rule: EvmAddress!
}
Expand Down Expand Up @@ -950,10 +975,10 @@ input CreateAppRequest {
groups: [EvmAddress!]

"""
If the app has source stamp verification enabled meaning
If the app has verification enabled meaning
you can only do stuff with the app if its signed by one of the signers
"""
sourceStampVerification: Boolean!
verification: Boolean!

"""The app signers leave empty if none"""
signers: [EvmAddress!]
Expand Down Expand Up @@ -1171,11 +1196,11 @@ type Eip1559TransactionRequest {
"""The maximum amount of gas to allow this transaction to consume."""
gasLimit: Int!

"""The EIP_1559 maximum priority fee to pay per gas."""
"""The maximum priority fee to pay per gas."""
maxPriorityFeePerGas: BigInt!

"""
The EIP_1559 maximum total fee to pay per gas. The actual
The maximum total fee to pay per gas. The actual
value used is protocol enforced to be the block's base fee.
"""
maxFeePerGas: BigInt!
Expand Down Expand Up @@ -1228,8 +1253,14 @@ type Eip712TransactionRequest {
"""The maximum amount of gas to allow this transaction to consume."""
gasLimit: Int!

"""The gas price to use."""
gasPrice: BigInt!
"""The maximum priority fee to pay per gas."""
maxPriorityFeePerGas: BigInt!

"""
The maximum total fee to pay per gas. The actual
value used is protocol enforced to be the block's base fee.
"""
maxFeePerGas: BigInt!

"""The transaction data."""
data: BlockchainData!
Expand Down Expand Up @@ -2085,6 +2116,12 @@ type Group {
address: EvmAddress!
timestamp: DateTime!
metadata: GroupMetadata

"""
Check if the authenticated account is a member of the group.
Will return null if the account is not logged in.
"""
isMember: Boolean
owner: EvmAddress!
rules(request: RuleInput): GroupRulesConfig!
}
Expand Down Expand Up @@ -2132,6 +2169,9 @@ type GroupMetadata {

"""The slug for the Community."""
slug: String!

"""The Group cover picture."""
coverPicture: URI
}

input GroupRequest {
Expand All @@ -2149,6 +2189,15 @@ type GroupRulesConfig {
anyOf: [GroupRule!]!
}

input GroupStatsRequest {
"""The group address to check its total members."""
group: EvmAddress!
}

type GroupStatsResponse {
totalMembers: Int!
}

input GroupsFilter {
"""The name of the group"""
name: String
Expand Down Expand Up @@ -3126,11 +3175,13 @@ type Mutation {
setAppMetadata(request: SetAppMetadataRequest!): SetAppMetadataResult!

"""
Set the source stamp verification for an app
Set if the app verification is enabled
App needs to have authorization endpoint enabled
App needs to return `verification_endpoint` from the authorization endpoint
You MUST be authenticated as a builder to use this mutation.
"""
setAppSourceStampVerification(request: SetAppSourceStampVerificationRequest!): SetAppSourceStampVerificationResult!
setAppVerification(request: SetAppVerificationRequest!): SetAppVerificationResult!

"""
Set sponsorship for an app
Expand All @@ -3153,6 +3204,13 @@ type Mutation {
"""
setAppUsernameNamespace(request: SetAppUsernameNamespaceRequest!): SetAppUsernameNamespaceResult!

"""
Refresh the server side api key for an app
You MUST be authenticated as a builder to use this mutation.
"""
appRefreshServerApiKey(request: RefreshAppServerApiKeyRequest!): ServerAPIKey!

"""
Report an account.
Expand Down Expand Up @@ -3645,6 +3703,11 @@ type PaginatedAppSignersResult {
pageInfo: PaginatedResultInfo!
}

type PaginatedAppUsersResult {
items: [AppUser!]!
pageInfo: PaginatedResultInfo!
}

type PaginatedAppsResult {
items: [App!]!
pageInfo: PaginatedResultInfo!
Expand Down Expand Up @@ -3681,6 +3744,11 @@ type PaginatedNotificationResult {
pageInfo: PaginatedResultInfo!
}

type PaginatedPostEditsResult {
items: [PostEdit!]!
pageInfo: PaginatedResultInfo!
}

type PaginatedPostReactionsResult {
items: [AccountPostReaction!]!
pageInfo: PaginatedResultInfo!
Expand Down Expand Up @@ -3824,6 +3892,17 @@ input PostBookmarksRequest {
cursor: Cursor
}

type PostEdit {
metadata: PostMetadata!
timestamp: DateTime!
}

input PostEditsRequest {
post: PostId!
pageSize: PageSize! = FIFTY
cursor: Cursor
}

scalar PostId

union PostMetadata = ArticleMetadata | AudioMetadata | CheckingInMetadata | EmbedMetadata | EventMetadata | ImageMetadata | LinkMetadata | LivestreamMetadata | MintMetadata | SpaceMetadata | StoryMetadata | TextOnlyMetadata | ThreeDMetadata | TransactionMetadata | VideoMetadata
Expand Down Expand Up @@ -4100,9 +4179,19 @@ type Query {
"""Get the feeds for an app"""
appFeeds(request: AppFeedsRequest!): PaginatedAppFeedsResult!

"""Get accounts for an app."""
appUsers(request: AppUsersRequest!): PaginatedAppUsersResult!

"""Get the apps managed by the given address."""
managedApps(request: ManagedAppsRequest!): PaginatedAppsResult!

"""
Get the server side API key for the app you must be the owner of the app to see it.
You MUST be authenticated as a builder to use this mutation.
"""
appServerApiKey(request: AppServerApiKeyRequest!): ServerAPIKey!

"""
List all active authenticated sessions for the current account.
Expand Down Expand Up @@ -4135,6 +4224,7 @@ type Query {
"""Get accounts who referenced a post"""
whoReferencedPost(request: WhoReferencedPostRequest!): PaginatedAccountsResult!
whoActedOnPost(request: WhoActedOnPostRequest!): PaginatedAccountsResult!
postEdits(request: PostEditsRequest!): PaginatedPostEditsResult!
following(request: FollowingRequest!): PaginatedFollowingResult!
followers(request: FollowersRequest!): PaginatedFollowersResult!
followersYouKnow(request: FollowersYouKnowRequest!): PaginatedFollowersResult!
Expand All @@ -4157,6 +4247,9 @@ type Query {
"""Get the groups managed by the given address."""
managedGroups(request: ManagedGroupsRequest!): PaginatedGroupsResult!

"""Get the groups managed by the given address."""
groupStats(request: GroupStatsRequest!): GroupStatsResponse!

"""Get admins for a graph/app/sponsor/feed/username/group address"""
adminsFor(request: AdminsForRequest!): PaginatedAdminsResult!

Expand Down Expand Up @@ -4223,6 +4316,11 @@ input ReferencingPostInput {
post: PostId!
}

input RefreshAppServerApiKeyRequest {
"""The app to refresh the server side api key for"""
app: EvmAddress!
}

input RefreshRequest {
refreshToken: RefreshToken!
}
Expand Down Expand Up @@ -4403,6 +4501,8 @@ type SelfFundedTransactionRequest {
selfFundedReason: SelfFundedFallbackReason
}

scalar ServerAPIKey

input SetAccountMetadataRequest {
"""The metadata URI to set."""
metadataUri: URI!
Expand Down Expand Up @@ -4434,16 +4534,6 @@ input SetAppMetadataRequest {

union SetAppMetadataResult = SponsoredTransactionRequest | SelfFundedTransactionRequest | TransactionWillFail

input SetAppSourceStampVerificationRequest {
"""The app to update"""
app: EvmAddress!

"""The app source stamp verification to set"""
status: Boolean!
}

union SetAppSourceStampVerificationResult = SponsoredTransactionRequest | SelfFundedTransactionRequest | TransactionWillFail

input SetAppSponsorshipRequest {
"""The app to update"""
app: EvmAddress!
Expand Down Expand Up @@ -4474,6 +4564,16 @@ input SetAppUsernameNamespaceRequest {

union SetAppUsernameNamespaceResult = SponsoredTransactionRequest | SelfFundedTransactionRequest | TransactionWillFail

input SetAppVerificationRequest {
"""The app to update"""
app: EvmAddress!

"""The new verification state"""
enabled: Boolean!
}

union SetAppVerificationResult = SponsoredTransactionRequest | SelfFundedTransactionRequest | TransactionWillFail

input SetDefaultAppFeedRequest {
"""The app to update"""
app: EvmAddress!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ const Eip712TransactionRequest = graphql(
from
nonce
gasLimit
gasPrice
maxFeePerGas
maxPriorityFeePerGas
data
value
chainId
Expand Down
Loading

0 comments on commit c3a714f

Please sign in to comment.