Skip to content

Commit

Permalink
naming changed
Browse files Browse the repository at this point in the history
  • Loading branch information
Chandragupta Singh authored and Chandragupta Singh committed Jun 1, 2022
2 parents 5ec981e + 832d48a commit ac995b8
Show file tree
Hide file tree
Showing 15 changed files with 305 additions and 321 deletions.
4 changes: 2 additions & 2 deletions proto/comdex/asset/v1beta1/extendedPairVault.proto
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ message ExtendedPairVault {

string pair_name = 14 [ (gogoproto.moretags) = "yaml:\"pair_name\"" ];
bool asset_out_oracle_price = 15 [ (gogoproto.moretags) = "yaml:\"asset_out_oracle_price\"" ];
uint64 assset_out_price = 16 [
(gogoproto.moretags) = "yaml:\"assset_out_price\"" ];
uint64 asset_out_price = 16 [
(gogoproto.moretags) = "yaml:\"asset_out_price\"" ];

}
12 changes: 7 additions & 5 deletions proto/comdex/collector/v1beta1/collector.proto
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ message AssetIdToFeeCollected {
}
message AppIdToAssetCollectorMapping {
uint64 app_id = 1 [(gogoproto.moretags) = "yaml:\"app_id\""];
repeated AssetIdCollectorMappping asset_collector = 2 [(gogoproto.moretags) = "yaml:\"asset_collector\""];
repeated AssetIdCollectorMapping asset_collector = 2 [(gogoproto.moretags) = "yaml:\"asset_collector\""];
}

message AssetIdCollectorMappping {
message AssetIdCollectorMapping {
uint64 asset_id = 1 [(gogoproto.moretags) = "yaml:\"asset_id\""];
CollectorData collector = 2 [
(gogoproto.nullable) = false,
Expand All @@ -71,11 +71,13 @@ message CollectorLookupTable {
uint64 debt_threshold = 5 [
(gogoproto.moretags) = "yaml:\"debt_threshold\""];
string locker_saving_rate = 6 [
(gogoproto.moretags) = "yaml:\"locker_saving_rate\"",
(gogoproto.nullable) = false,
(gogoproto.moretags) = "yaml:\"locker_saving_rate\"",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec"];
uint64 lot_size = 7 [
(gogoproto.moretags) = "yaml:\"lot_size\""];
string bid_factor = 8 [
(gogoproto.nullable) = false,
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.moretags) = "yaml:\"bid_factor\""
];
Expand Down Expand Up @@ -122,6 +124,6 @@ message AssetIdToAuctionLookupTable {
bool is_debt_auction = 3 [(gogoproto.moretags) = "yaml:\"is_debt_auction\""];
bool is_auction_active = 4 [(gogoproto.moretags) = "yaml:\"is_auction_active\""];
bool asset_out_oracle_price = 15 [ (gogoproto.moretags) = "yaml:\"asset_out_oracle_price\"" ];
uint64 assset_out_price = 16 [
(gogoproto.moretags) = "yaml:\"assset_out_price\"" ];
uint64 asset_out_price = 16 [
(gogoproto.moretags) = "yaml:\"asset_out_price\"" ];
}
2 changes: 1 addition & 1 deletion proto/comdex/liquidation/v1beta1/locked_vault.proto
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ message LockedVault {
(gogoproto.moretags) = "yaml:\"current_collateralisation_ratio\""];

string collateral_to_be_auctioned = 15 [
(gogoproto.nullable) = false,
(gogoproto.customname) = "CollateralToBeAuctioned",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = true,
(gogoproto.moretags) = "yaml:\"collateral_to_be_auctioned\""];

google.protobuf.Timestamp liquidation_timestamp = 16 [
Expand Down
6 changes: 3 additions & 3 deletions x/asset/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ func NewCmdSubmitAddAssetMapingProposal() *cobra.Command {

func NewCmdSubmitAddExtendedPairsVaultProposal() *cobra.Command {
cmd := &cobra.Command{
Use: "add-pairs-vault [app_mapping_id] [pair_id] [liquidation_ratio] [stability_fee] [closing_fee] [liquidation_penalty] [draw_down_fee] [is_vault_active] [debt_cieling] [debt_floor] [is_psm_pair] [min_cr] [pair_name] [asset_out_oracle_price] [assset_out_price]",
Use: "add-pairs-vault [app_mapping_id] [pair_id] [liquidation_ratio] [stability_fee] [closing_fee] [liquidation_penalty] [draw_down_fee] [is_vault_active] [debt_cieling] [debt_floor] [is_psm_pair] [min_cr] [pair_name] [asset_out_oracle_price] [asset_out_price]",
Args: cobra.ExactArgs(15),
Short: "Add pairs vault",
RunE: func(cmd *cobra.Command, args []string) error {
Expand Down Expand Up @@ -949,7 +949,7 @@ func NewCmdSubmitAddExtendedPairsVaultProposal() *cobra.Command {
return err
}

assset_out_price, err := ParseUint64SliceFromString(args[14], ",")
asset_out_price, err := ParseUint64SliceFromString(args[14], ",")
if err != nil {
return err
}
Expand Down Expand Up @@ -1021,7 +1021,7 @@ func NewCmdSubmitAddExtendedPairsVaultProposal() *cobra.Command {
MinCr: newmin_cr,
PairName: pair_name[i],
AssetOutOraclePrice: newasset_out_oracle_price,
AsssetOutPrice: assset_out_price[i],
AssetOutPrice: asset_out_price[i],
})
}

Expand Down
6 changes: 3 additions & 3 deletions x/asset/keeper/pairs_vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func (k *Keeper) AddExtendedPairsVaultRecords(ctx sdk.Context, records ...types.
MinCr: msg.MinCr,
PairName: msg.PairName,
AssetOutOraclePrice: msg.AssetOutOraclePrice,
AsssetOutPrice: msg.AsssetOutPrice,
AssetOutPrice: msg.AssetOutPrice,
}

k.SetPairsVaultID(ctx, app.Id)
Expand Down Expand Up @@ -221,7 +221,7 @@ func (k *Keeper) WasmAddExtendedPairsVaultRecords(ctx sdk.Context, AppMappingId,
MinCr: MinCr,
PairName: PairName,
AssetOutOraclePrice: AssetOutOraclePrice,
AsssetOutPrice: AssetOutPrice,
AssetOutPrice: AssetOutPrice,
}

k.SetPairsVaultID(ctx, app.Id)
Expand Down Expand Up @@ -295,7 +295,7 @@ func (k *Keeper) WasmUpdateLsrInPairsVault(ctx sdk.Context, app_id, ex_pair_id u
ExtPairVaultData.MinCr = min_cr
ExtPairVaultData.PairName = data.PairName
ExtPairVaultData.AssetOutOraclePrice = data.AssetOutOraclePrice
ExtPairVaultData.AsssetOutPrice = data.AsssetOutPrice
ExtPairVaultData.AssetOutPrice = data.AssetOutPrice
}
}
if count == 0 {
Expand Down
108 changes: 54 additions & 54 deletions x/asset/types/extendedPairVault.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions x/auction/keeper/auction.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (k Keeper) checkStatusOfNetFeesCollectedAndStartAuction(ctx sdk.Context, ap
return auctiontypes.NoAuction, nil
}
//Mint the tokens when collector module sends tokens to user
err := k.StartDebtAuction(ctx, outflowToken, inflowToken, *collector.BidFactor, appId, assetId, assetInId, assetOutId)
err := k.StartDebtAuction(ctx, outflowToken, inflowToken, collector.BidFactor, appId, assetId, assetInId, assetOutId)
if err != nil {
break
}
Expand All @@ -80,7 +80,7 @@ func (k Keeper) checkStatusOfNetFeesCollectedAndStartAuction(ctx sdk.Context, ap
if err != nil {
return status, err
}
err = k.StartSurplusAuction(ctx, outflowToken, inflowToken, *collector.BidFactor, appId, assetId, assetInId, assetOutId)
err = k.StartSurplusAuction(ctx, outflowToken, inflowToken, collector.BidFactor, appId, assetId, assetInId, assetOutId)
if err != nil {
return status, err
}
Expand Down
10 changes: 5 additions & 5 deletions x/collector/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ func NewCmdLookupTableParams() *cobra.Command {
SecondaryAssetId: secondaryAssetId[i],
SurplusThreshold: surplusThreshold[i],
DebtThreshold: debtThreshold[i],
LockerSavingRate: &newLockerSavingRate,
LockerSavingRate: newLockerSavingRate,
LotSize: lotSize[i],
BidFactor: &newBidFactor,
BidFactor: newBidFactor,
})
}

Expand Down Expand Up @@ -156,7 +156,7 @@ func NewCmdLookupTableParams() *cobra.Command {
// NewCmdAuctionControlProposal cmd to update controls for auction params
func NewCmdAuctionControlProposal() *cobra.Command {
cmd := &cobra.Command{
Use: "auction-control [app-id] [asset_id] [surplus_auction] [debt_auction] [asset_out_oracle_price] [assset_out_price]",
Use: "auction-control [app-id] [asset_id] [surplus_auction] [debt_auction] [asset_out_oracle_price] [asset_out_price]",
Args: cobra.ExactArgs(6),
Short: "Set auction control",
RunE: func(cmd *cobra.Command, args []string) error {
Expand Down Expand Up @@ -185,7 +185,7 @@ func NewCmdAuctionControlProposal() *cobra.Command {
return err
}

assset_out_price, err := ParseUint64SliceFromString(args[5], ",")
asset_out_price, err := ParseUint64SliceFromString(args[5], ",")
if err != nil {
return err
}
Expand Down Expand Up @@ -215,7 +215,7 @@ func NewCmdAuctionControlProposal() *cobra.Command {
AssetIdToAuctionLookup.IsSurplusAuction = newSurplusAuction
AssetIdToAuctionLookup.IsDebtAuction = newDebtAuction
AssetIdToAuctionLookup.AssetOutOraclePrice = newasset_out_oracle_price
AssetIdToAuctionLookup.AsssetOutPrice = assset_out_price[i]
AssetIdToAuctionLookup.AssetOutPrice = asset_out_price[i]
collectorAuctionLookupRecords.AssetIdToAuctionLookup = append(collectorAuctionLookupRecords.AssetIdToAuctionLookup, AssetIdToAuctionLookup)
}

Expand Down
Loading

0 comments on commit ac995b8

Please sign in to comment.