payout

package
v0.0.0-...-07d62d3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InstructionPayout

type InstructionPayout struct {
	Variant   uint8
	Amount    uint64
	TokenName string
	BumpSeed  uint8
}

InstructionPayout that should be serialised using Borsh to call the contract to payout a winner

func CreatePayoutInstruction

func CreatePayoutInstruction(args PayoutArgs) (rawTransaction *InstructionPayout, accountMetas solana.AccountMetaSlice, borshSerialised []byte, err error)

CreatePayoutInstruction, ready to be signed and sent out (optionally call SendPayoutInstruction) to do it all at once

func CreatePayoutTransaction

func CreatePayoutTransaction(args PayoutArgs) (transaction *solana.Transaction, payoutInstruction *InstructionPayout, err error)

type PayoutArgs

type PayoutArgs struct {
	FluidityProgramPubkey solana.PublicKey
	DataAccountPubkey     solana.PublicKey
	MetaSplPubkey         solana.PublicKey
	TokenMintPubkey       solana.PublicKey
	FluidMintPubkey       solana.PublicKey
	PdaPubkey             solana.PublicKey
	ObligationPubkey      solana.PublicKey
	ReservePubkey         solana.PublicKey
	AccountAPubkey        solana.PublicKey
	AccountBPubkey        solana.PublicKey
	PayerPubkey           solana.PublicKey
	WinningAmount         uint64
	TokenName             string
	BumpSeed              uint8
	RecentBlockHash       solana.Hash
}

PayoutArgs to use for the payout instruction functions - some don't need to be set for CreatePayoutInstruction

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL