Skip to content
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

Add Token Extension 2022 Extension schema in Graphql along with tests. #2535

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
40 changes: 40 additions & 0 deletions packages/rpc-graphql/src/schema/instruction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,46 @@ export const instructionTypeDefs = /* GraphQL */ `
newAuthority: Account
}

"""
Token Extension 2022: TransferFee
"""
type TransferFeeExtension {
mint: String
transferFeeBasisPoints: Int
maximumFee: Int
transferFeeConfigAuthority: String
withdrawWithheldAuthority: String
source: String
destination: String
tokenAmount: TokenAmount
feeAmount: TokenAmount
signers: [Address]
authority: String
multisigWithdrawWithheldAuthority: String
feeRecipient: String
sourceAccounts: [String]
multisigtransferFeeConfigAuthority: String
multisigAuthority: String
}
Comment on lines +518 to +535
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TransferFeeExtension actually has its own set of instructions, as each extension does. I think you've globbed together all of them here:

  • TransferCheckedWithFee
  • WithdrawWithheldTokensFromMint
  • WithdrawWithheldTokensFromAccounts
  • HarvestWithheldTokensToMint
  • SetTransferFee


type ReallocateExtension {
account: String
payer: String
systemProgram: String
extensionTypes: [String]
owner: String
signers: [String]
multisigOwner: String
}

type DefaultAccountStateExtension {
mint: String
accountState: String
freezeAuthority: String
multisigFreezeAuthority: String
signers: [String]
}

# TODO: Extensions!
# - TransferFeeExtension
# - ConfidentialTransferFeeExtension
Expand Down