multiswap

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2026 License: MIT Imports: 18 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// MultiSwapCompositeType is a composite key for multiswap
	MultiSwapCompositeType = "multi_swap"
	// MultiSwapKeyEvent is a reason for multiswap
	MultiSwapKeyEvent = "multi_swap_key"

	// ErrIncorrectMultiSwap is a reason for multiswap
	ErrIncorrectMultiSwap = "incorrect swap"
	// ErrIncorrectMultiSwapKey is a reason for multiswap
	ErrIncorrectMultiSwapKey = "incorrect key"
)

Variables

This section is empty.

Functions

func Answer

func Answer(stub *cachestub.BatchCacheStub, swap *proto.MultiSwap, robotSideTimeout int64) (r *proto.SwapResponse)

func Delete

func Delete(stub shim.ChaincodeStubInterface, swapID string) error

Delete deletes multiswap from the ledger

func Load

func Load(stub shim.ChaincodeStubInterface, swapID string) (*proto.MultiSwap, error)

Load loads multiswap from the ledger

func RobotDone

func RobotDone(stub *cachestub.BatchCacheStub, swapID []byte, key string, s *proto.MultiSwap) (r *proto.SwapResponse)

func Save

func Save(stub shim.ChaincodeStubInterface, swapID string, swap *proto.MultiSwap) error

Save saves multiswap to the ledger

func UserDone

func UserDone(bci any, stub shim.ChaincodeStubInterface, symbol string, swapID string, key string) *peer.Response

Types

type BaseContractInterface

type BaseContractInterface interface {
	GetStub() shim.ChaincodeStubInterface
	TokenBalanceAddWithTicker(address *types.Address, amount *big.Int, ticker string, reason string) error
	AllowedIndustrialBalanceAdd(address *types.Address, industrialAssets []*proto.Asset, reason string) error
}

BaseContractInterface represents BaseContract interface

type OnMultiSwapDoneEventListener added in v0.0.3

type OnMultiSwapDoneEventListener interface {
	OnMultiSwapDoneEvent(
		token string,
		owner *types.Address,
		assets []*proto.Asset,
	)
}

Jump to

Keyboard shortcuts

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