code

package
v1.2.2-0...-235a4a2 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// general
	OK                           uint32 = 0
	WrongNonce                   uint32 = 101
	CoinNotExists                uint32 = 102
	CoinReserveNotSufficient     uint32 = 103
	TxTooLarge                   uint32 = 105
	DecodeError                  uint32 = 106
	InsufficientFunds            uint32 = 107
	TxPayloadTooLarge            uint32 = 109
	TxServiceDataTooLarge        uint32 = 110
	InvalidMultisendData         uint32 = 111
	CoinSupplyOverflow           uint32 = 112
	TxFromSenderAlreadyInMempool uint32 = 113
	TooLowGasPrice               uint32 = 114
	WrongChainID                 uint32 = 115
	CoinReserveUnderflow         uint32 = 116
	WrongHaltHeight              uint32 = 117
	HaltAlreadyExists            uint32 = 118
	CommissionCoinNotSufficient  uint32 = 119
	VoteExpired                  uint32 = 120
	VoteAlreadyExists            uint32 = 121
	WrongUpdateVersionName       uint32 = 122
	WrongDueHeight               uint32 = 123
	Unavailable                  uint32 = 124

	// coin creation
	CoinHasNotReserve uint32 = 200
	CoinAlreadyExists uint32 = 201
	WrongCrr          uint32 = 202
	InvalidCoinSymbol uint32 = 203
	InvalidCoinName   uint32 = 204
	WrongCoinSupply   uint32 = 205
	WrongCoinEmission uint32 = 206

	// recreate coin
	IsNotOwnerOfCoin uint32 = 206

	// convert
	CrossConvert              uint32 = 301
	MaximumValueToSellReached uint32 = 302
	MinimumValueToBuyReached  uint32 = 303

	// candidate
	CandidateExists       uint32 = 401
	WrongCommission       uint32 = 402
	CandidateNotFound     uint32 = 403
	StakeNotFound         uint32 = 404
	InsufficientStake     uint32 = 405
	IsNotOwnerOfCandidate uint32 = 406
	IncorrectPubKey       uint32 = 407
	StakeShouldBePositive uint32 = 408
	TooLowStake           uint32 = 409
	PublicKeyInBlockList  uint32 = 410
	NewPublicKeyIsBad     uint32 = 411
	InsufficientWaitList  uint32 = 412
	PeriodLimitReached    uint32 = 413
	CandidateJailed       uint32 = 414
	TooBigStake           uint32 = 415
	UnbondBlocked         uint32 = 416
	EqualPubKey           uint32 = 417

	// check
	CheckInvalidLock uint32 = 501
	CheckExpired     uint32 = 502
	CheckUsed        uint32 = 503
	TooHighGasPrice  uint32 = 504
	WrongGasCoin     uint32 = 505
	TooLongNonce     uint32 = 506

	// multisig
	IncorrectWeights                  uint32 = 601
	MultisigExists                    uint32 = 602
	MultisigNotExists                 uint32 = 603
	IncorrectMultiSignature           uint32 = 604
	TooLargeOwnersList                uint32 = 605
	DuplicatedAddresses               uint32 = 606
	DifferentCountAddressesAndWeights uint32 = 607
	IncorrectTotalWeights             uint32 = 608
	NotEnoughMultisigVotes            uint32 = 609

	// swap pool
	SwapPoolUnknown              uint32 = 700
	PairNotExists                uint32 = 701
	InsufficientInputAmount      uint32 = 702
	InsufficientLiquidity        uint32 = 703
	InsufficientLiquidityMinted  uint32 = 704
	InsufficientLiquidityBurned  uint32 = 705
	InsufficientLiquidityBalance uint32 = 706
	InsufficientOutputAmount     uint32 = 707
	PairAlreadyExists            uint32 = 708
	TooLongSwapRoute             uint32 = 709
	DuplicatePoolInRoute         uint32 = 710
	OrderNotExists               uint32 = 711
	IsNotOwnerOfOrder            uint32 = 712
	WrongOrderPrice              uint32 = 713
	WrongOrderVolume             uint32 = 714

	// emission coin
	CoinIsNotToken  uint32 = 800
	CoinNotMintable uint32 = 801
	CoinNotBurnable uint32 = 802
)

Codes for transaction checks and delivers responses

Variables

This section is empty.

Functions

func MewCheckExpired

func MewCheckExpired(dueBlock string, currentBlock string) *checkExpired

func NewCandidateExists

func NewCandidateExists(publicKey string) *candidateExists

func NewCandidateNotFound

func NewCandidateNotFound(publicKey string) *candidateNotFound

func NewCheckInvalidLock

func NewCheckInvalidLock() *checkInvalidLock

func NewCheckUsed

func NewCheckUsed() *checkUsed

func NewCoinAlreadyExists

func NewCoinAlreadyExists(coinSymbol string, coinId string) *coinAlreadyExists

func NewCoinHasNotReserve

func NewCoinHasNotReserve(coinSymbol string, coinId string) *coinHasNotReserve

func NewCoinInNotToken

func NewCoinInNotToken(coinSymbol string, coinId string) *coinInNotToken

func NewCoinIsNotBurnable

func NewCoinIsNotBurnable(coinSymbol string, coinId string) *coinIsNotMintableOrBurnable

func NewCoinIsNotMintable

func NewCoinIsNotMintable(coinSymbol string, coinId string) *coinIsNotMintableOrBurnable

func NewCoinNotExists

func NewCoinNotExists(coinSymbol string, coinId string) *coinNotExists

func NewCoinReserveNotSufficient

func NewCoinReserveNotSufficient(coinSymbol string, coinId string, hasBipValue string, requiredBipValue string) *coinReserveNotSufficient

func NewCoinReserveUnderflow

func NewCoinReserveUnderflow(delta string, coinReserve string, currentReserve string, minCoinReserve string, coinSymbol string, coinId string) *coinReserveUnderflow

func NewCoinSupplyOverflow

func NewCoinSupplyOverflow(delta string, coinSupply string, currentSupply string, maxCoinSupply string, coinSymbol string, coinId string) *coinSupplyOverflow

func NewCommissionCoinNotSufficient

func NewCommissionCoinNotSufficient(bancor string, pool string) *commissionCoinNotSufficient

func NewCrossConvert

func NewCrossConvert(coinIdToSell string, coinToSell string, coinIdToBuy string, coinToBuy string) *crossConvert

func NewCustomCode

func NewCustomCode(code uint32) *customCode

func NewDecodeError

func NewDecodeError() *decodeError

func NewDifferentCountAddressesAndWeights

func NewDifferentCountAddressesAndWeights(countAddresses string, countWeights string) *differentCountAddressesAndWeights

func NewDuplicatePoolInRouteCode

func NewDuplicatePoolInRouteCode(pool uint32) *duplicatePoolInRouteCode

func NewDuplicatedAddresses

func NewDuplicatedAddresses(address string) *duplicatedAddresses

func NewEqualPubKey

func NewEqualPubKey(pubKey string) *equalPubKey

func NewHaltAlreadyExists

func NewHaltAlreadyExists(height string, pubkey string) *wrongHaltHeight

func NewIncorrectMultiSignature

func NewIncorrectMultiSignature(text string) *incorrectMultiSignature

func NewIncorrectTotalWeights

func NewIncorrectTotalWeights(totalWeight, threshold string) *incorrectTotalWeights

func NewIncorrectWeights

func NewIncorrectWeights(address string, weight string, maxWeight string) *incorrectWeights

func NewInsufficientFunds

func NewInsufficientFunds(sender string, neededValue string, coinSymbol string, coinId string) *insufficientFunds

func NewInsufficientInputAmount

func NewInsufficientInputAmount(_, _, coin1, value1, neededValue1 string) *insufficientInputAmount

func NewInsufficientLiquidity

func NewInsufficientLiquidity(coin0, value0, coin1, value1, reserve0, reserve1 string) *insufficientLiquidity

func NewInsufficientLiquidityBalance

func NewInsufficientLiquidityBalance(liquidity, amount0, coin0, amount1, coin1, requestedLiquidity string) *insufficientLiquidityBalance

func NewInsufficientLiquidityBurned

func NewInsufficientLiquidityBurned(wantGetAmount0 string, coin0 string, wantGetAmount1 string, coin1 string, liquidity string, amount0 string, amount1 string) *insufficientLiquidityBurned

func NewInsufficientLiquidityMinted

func NewInsufficientLiquidityMinted(coin0, value0, coin1, value1 string) *insufficientLiquidityMinted

func NewInsufficientOutputAmount

func NewInsufficientOutputAmount(coin0, value0, coin1, value1 string) *insufficientOutputAmount

func NewInsufficientStake

func NewInsufficientStake(publicKey string, owner string, coinId string, coinSymbol string, stakeValue string, neededValue string) *insufficientStake

func NewInsufficientWaitList

func NewInsufficientWaitList(waitlistValue, neededValue string) *insufficientWaitList

func NewInvalidCoinName

func NewInvalidCoinName(maxBytes string, gotBytes string) *invalidCoinName

func NewInvalidCoinSymbol

func NewInvalidCoinSymbol(pattern string, coinSymbol string) *invalidCoinSymbol

func NewInvalidMultisendData

func NewInvalidMultisendData(minQuantity string, maxQuantity string, gotQuantity string) *invalidMultisendData

func NewIsNotOwnerOfCandidate

func NewIsNotOwnerOfCandidate(sender, pubKey string, owner, control string) *isNotOwnerOfCandidate

func NewIsNotOwnerOfCoin

func NewIsNotOwnerOfCoin(coinSymbol string, owner *string) *isNotOwnerOfCoin

func NewIsNotOwnerOfOrder

func NewIsNotOwnerOfOrder(coin0 string, coin1 string, id uint32, owner string) *isNotOwnerOfOrder

func NewMaximumValueToSellReached

func NewMaximumValueToSellReached(maximumValueToSell string, neededSpendValue string, coinSymbol string, coinId string) *maximumValueToSellReached

func NewMinimumValueToBuyReached

func NewMinimumValueToBuyReached(minimumValueToBuy string, willGetValue string, coinSymbol string, coinId string) *minimumValueToBuyReached

func NewMultisigExists

func NewMultisigExists(address string) *multisigExists

func NewMultisigNotExists

func NewMultisigNotExists(address string) *multisigNotExists

func NewNewPublicKeyIsBad

func NewNewPublicKeyIsBad(publicKey, newPublicKey string) *newPublicKeyIsBad

func NewNotEnoughMultisigVotes

func NewNotEnoughMultisigVotes(neededVotes, gotVotes string) *notEnoughMultisigVotes

func NewOrderNotExists

func NewOrderNotExists(id uint32) *orderNotExists

func NewPairAlreadyExists

func NewPairAlreadyExists(coin0 string, coin1 string) *pairAlreadyExists

func NewPairNotExists

func NewPairNotExists(coin0 string, coin1 string) *pairNotExists

func NewPeriodLimitReached

func NewPeriodLimitReached(next string, last string) *periodLimitReached

func NewPublicKeyInBlockList

func NewPublicKeyInBlockList(publicKey string) *publicKeyInBlockList

func NewStakeNotFound

func NewStakeNotFound(publicKey string, owner string, coinId string, coinSymbol string) *stakeNotFound

func NewStakeShouldBePositive

func NewStakeShouldBePositive(stake string) *stakeShouldBePositive

func NewTooBigStake

func NewTooBigStake(sender string, pubKey string, value string, coinId string, coinSymbol string) *tooBigStake

func NewTooHighGasPrice

func NewTooHighGasPrice(maxCheckGasPrice, currentGasPrice string) *tooHighGasPrice

func NewTooLargeOwnersList

func NewTooLargeOwnersList(countOwners string, maxCountOwners string) *tooLargeOwnersList

func NewTooLongNonce

func NewTooLongNonce(nonceBytes string, maxNonceBytes string) *tooLongNonce

func NewTooLowGasPrice

func NewTooLowGasPrice(minGasPrice string, gotGasPrice string) *tooLowGasPrice

func NewTooLowStake

func NewTooLowStake(sender string, pubKey string, value string, coinId string, coinSymbol string) *tooLowStake

func NewTxFromSenderAlreadyInMempool

func NewTxFromSenderAlreadyInMempool(sender string, block string) *txFromSenderAlreadyInMempool

func NewTxPayloadTooLarge

func NewTxPayloadTooLarge(maxPayloadLength string, gotPayloadLength string) *txPayloadTooLarge

func NewTxServiceDataTooLarge

func NewTxServiceDataTooLarge(maxServiceDataLength string, gotServiceDataLength string) *txServiceDataTooLarge

func NewTxTooLarge

func NewTxTooLarge(maxTxLength string, gotTxLength string) *txTooLarge

func NewUnbondBlocked

func NewUnbondBlocked(height string) *unbondBlocked

func NewVoteAlreadyExists

func NewVoteAlreadyExists(height string, pubkey string) *voteAlreadyExists

func NewVoteExpired

func NewVoteExpired(block string, current string) *voteExpired

func NewWrongChainID

func NewWrongChainID(currentChainId string, gotChainId string) *wrongChainID

func NewWrongCoinEmission

func NewWrongCoinEmission(minCoinSupply string, maxCoinSupply string, coinSupply string, addAmount, subAmount string) *wrongCoinEmission

func NewWrongCoinSupply

func NewWrongCoinSupply(minCoinSupply string, maxCoinSupply string, currentCoinSupply string, minInitialReserve string, currentInitialReserve string, initialAmount string) *wrongCoinSupply

func NewWrongCommission

func NewWrongCommission(got string, min string, max string) *wrongCommission

func NewWrongCrr

func NewWrongCrr(min string, max string, got string) *wrongCrr

func NewWrongGasCoin

func NewWrongGasCoin(txCoinSymbol string, txCoinId string, checkGasCoinSymbol, checkGasCoinId string) *wrongGasCoin

func NewWrongNonce

func NewWrongNonce(expectedNonce string, gotNonce string) *wrongNonce

func NewWrongOrderPrice

func NewWrongOrderPrice(minPrice, maxPrice, orderPrice string) *wrongOrderPrice

func NewWrongOrderVolume

func NewWrongOrderVolume(v0, v1 string) *wrongOrderVolume

Types

This section is empty.

Jump to

Keyboard shortcuts

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