mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-27 00:35:18 +00:00
a4c5a13822
* bump SDK version to v0.38.2 * fix module.go and remove codespaces * fix coins Add() * fixes to handlers * migrate errors * more fixes * fixes fixes fixes * build * check for paramstore keytable * empty param validation function (TODO) * param validations * fix some tests * fix all tests * simulation fixes (WIP) * auction and bep3 sim refactor * fixes * bep3 sims fixes * auction and pricefeed fix * cdp sims fixes * fix tests * Update x/auction/keeper/auctions.go Co-Authored-By: Denali Marsh <denali@kava.io> * Update x/bep3/types/params.go Co-Authored-By: Denali Marsh <denali@kava.io> * Apply suggestions from code review Co-Authored-By: Denali Marsh <denali@kava.io> * Update x/bep3/keeper/swap.go Co-Authored-By: Denali Marsh <denali@kava.io> * address comments from review * address comments from review * fix: run sims * fix: implement marshal/unmarshal JSON for validator vesting account * fix: don't call set on sealed config * remove swap interface * add concepts spec * add state spec * add messages spec * update event names * implement swap expired event * add events spec * add params spec * add begin block spec * add module readme * update alias * revisions * aggregate expired swap ids for event emisison * markdown-link-check-disable for circleci * exclude api-endpoint links in Makefile Co-authored-by: Federico Kunze <federico.kunze94@gmail.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Kevin Davis <kjydavis3@gmail.com>
142 lines
6.9 KiB
Go
142 lines
6.9 KiB
Go
package bep3
|
|
|
|
import (
|
|
"github.com/kava-labs/kava/x/bep3/client/rest"
|
|
"github.com/kava-labs/kava/x/bep3/keeper"
|
|
"github.com/kava-labs/kava/x/bep3/types"
|
|
)
|
|
|
|
const (
|
|
AddrByteCount = types.AddrByteCount
|
|
AttributeKeyAmount = types.AttributeKeyAmount
|
|
AttributeKeyAtomicSwapID = types.AttributeKeyAtomicSwapID
|
|
AttributeKeyAtomicSwapIDs = types.AttributeKeyAtomicSwapIDs
|
|
AttributeKeyClaimSender = types.AttributeKeyClaimSender
|
|
AttributeKeyDirection = types.AttributeKeyDirection
|
|
AttributeKeyExpectedIncome = types.AttributeKeyExpectedIncome
|
|
AttributeKeyExpireHeight = types.AttributeKeyExpireHeight
|
|
AttributeKeyRandomNumber = types.AttributeKeyRandomNumber
|
|
AttributeKeyRandomNumberHash = types.AttributeKeyRandomNumberHash
|
|
AttributeKeyRecipient = types.AttributeKeyRecipient
|
|
AttributeKeyRefundSender = types.AttributeKeyRefundSender
|
|
AttributeKeySender = types.AttributeKeySender
|
|
AttributeKeySenderOtherChain = types.AttributeKeySenderOtherChain
|
|
AttributeKeyTimestamp = types.AttributeKeyTimestamp
|
|
AttributeValueCategory = types.AttributeValueCategory
|
|
CalcSwapID = types.CalcSwapID
|
|
ClaimAtomicSwap = types.ClaimAtomicSwap
|
|
Completed = types.Completed
|
|
CreateAtomicSwap = types.CreateAtomicSwap
|
|
DefaultLongtermStorageDuration = types.DefaultLongtermStorageDuration
|
|
DefaultParamspace = types.DefaultParamspace
|
|
DepositAtomicSwap = types.DepositAtomicSwap
|
|
EventTypeClaimAtomicSwap = types.EventTypeClaimAtomicSwap
|
|
EventTypeCreateAtomicSwap = types.EventTypeCreateAtomicSwap
|
|
EventTypeRefundAtomicSwap = types.EventTypeRefundAtomicSwap
|
|
EventTypeSwapsExpired = types.EventTypeSwapsExpired
|
|
Expired = types.Expired
|
|
INVALID = types.INVALID
|
|
Incoming = types.Incoming
|
|
Int64Size = types.Int64Size
|
|
MaxExpectedIncomeLength = types.MaxExpectedIncomeLength
|
|
MaxOtherChainAddrLength = types.MaxOtherChainAddrLength
|
|
ModuleName = types.ModuleName
|
|
NULL = types.NULL
|
|
Open = types.Open
|
|
Outgoing = types.Outgoing
|
|
QuerierRoute = types.QuerierRoute
|
|
QueryGetAssetSupply = types.QueryGetAssetSupply
|
|
QueryGetAtomicSwap = types.QueryGetAtomicSwap
|
|
QueryGetAtomicSwaps = types.QueryGetAtomicSwaps
|
|
QueryGetParams = types.QueryGetParams
|
|
RandomNumberHashLength = types.RandomNumberHashLength
|
|
RandomNumberLength = types.RandomNumberLength
|
|
RefundAtomicSwap = types.RefundAtomicSwap
|
|
RouterKey = types.RouterKey
|
|
StoreKey = types.StoreKey
|
|
SwapIDLength = types.SwapIDLength
|
|
)
|
|
|
|
var (
|
|
NewKeeper = keeper.NewKeeper
|
|
NewQuerier = keeper.NewQuerier
|
|
RegisterRoutes = rest.RegisterRoutes
|
|
BytesToHex = types.BytesToHex
|
|
CalculateRandomHash = types.CalculateRandomHash
|
|
CalculateSwapID = types.CalculateSwapID
|
|
DefaultGenesisState = types.DefaultGenesisState
|
|
DefaultParams = types.DefaultParams
|
|
ErrAssetNotActive = types.ErrAssetNotActive
|
|
ErrAssetNotSupported = types.ErrAssetNotSupported
|
|
ErrAssetSupplyNotFound = types.ErrAssetSupplyNotFound
|
|
ErrAtomicSwapAlreadyExists = types.ErrAtomicSwapAlreadyExists
|
|
ErrAtomicSwapNotFound = types.ErrAtomicSwapNotFound
|
|
ErrExceedsAvailableSupply = types.ErrExceedsAvailableSupply
|
|
ErrExceedsSupplyLimit = types.ErrExceedsSupplyLimit
|
|
ErrInvalidClaimSecret = types.ErrInvalidClaimSecret
|
|
ErrInvalidCurrentSupply = types.ErrInvalidCurrentSupply
|
|
ErrInvalidHeightSpan = types.ErrInvalidHeightSpan
|
|
ErrInvalidIncomingSupply = types.ErrInvalidIncomingSupply
|
|
ErrInvalidOutgoingSupply = types.ErrInvalidOutgoingSupply
|
|
ErrInvalidTimestamp = types.ErrInvalidTimestamp
|
|
ErrSwapNotClaimable = types.ErrSwapNotClaimable
|
|
ErrSwapNotRefundable = types.ErrSwapNotRefundable
|
|
GenerateSecureRandomNumber = types.GenerateSecureRandomNumber
|
|
GetAtomicSwapByHeightKey = types.GetAtomicSwapByHeightKey
|
|
HexToBytes = types.HexToBytes
|
|
NewAssetSupply = types.NewAssetSupply
|
|
NewAtomicSwap = types.NewAtomicSwap
|
|
NewGenesisState = types.NewGenesisState
|
|
NewMsgClaimAtomicSwap = types.NewMsgClaimAtomicSwap
|
|
NewMsgCreateAtomicSwap = types.NewMsgCreateAtomicSwap
|
|
NewMsgRefundAtomicSwap = types.NewMsgRefundAtomicSwap
|
|
NewParams = types.NewParams
|
|
NewQueryAssetSupply = types.NewQueryAssetSupply
|
|
NewQueryAtomicSwapByID = types.NewQueryAtomicSwapByID
|
|
NewQueryAtomicSwaps = types.NewQueryAtomicSwaps
|
|
NewSwapDirectionFromString = types.NewSwapDirectionFromString
|
|
NewSwapStatusFromString = types.NewSwapStatusFromString
|
|
ParamKeyTable = types.ParamKeyTable
|
|
RegisterCodec = types.RegisterCodec
|
|
Uint64FromBytes = types.Uint64FromBytes
|
|
Uint64ToBytes = types.Uint64ToBytes
|
|
|
|
// variable aliases
|
|
AbsoluteMaximumBlockLock = types.AbsoluteMaximumBlockLock
|
|
AbsoluteMinimumBlockLock = types.AbsoluteMinimumBlockLock
|
|
AssetSupplyKeyPrefix = types.AssetSupplyKeyPrefix
|
|
AtomicSwapByBlockPrefix = types.AtomicSwapByBlockPrefix
|
|
AtomicSwapCoinsAccAddr = types.AtomicSwapCoinsAccAddr
|
|
AtomicSwapKeyPrefix = types.AtomicSwapKeyPrefix
|
|
AtomicSwapLongtermStoragePrefix = types.AtomicSwapLongtermStoragePrefix
|
|
DefaultMaxBlockLock = types.DefaultMaxBlockLock
|
|
DefaultMinBlockLock = types.DefaultMinBlockLock
|
|
DefaultSupportedAssets = types.DefaultSupportedAssets
|
|
KeyBnbDeputyAddress = types.KeyBnbDeputyAddress
|
|
KeyMaxBlockLock = types.KeyMaxBlockLock
|
|
KeyMinBlockLock = types.KeyMinBlockLock
|
|
KeySupportedAssets = types.KeySupportedAssets
|
|
ModuleCdc = types.ModuleCdc
|
|
)
|
|
|
|
type (
|
|
Keeper = keeper.Keeper
|
|
AssetParam = types.AssetParam
|
|
AssetParams = types.AssetParams
|
|
AssetSupplies = types.AssetSupplies
|
|
AssetSupply = types.AssetSupply
|
|
AtomicSwap = types.AtomicSwap
|
|
AtomicSwaps = types.AtomicSwaps
|
|
GenesisState = types.GenesisState
|
|
MsgClaimAtomicSwap = types.MsgClaimAtomicSwap
|
|
MsgCreateAtomicSwap = types.MsgCreateAtomicSwap
|
|
MsgRefundAtomicSwap = types.MsgRefundAtomicSwap
|
|
Params = types.Params
|
|
QueryAssetSupply = types.QueryAssetSupply
|
|
QueryAtomicSwapByID = types.QueryAtomicSwapByID
|
|
QueryAtomicSwaps = types.QueryAtomicSwaps
|
|
SupplyKeeper = types.SupplyKeeper
|
|
SwapDirection = types.SwapDirection
|
|
SwapStatus = types.SwapStatus
|
|
)
|