fee_quoter

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const ContractType = "FeeQuoter"

ContractType labels FeeQuoter.

Variables

View Source
var AcceptOwnership = cldfops.NewOperation(
	"fee-quoter:accept-ownership",
	stellarops.ContractDeploymentVersion,
	"Accepts FeeQuoter ownership after transfer_ownership",
	func(b cldfops.Bundle, d stellardeps.StellarDeps, in AcceptOwnershipInput) (stellarops.Void, error) {
		c := fqbindings.NewFeeQuoterClient(d.Invoker, in.ContractID)
		if err := c.AcceptOwnership(b.GetContext()); err != nil {
			return stellarops.Void{}, err
		}
		return stellarops.Void{}, nil
	},
)

AcceptOwnership calls `accept_ownership` on FeeQuoter.

View Source
var ApplyDestChainConfigs = cldfops.NewOperation(
	"fee-quoter:apply-dest-chain-configs",
	stellarops.ContractDeploymentVersion,
	"Applies FeeQuoter destination chain configurations",
	func(b cldfops.Bundle, d stellardeps.StellarDeps, in ApplyDestChainConfigsInput) (stellarops.Void, error) {
		c := fqbindings.NewFeeQuoterClient(d.Invoker, in.ContractID)
		if err := c.ApplyDestChainConfigs(b.GetContext(), in.Configs); err != nil {
			return stellarops.Void{}, err
		}
		return stellarops.Void{}, nil
	},
)

ApplyDestChainConfigs calls FeeQuoter `apply_dest_chain_configs`.

View Source
var ApplyTokenFeeConfigs = cldfops.NewOperation(
	"fee-quoter:apply-token-fee-configs",
	stellarops.ContractDeploymentVersion,
	"Applies per-token transfer fee configurations on Stellar FeeQuoter",
	func(b cldfops.Bundle, d stellardeps.StellarDeps, in ApplyTokenFeeConfigsInput) (stellarops.Void, error) {
		c := fqbindings.NewFeeQuoterClient(d.Invoker, in.ContractID)
		if err := c.ApplyTokenFeeConfigs(b.GetContext(), in.AddConfigs, in.RemoveArgs); err != nil {
			return stellarops.Void{}, err
		}
		return stellarops.Void{}, nil
	},
)

ApplyTokenFeeConfigs calls FeeQuoter `apply_token_fee_configs`.

View Source
var Deploy = stellarops.NewDeployOperation("fee-quoter:deploy", "Deploys the FeeQuoter Soroban contract from WASM")

Deploy uploads fee_quoter.wasm.

View Source
var Initialize = cldfops.NewOperation(
	"fee-quoter:initialize",
	stellarops.ContractDeploymentVersion,
	"Initializes FeeQuoter with owner, static config, and authorized callers",
	func(b cldfops.Bundle, d stellardeps.StellarDeps, in InitializeInput) (stellarops.Void, error) {
		c := fqbindings.NewFeeQuoterClient(d.Invoker, in.ContractID)
		if err := c.Initialize(b.GetContext(), in.Owner, in.StaticConfig, in.AuthorizedCallers); err != nil {
			return stellarops.Void{}, err
		}
		return stellarops.Void{}, nil
	},
)

Initialize calls FeeQuoter `initialize`.

View Source
var TransferOwnership = cldfops.NewOperation(
	"fee-quoter:transfer-ownership",
	stellarops.ContractDeploymentVersion,
	"Transfers FeeQuoter ownership to a pending new owner",
	func(b cldfops.Bundle, d stellardeps.StellarDeps, in TransferOwnershipInput) (stellarops.Void, error) {
		c := fqbindings.NewFeeQuoterClient(d.Invoker, in.ContractID)
		if err := c.TransferOwnership(b.GetContext(), in.NewOwner); err != nil {
			return stellarops.Void{}, err
		}
		return stellarops.Void{}, nil
	},
)

TransferOwnership calls `transfer_ownership` on FeeQuoter.

View Source
var UpdatePrices = cldfops.NewOperation(
	"fee-quoter:update-prices",
	stellarops.ContractDeploymentVersion,
	"Updates gas and token prices on Stellar FeeQuoter",
	func(b cldfops.Bundle, d stellardeps.StellarDeps, in UpdatePricesInput) (stellarops.Void, error) {
		c := fqbindings.NewFeeQuoterClient(d.Invoker, in.ContractID)
		if err := c.UpdatePrices(b.GetContext(), in.Updater, in.PriceUpdates); err != nil {
			return stellarops.Void{}, err
		}
		return stellarops.Void{}, nil
	},
)

UpdatePrices calls FeeQuoter `update_prices`.

Functions

This section is empty.

Types

type AcceptOwnershipInput

type AcceptOwnershipInput struct {
	ContractID string `json:"contract_id"`
}

AcceptOwnershipInput completes two-step ownership transfer for the caller.

type ApplyDestChainConfigsInput

type ApplyDestChainConfigsInput struct {
	ContractID string                           `json:"contract_id"`
	Configs    []fqbindings.DestChainConfigArgs `json:"configs"`
}

ApplyDestChainConfigsInput applies destination gas/fee defaults on FeeQuoter.

type ApplyTokenFeeConfigsInput

type ApplyTokenFeeConfigsInput struct {
	ContractID string                                `json:"contract_id"`
	AddConfigs []fqbindings.TokenFeeConfigArgs       `json:"add_configs"`
	RemoveArgs []fqbindings.TokenFeeConfigRemoveArgs `json:"remove_args"`
}

ApplyTokenFeeConfigsInput sets per-token transfer fee overrides on FeeQuoter.

type InitializeInput

type InitializeInput struct {
	ContractID        string                  `json:"contract_id"`
	Owner             string                  `json:"owner"`
	StaticConfig      fqbindings.StaticConfig `json:"static_config"`
	AuthorizedCallers []string                `json:"authorized_callers"`
}

InitializeInput configures FeeQuoter static config and price updaters.

type TransferOwnershipInput

type TransferOwnershipInput struct {
	ContractID string `json:"contract_id"`
	NewOwner   string `json:"new_owner"`
}

TransferOwnershipInput starts two-step ownership transfer.

type UpdatePricesInput

type UpdatePricesInput struct {
	ContractID   string                  `json:"contract_id"`
	Updater      string                  `json:"updater"`
	PriceUpdates fqbindings.PriceUpdates `json:"price_updates"`
}

UpdatePricesInput sets gas and token price updates on FeeQuoter.

Jump to

Keyboard shortcuts

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