Module orca_whirlpool.internal.anchor.instructions.delete_token_badge
Expand source code
from __future__ import annotations
import typing
from solders.pubkey import Pubkey
from solders.instruction import Instruction, AccountMeta
from ..program_id import PROGRAM_ID
class DeleteTokenBadgeAccounts(typing.TypedDict):
whirlpools_config: Pubkey
whirlpools_config_extension: Pubkey
token_badge_authority: Pubkey
token_mint: Pubkey
token_badge: Pubkey
receiver: Pubkey
def delete_token_badge(
accounts: DeleteTokenBadgeAccounts,
program_id: Pubkey = PROGRAM_ID,
remaining_accounts: typing.Optional[typing.List[AccountMeta]] = None,
) -> Instruction:
keys: list[AccountMeta] = [
AccountMeta(
pubkey=accounts["whirlpools_config"], is_signer=False, is_writable=False
),
AccountMeta(
pubkey=accounts["whirlpools_config_extension"],
is_signer=False,
is_writable=False,
),
AccountMeta(
pubkey=accounts["token_badge_authority"], is_signer=True, is_writable=False
),
AccountMeta(pubkey=accounts["token_mint"], is_signer=False, is_writable=False),
AccountMeta(pubkey=accounts["token_badge"], is_signer=False, is_writable=True),
AccountMeta(pubkey=accounts["receiver"], is_signer=False, is_writable=True),
]
if remaining_accounts is not None:
keys += remaining_accounts
identifier = b"5\x92D\x08\x12u\x11\xb9"
encoded_args = b""
data = identifier + encoded_args
return Instruction(program_id, data, keys)
Functions
def delete_token_badge(accounts: DeleteTokenBadgeAccounts, program_id: Pubkey = Pubkey( whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc, ), remaining_accounts: typing.Optional[typing.List[AccountMeta]] = None) ‑> solders.instruction.Instruction
-
Expand source code
def delete_token_badge( accounts: DeleteTokenBadgeAccounts, program_id: Pubkey = PROGRAM_ID, remaining_accounts: typing.Optional[typing.List[AccountMeta]] = None, ) -> Instruction: keys: list[AccountMeta] = [ AccountMeta( pubkey=accounts["whirlpools_config"], is_signer=False, is_writable=False ), AccountMeta( pubkey=accounts["whirlpools_config_extension"], is_signer=False, is_writable=False, ), AccountMeta( pubkey=accounts["token_badge_authority"], is_signer=True, is_writable=False ), AccountMeta(pubkey=accounts["token_mint"], is_signer=False, is_writable=False), AccountMeta(pubkey=accounts["token_badge"], is_signer=False, is_writable=True), AccountMeta(pubkey=accounts["receiver"], is_signer=False, is_writable=True), ] if remaining_accounts is not None: keys += remaining_accounts identifier = b"5\x92D\x08\x12u\x11\xb9" encoded_args = b"" data = identifier + encoded_args return Instruction(program_id, data, keys)
Classes
class DeleteTokenBadgeAccounts (*args, **kwargs)
-
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2)
Expand source code
class DeleteTokenBadgeAccounts(typing.TypedDict): whirlpools_config: Pubkey whirlpools_config_extension: Pubkey token_badge_authority: Pubkey token_mint: Pubkey token_badge: Pubkey receiver: Pubkey
Ancestors
- builtins.dict
Class variables
var receiver : solders.pubkey.Pubkey
var token_badge : solders.pubkey.Pubkey
var token_mint : solders.pubkey.Pubkey
var whirlpools_config : solders.pubkey.Pubkey
var whirlpools_config_extension : solders.pubkey.Pubkey