Skip to content

Commit

Permalink
Merge pull request #54 from bze-alphateam/upgrade/v7.2
Browse files Browse the repository at this point in the history
Upgrade/v7.2
  • Loading branch information
faneaatiku authored Feb 4, 2025
2 parents bf4be92 + 16b8a39 commit b93340f
Show file tree
Hide file tree
Showing 45 changed files with 3,073 additions and 512 deletions.
1 change: 1 addition & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,7 @@ func New(
app.RewardsKeeper.GetRemoveExpiredPendingTradingRewardsHook(),
app.RewardsKeeper.GetTradingRewardsDistributionHook(),
app.BurnerKeeper.GetBurnerRaffleCleanupHook(),
app.BurnerKeeper.GetBurnerPeriodicBurnHook(),
},
)

Expand Down
9 changes: 9 additions & 0 deletions docs/static/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34967,6 +34967,13 @@ definitions:
type: string
price:
type: string
bze.tradebin.v1.FillOrderItem:
type: object
properties:
price:
type: string
amount:
type: string
bze.tradebin.v1.HistoryOrder:
type: object
properties:
Expand Down Expand Up @@ -35000,6 +35007,8 @@ definitions:
type: object
bze.tradebin.v1.MsgCreateOrderResponse:
type: object
bze.tradebin.v1.MsgFillOrdersResponse:
type: object
bze.tradebin.v1.Order:
type: object
properties:
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ require (
replace (
github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
github.com/grpc-ecosystem/grpc-gateway/v2 => github.com/grpc-ecosystem/grpc-gateway/v2 v2.21.0
github.com/tendermint/tendermint => github.com/cometbft/cometbft v0.34.27
google.golang.org/grpc => google.golang.org/grpc v1.33.2
)
4 changes: 4 additions & 0 deletions proto/tradebin/events.proto
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ message OrderExecutedEvent {
string order_type = 3;
string amount = 4;
string price = 5;
string maker = 6;
string taker = 7;
}

message OrderCanceledEvent {
Expand All @@ -40,6 +42,7 @@ message OrderCanceledEvent {
string order_type = 3;
string amount = 4;
string price = 5;
string owner = 6;
}

message OrderSavedEvent {
Expand All @@ -48,4 +51,5 @@ message OrderSavedEvent {
string order_type = 3;
string amount = 4;
string price = 5;
string owner = 6;
}
15 changes: 15 additions & 0 deletions proto/tradebin/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ service Msg {
rpc CreateMarket(MsgCreateMarket) returns (MsgCreateMarketResponse);
rpc CreateOrder(MsgCreateOrder) returns (MsgCreateOrderResponse);
rpc CancelOrder(MsgCancelOrder) returns (MsgCancelOrderResponse);
rpc FillOrders(MsgFillOrders) returns (MsgFillOrdersResponse);
// this line is used by starport scaffolding # proto/tx/rpc
}

Expand Down Expand Up @@ -43,4 +44,18 @@ message MsgCancelOrder {
message MsgCancelOrderResponse {
}

message FillOrderItem {
string price = 1;
string amount = 2;
}

message MsgFillOrders {
string creator = 1;
string marketId = 2;
string order_type = 3;
repeated FillOrderItem orders = 4;
}

message MsgFillOrdersResponse {}

// this line is used by starport scaffolding # proto/tx/message
1 change: 1 addition & 0 deletions testutil/simapp/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,7 @@ func New(
app.RewardsKeeper.GetRemoveExpiredPendingTradingRewardsHook(),
app.RewardsKeeper.GetTradingRewardsDistributionHook(),
app.BurnerKeeper.GetBurnerRaffleCleanupHook(),
app.BurnerKeeper.GetBurnerPeriodicBurnHook(),
},
)

Expand Down
32 changes: 16 additions & 16 deletions vue/src/store/generated/bze-alphateam/bze/bze.scavenge/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,18 +232,18 @@ export default {
},


async sendMsgRevealSolution({ rootGetters }, { value, fee = [], memo = '' }) {
async sendMsgSubmitScavenge({ rootGetters }, { value, fee = [], memo = '' }) {
try {
const txClient=await initTxClient(rootGetters)
const msg = await txClient.msgRevealSolution(value)
const msg = await txClient.msgSubmitScavenge(value)
const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee,
gas: "200000" }, memo})
return result
} catch (e) {
if (e == MissingWalletError) {
throw new Error('TxClient:MsgRevealSolution:Init Could not initialize signing client. Wallet is required.')
throw new Error('TxClient:MsgSubmitScavenge:Init Could not initialize signing client. Wallet is required.')
}else{
throw new Error('TxClient:MsgRevealSolution:Send Could not broadcast Tx: '+ e.message)
throw new Error('TxClient:MsgSubmitScavenge:Send Could not broadcast Tx: '+ e.message)
}
}
},
Expand All @@ -262,32 +262,32 @@ export default {
}
}
},
async sendMsgSubmitScavenge({ rootGetters }, { value, fee = [], memo = '' }) {
async sendMsgRevealSolution({ rootGetters }, { value, fee = [], memo = '' }) {
try {
const txClient=await initTxClient(rootGetters)
const msg = await txClient.msgSubmitScavenge(value)
const msg = await txClient.msgRevealSolution(value)
const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee,
gas: "200000" }, memo})
return result
} catch (e) {
if (e == MissingWalletError) {
throw new Error('TxClient:MsgSubmitScavenge:Init Could not initialize signing client. Wallet is required.')
throw new Error('TxClient:MsgRevealSolution:Init Could not initialize signing client. Wallet is required.')
}else{
throw new Error('TxClient:MsgSubmitScavenge:Send Could not broadcast Tx: '+ e.message)
throw new Error('TxClient:MsgRevealSolution:Send Could not broadcast Tx: '+ e.message)
}
}
},

async MsgRevealSolution({ rootGetters }, { value }) {
async MsgSubmitScavenge({ rootGetters }, { value }) {
try {
const txClient=await initTxClient(rootGetters)
const msg = await txClient.msgRevealSolution(value)
const msg = await txClient.msgSubmitScavenge(value)
return msg
} catch (e) {
if (e == MissingWalletError) {
throw new Error('TxClient:MsgRevealSolution:Init Could not initialize signing client. Wallet is required.')
throw new Error('TxClient:MsgSubmitScavenge:Init Could not initialize signing client. Wallet is required.')
} else{
throw new Error('TxClient:MsgRevealSolution:Create Could not create message: ' + e.message)
throw new Error('TxClient:MsgSubmitScavenge:Create Could not create message: ' + e.message)
}
}
},
Expand All @@ -304,16 +304,16 @@ export default {
}
}
},
async MsgSubmitScavenge({ rootGetters }, { value }) {
async MsgRevealSolution({ rootGetters }, { value }) {
try {
const txClient=await initTxClient(rootGetters)
const msg = await txClient.msgSubmitScavenge(value)
const msg = await txClient.msgRevealSolution(value)
return msg
} catch (e) {
if (e == MissingWalletError) {
throw new Error('TxClient:MsgSubmitScavenge:Init Could not initialize signing client. Wallet is required.')
throw new Error('TxClient:MsgRevealSolution:Init Could not initialize signing client. Wallet is required.')
} else{
throw new Error('TxClient:MsgSubmitScavenge:Create Could not create message: ' + e.message)
throw new Error('TxClient:MsgRevealSolution:Create Could not create message: ' + e.message)
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import { StdFee } from "@cosmjs/launchpad";
import { SigningStargateClient } from "@cosmjs/stargate";
import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing";
import { Api } from "./rest";
import { MsgRevealSolution } from "./types/scavenge/tx";
import { MsgCommitSolution } from "./types/scavenge/tx";
import { MsgSubmitScavenge } from "./types/scavenge/tx";
import { MsgCommitSolution } from "./types/scavenge/tx";
import { MsgRevealSolution } from "./types/scavenge/tx";


const types = [
["/bze.scavenge.MsgRevealSolution", MsgRevealSolution],
["/bze.scavenge.MsgCommitSolution", MsgCommitSolution],
["/bze.scavenge.MsgSubmitScavenge", MsgSubmitScavenge],
["/bze.scavenge.MsgCommitSolution", MsgCommitSolution],
["/bze.scavenge.MsgRevealSolution", MsgRevealSolution],

];
export const MissingWalletError = new Error("wallet is required");
Expand Down Expand Up @@ -45,9 +45,9 @@ const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions =

return {
signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo),
msgRevealSolution: (data: MsgRevealSolution): EncodeObject => ({ typeUrl: "/bze.scavenge.MsgRevealSolution", value: MsgRevealSolution.fromPartial( data ) }),
msgCommitSolution: (data: MsgCommitSolution): EncodeObject => ({ typeUrl: "/bze.scavenge.MsgCommitSolution", value: MsgCommitSolution.fromPartial( data ) }),
msgSubmitScavenge: (data: MsgSubmitScavenge): EncodeObject => ({ typeUrl: "/bze.scavenge.MsgSubmitScavenge", value: MsgSubmitScavenge.fromPartial( data ) }),
msgCommitSolution: (data: MsgCommitSolution): EncodeObject => ({ typeUrl: "/bze.scavenge.MsgCommitSolution", value: MsgCommitSolution.fromPartial( data ) }),
msgRevealSolution: (data: MsgRevealSolution): EncodeObject => ({ typeUrl: "/bze.scavenge.MsgRevealSolution", value: MsgRevealSolution.fromPartial( data ) }),

};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,33 +217,33 @@ export default {
}
}
},
async sendMsgSetDenomMetadata({ rootGetters }, { value, fee = [], memo = '' }) {
async sendMsgChangeAdmin({ rootGetters }, { value, fee = [], memo = '' }) {
try {
const txClient=await initTxClient(rootGetters)
const msg = await txClient.msgSetDenomMetadata(value)
const msg = await txClient.msgChangeAdmin(value)
const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee,
gas: "200000" }, memo})
return result
} catch (e) {
if (e == MissingWalletError) {
throw new Error('TxClient:MsgSetDenomMetadata:Init Could not initialize signing client. Wallet is required.')
throw new Error('TxClient:MsgChangeAdmin:Init Could not initialize signing client. Wallet is required.')
}else{
throw new Error('TxClient:MsgSetDenomMetadata:Send Could not broadcast Tx: '+ e.message)
throw new Error('TxClient:MsgChangeAdmin:Send Could not broadcast Tx: '+ e.message)
}
}
},
async sendMsgChangeAdmin({ rootGetters }, { value, fee = [], memo = '' }) {
async sendMsgSetDenomMetadata({ rootGetters }, { value, fee = [], memo = '' }) {
try {
const txClient=await initTxClient(rootGetters)
const msg = await txClient.msgChangeAdmin(value)
const msg = await txClient.msgSetDenomMetadata(value)
const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee,
gas: "200000" }, memo})
return result
} catch (e) {
if (e == MissingWalletError) {
throw new Error('TxClient:MsgChangeAdmin:Init Could not initialize signing client. Wallet is required.')
throw new Error('TxClient:MsgSetDenomMetadata:Init Could not initialize signing client. Wallet is required.')
}else{
throw new Error('TxClient:MsgChangeAdmin:Send Could not broadcast Tx: '+ e.message)
throw new Error('TxClient:MsgSetDenomMetadata:Send Could not broadcast Tx: '+ e.message)
}
}
},
Expand Down Expand Up @@ -287,29 +287,29 @@ export default {
}
}
},
async MsgSetDenomMetadata({ rootGetters }, { value }) {
async MsgChangeAdmin({ rootGetters }, { value }) {
try {
const txClient=await initTxClient(rootGetters)
const msg = await txClient.msgSetDenomMetadata(value)
const msg = await txClient.msgChangeAdmin(value)
return msg
} catch (e) {
if (e == MissingWalletError) {
throw new Error('TxClient:MsgSetDenomMetadata:Init Could not initialize signing client. Wallet is required.')
throw new Error('TxClient:MsgChangeAdmin:Init Could not initialize signing client. Wallet is required.')
} else{
throw new Error('TxClient:MsgSetDenomMetadata:Create Could not create message: ' + e.message)
throw new Error('TxClient:MsgChangeAdmin:Create Could not create message: ' + e.message)
}
}
},
async MsgChangeAdmin({ rootGetters }, { value }) {
async MsgSetDenomMetadata({ rootGetters }, { value }) {
try {
const txClient=await initTxClient(rootGetters)
const msg = await txClient.msgChangeAdmin(value)
const msg = await txClient.msgSetDenomMetadata(value)
return msg
} catch (e) {
if (e == MissingWalletError) {
throw new Error('TxClient:MsgChangeAdmin:Init Could not initialize signing client. Wallet is required.')
throw new Error('TxClient:MsgSetDenomMetadata:Init Could not initialize signing client. Wallet is required.')
} else{
throw new Error('TxClient:MsgChangeAdmin:Create Could not create message: ' + e.message)
throw new Error('TxClient:MsgSetDenomMetadata:Create Could not create message: ' + e.message)
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ import { Api } from "./rest";
import { MsgCreateDenom } from "./types/tokenfactory/tx";
import { MsgMint } from "./types/tokenfactory/tx";
import { MsgBurn } from "./types/tokenfactory/tx";
import { MsgSetDenomMetadata } from "./types/tokenfactory/tx";
import { MsgChangeAdmin } from "./types/tokenfactory/tx";
import { MsgSetDenomMetadata } from "./types/tokenfactory/tx";


const types = [
["/bze.tokenfactory.v1.MsgCreateDenom", MsgCreateDenom],
["/bze.tokenfactory.v1.MsgMint", MsgMint],
["/bze.tokenfactory.v1.MsgBurn", MsgBurn],
["/bze.tokenfactory.v1.MsgSetDenomMetadata", MsgSetDenomMetadata],
["/bze.tokenfactory.v1.MsgChangeAdmin", MsgChangeAdmin],
["/bze.tokenfactory.v1.MsgSetDenomMetadata", MsgSetDenomMetadata],

];
export const MissingWalletError = new Error("wallet is required");
Expand Down Expand Up @@ -52,8 +52,8 @@ const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions =
msgCreateDenom: (data: MsgCreateDenom): EncodeObject => ({ typeUrl: "/bze.tokenfactory.v1.MsgCreateDenom", value: MsgCreateDenom.fromPartial( data ) }),
msgMint: (data: MsgMint): EncodeObject => ({ typeUrl: "/bze.tokenfactory.v1.MsgMint", value: MsgMint.fromPartial( data ) }),
msgBurn: (data: MsgBurn): EncodeObject => ({ typeUrl: "/bze.tokenfactory.v1.MsgBurn", value: MsgBurn.fromPartial( data ) }),
msgSetDenomMetadata: (data: MsgSetDenomMetadata): EncodeObject => ({ typeUrl: "/bze.tokenfactory.v1.MsgSetDenomMetadata", value: MsgSetDenomMetadata.fromPartial( data ) }),
msgChangeAdmin: (data: MsgChangeAdmin): EncodeObject => ({ typeUrl: "/bze.tokenfactory.v1.MsgChangeAdmin", value: MsgChangeAdmin.fromPartial( data ) }),
msgSetDenomMetadata: (data: MsgSetDenomMetadata): EncodeObject => ({ typeUrl: "/bze.tokenfactory.v1.MsgSetDenomMetadata", value: MsgSetDenomMetadata.fromPartial( data ) }),

};
};
Expand Down
Loading

0 comments on commit b93340f

Please sign in to comment.