tokenpool

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2026 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BurnMintTokenPool

type BurnMintTokenPool struct {
	Address            contracts.RawInstanceAddress
	InstrumentId       splice_api_token_holding_v1.InstrumentId
	Decimals           types.INT64
	RemoteChainConfigs map[uint64]RemoteChainConfig
}

func ParseBurnMintTokenPool

func ParseBurnMintTokenPool(createdEvent *apiv2.CreatedEvent) (*BurnMintTokenPool, error)

type ContractConfig

type ContractConfig struct {
	Type  config.TokenPoolType
	Owner types.PARTY
	// contains filtered or unexported fields
}

type LockReleaseTokenPool

type LockReleaseTokenPool struct {
	Address            contracts.RawInstanceAddress
	CCIPOwner          types.PARTY
	InstrumentId       splice_api_token_holding_v1.InstrumentId
	Decimals           types.INT64
	RemoteChainConfigs map[uint64]RemoteChainConfig
}

func ParseLockReleaseTokenPool

func ParseLockReleaseTokenPool(createdEvent *apiv2.CreatedEvent) (*LockReleaseTokenPool, error)

type RemoteChainConfig

type RemoteChainConfig struct {
	InboundRateLimiter                         contracts.InstanceAddress
	InboundCustomBlockConfirmationsRateLimiter contracts.InstanceAddress
	OutboundRateLimiter                        contracts.InstanceAddress

	InboundCCVs  []contracts.RawInstanceAddress
	OutboundCCVs []contracts.RawInstanceAddress
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(
	ctx context.Context,
	logger zerolog.Logger,
	activeContractStore store.ActiveContractStoreInterface,
	instrumentHoldingStore store.InstrumentHoldingStoreInterface,
	cfg config.TokenPoolAPIConfig,
) (*Server, error)

func (*Server) FilterContracts

func (s *Server) FilterContracts(addresses []contracts.InstanceAddress) []contracts.InstanceAddress

FilterContracts returns the sub-set of addresses that are tracked by the Token Pool API Server. This includes token pools themselves, and their rate limiters.

func (*Server) PostTokenPoolExecute

func (s *Server) PostTokenPoolExecute(c *gin.Context, address string)

func (*Server) PostTokenPoolSend

func (s *Server) PostTokenPoolSend(c *gin.Context, address string)

func (*Server) RegisterDiscoveredPool

func (s *Server) RegisterDiscoveredPool(ctx context.Context, poolConfig config.TokenPool) error

RegisterDiscoveredPool builds a ContractConfig for poolConfig and adds it to contractConfigs, making the pool servable by PostTokenPoolSend/PostTokenPoolExecute without a restart. Always overwrites any existing entry for the same address - the caller (PoolDiscoveryService) is responsible for only calling this for a genuinely new-or-newer pool, since InstanceIds aren't guaranteed unique and a later-created pool should win over an earlier one at the same address.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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