Module orca_whirlpool.internal.anchor.instructions.update_fees_and_rewards
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 UpdateFeesAndRewardsAccounts(typing.TypedDict):
whirlpool: Pubkey
position: Pubkey
tick_array_lower: Pubkey
tick_array_upper: Pubkey
def update_fees_and_rewards(
accounts: UpdateFeesAndRewardsAccounts,
program_id: Pubkey = PROGRAM_ID,
remaining_accounts: typing.Optional[typing.List[AccountMeta]] = None,
) -> Instruction:
keys: list[AccountMeta] = [
AccountMeta(pubkey=accounts["whirlpool"], is_signer=False, is_writable=True),
AccountMeta(pubkey=accounts["position"], is_signer=False, is_writable=True),
AccountMeta(
pubkey=accounts["tick_array_lower"], is_signer=False, is_writable=False
),
AccountMeta(
pubkey=accounts["tick_array_upper"], is_signer=False, is_writable=False
),
]
if remaining_accounts is not None:
keys += remaining_accounts
identifier = b"\x9a\xe6\xfa\r\xec\xd1K\xdf"
encoded_args = b""
data = identifier + encoded_args
return Instruction(program_id, data, keys)
Functions
def update_fees_and_rewards(accounts: UpdateFeesAndRewardsAccounts, program_id: Pubkey = Pubkey( whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc, ), remaining_accounts: typing.Optional[typing.List[AccountMeta]] = None) ‑> solders.instruction.Instruction
-
Expand source code
def update_fees_and_rewards( accounts: UpdateFeesAndRewardsAccounts, program_id: Pubkey = PROGRAM_ID, remaining_accounts: typing.Optional[typing.List[AccountMeta]] = None, ) -> Instruction: keys: list[AccountMeta] = [ AccountMeta(pubkey=accounts["whirlpool"], is_signer=False, is_writable=True), AccountMeta(pubkey=accounts["position"], is_signer=False, is_writable=True), AccountMeta( pubkey=accounts["tick_array_lower"], is_signer=False, is_writable=False ), AccountMeta( pubkey=accounts["tick_array_upper"], is_signer=False, is_writable=False ), ] if remaining_accounts is not None: keys += remaining_accounts identifier = b"\x9a\xe6\xfa\r\xec\xd1K\xdf" encoded_args = b"" data = identifier + encoded_args return Instruction(program_id, data, keys)
Classes
class UpdateFeesAndRewardsAccounts (*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 UpdateFeesAndRewardsAccounts(typing.TypedDict): whirlpool: Pubkey position: Pubkey tick_array_lower: Pubkey tick_array_upper: Pubkey
Ancestors
- builtins.dict
Class variables
var position : solders.pubkey.Pubkey
var tick_array_lower : solders.pubkey.Pubkey
var tick_array_upper : solders.pubkey.Pubkey
var whirlpool : solders.pubkey.Pubkey