Documentation ¶
Index ¶
- Constants
- func Answer(stub *cachestub.BatchCacheStub, swap *proto.Swap, robotSideTimeout int64) (r *proto.SwapResponse)
- func Delete(stub shim.ChaincodeStubInterface, swapID string) error
- func Load(stub shim.ChaincodeStubInterface, swapID string) (*proto.Swap, error)
- func RobotDone(stub *cachestub.BatchCacheStub, swapID []byte, key string) (r *proto.SwapResponse)
- func Save(stub shim.ChaincodeStubInterface, swapID string, s *proto.Swap) error
- func UserDone(bci any, stub shim.ChaincodeStubInterface, symbol, swapID string, key string) peer.Response
- type BaseContractInterface
- type OnSwapDoneEventListener
Constants ¶
View Source
const ( // SwapCompositeType is a composite key for swap SwapCompositeType = "swaps" // SwapKeyEvent is a reason for swap SwapKeyEvent = "key" // ErrIncorrectSwap is a reason for multiswap ErrIncorrectSwap = "incorrect swap" // ErrIncorrectKey is a reason for multiswap ErrIncorrectKey = "incorrect key" )
Variables ¶
This section is empty.
Functions ¶
func Answer ¶
func Answer(stub *cachestub.BatchCacheStub, swap *proto.Swap, robotSideTimeout int64) (r *proto.SwapResponse)
func Delete ¶
func Delete(stub shim.ChaincodeStubInterface, swapID string) error
Delete deletes swap
func RobotDone ¶
func RobotDone(stub *cachestub.BatchCacheStub, swapID []byte, key string) (r *proto.SwapResponse)
Types ¶
type BaseContractInterface ¶
type BaseContractInterface interface { GetStub() shim.ChaincodeStubInterface AllowedBalanceAdd(token string, address *types.Address, amount *big.Int, reason string) error TokenBalanceAdd(address *types.Address, amount *big.Int, reason string) error }
BaseContractInterface represents BaseContract interface
Click to show internal directories.
Click to hide internal directories.