Skip to content

Commit

Permalink
Merge pull request #287 from public-awesome/prepare-v1.4-release
Browse files Browse the repository at this point in the history
Prepare v1.4 release
  • Loading branch information
jhernandezb authored May 4, 2023
2 parents 603359d + f6d65d4 commit 3194311
Show file tree
Hide file tree
Showing 8 changed files with 166 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion contracts/marketplace/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sg-marketplace"
version = "1.3.0"
version = "1.4.0"
authors = [
"Shane Vitarana <[email protected]>",
"Jake Hartnell <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion contracts/marketplace/schema/sg-marketplace.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"contract_name": "sg-marketplace",
"contract_version": "1.3.0",
"contract_version": "1.4.0",
"idl_version": "1.0.0",
"instantiate": {
"$schema": "http://json-schema.org/draft-07/schema#",
Expand Down
2 changes: 1 addition & 1 deletion types/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stargazezone/marketplace-types",
"version": "1.0.0",
"version": "1.4.0",
"description": "Types for Stargaze Marketplace",
"main": "build/codegen.js",
"scripts": {
Expand Down
66 changes: 65 additions & 1 deletion types/src/Marketplace.client.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file was automatically generated by @cosmwasm/ts-codegen@0.24.0.
* This file was automatically generated by @cosmwasm/ts-codegen@0.26.0.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run the @cosmwasm/ts-codegen generate command to regenerate this file.
*/
Expand Down Expand Up @@ -619,6 +619,19 @@ export interface MarketplaceInterface extends MarketplaceReadOnlyInterface {
saleType: SaleType;
tokenId: number;
}, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
buyNow: ({
collection,
expires,
finder,
findersFeeBps,
tokenId
}: {
collection: string;
expires: Timestamp;
finder?: string;
findersFeeBps?: number;
tokenId: number;
}, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
removeBid: ({
collection,
tokenId
Expand All @@ -637,6 +650,15 @@ export interface MarketplaceInterface extends MarketplaceReadOnlyInterface {
finder?: string;
tokenId: number;
}, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
rejectBid: ({
bidder,
collection,
tokenId
}: {
bidder: string;
collection: string;
tokenId: number;
}, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
setCollectionBid: ({
collection,
expires,
Expand Down Expand Up @@ -707,8 +729,10 @@ export class MarketplaceClient extends MarketplaceQueryClient implements Marketp
this.removeAsk = this.removeAsk.bind(this);
this.updateAskPrice = this.updateAskPrice.bind(this);
this.setBid = this.setBid.bind(this);
this.buyNow = this.buyNow.bind(this);
this.removeBid = this.removeBid.bind(this);
this.acceptBid = this.acceptBid.bind(this);
this.rejectBid = this.rejectBid.bind(this);
this.setCollectionBid = this.setCollectionBid.bind(this);
this.removeCollectionBid = this.removeCollectionBid.bind(this);
this.acceptCollectionBid = this.acceptCollectionBid.bind(this);
Expand Down Expand Up @@ -807,6 +831,29 @@ export class MarketplaceClient extends MarketplaceQueryClient implements Marketp
}
}, fee, memo, funds);
};
buyNow = async ({
collection,
expires,
finder,
findersFeeBps,
tokenId
}: {
collection: string;
expires: Timestamp;
finder?: string;
findersFeeBps?: number;
tokenId: number;
}, fee: number | StdFee | "auto" = "auto", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
return await this.client.execute(this.sender, this.contractAddress, {
buy_now: {
collection,
expires,
finder,
finders_fee_bps: findersFeeBps,
token_id: tokenId
}
}, fee, memo, funds);
};
removeBid = async ({
collection,
tokenId
Expand Down Expand Up @@ -841,6 +888,23 @@ export class MarketplaceClient extends MarketplaceQueryClient implements Marketp
}
}, fee, memo, funds);
};
rejectBid = async ({
bidder,
collection,
tokenId
}: {
bidder: string;
collection: string;
tokenId: number;
}, fee: number | StdFee | "auto" = "auto", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
return await this.client.execute(this.sender, this.contractAddress, {
reject_bid: {
bidder,
collection,
token_id: tokenId
}
}, fee, memo, funds);
};
setCollectionBid = async ({
collection,
expires,
Expand Down
82 changes: 81 additions & 1 deletion types/src/Marketplace.message-composer.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file was automatically generated by @cosmwasm/ts-codegen@0.24.0.
* This file was automatically generated by @cosmwasm/ts-codegen@0.26.0.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run the @cosmwasm/ts-codegen generate command to regenerate this file.
*/
Expand Down Expand Up @@ -61,6 +61,19 @@ export interface MarketplaceMessage {
saleType: SaleType;
tokenId: number;
}, funds?: Coin[]) => MsgExecuteContractEncodeObject;
buyNow: ({
collection,
expires,
finder,
findersFeeBps,
tokenId
}: {
collection: string;
expires: Timestamp;
finder?: string;
findersFeeBps?: number;
tokenId: number;
}, funds?: Coin[]) => MsgExecuteContractEncodeObject;
removeBid: ({
collection,
tokenId
Expand All @@ -79,6 +92,15 @@ export interface MarketplaceMessage {
finder?: string;
tokenId: number;
}, funds?: Coin[]) => MsgExecuteContractEncodeObject;
rejectBid: ({
bidder,
collection,
tokenId
}: {
bidder: string;
collection: string;
tokenId: number;
}, funds?: Coin[]) => MsgExecuteContractEncodeObject;
setCollectionBid: ({
collection,
expires,
Expand Down Expand Up @@ -146,8 +168,10 @@ export class MarketplaceMessageComposer implements MarketplaceMessage {
this.removeAsk = this.removeAsk.bind(this);
this.updateAskPrice = this.updateAskPrice.bind(this);
this.setBid = this.setBid.bind(this);
this.buyNow = this.buyNow.bind(this);
this.removeBid = this.removeBid.bind(this);
this.acceptBid = this.acceptBid.bind(this);
this.rejectBid = this.rejectBid.bind(this);
this.setCollectionBid = this.setCollectionBid.bind(this);
this.removeCollectionBid = this.removeCollectionBid.bind(this);
this.acceptCollectionBid = this.acceptCollectionBid.bind(this);
Expand Down Expand Up @@ -278,6 +302,37 @@ export class MarketplaceMessageComposer implements MarketplaceMessage {
})
};
};
buyNow = ({
collection,
expires,
finder,
findersFeeBps,
tokenId
}: {
collection: string;
expires: Timestamp;
finder?: string;
findersFeeBps?: number;
tokenId: number;
}, funds?: Coin[]): MsgExecuteContractEncodeObject => {
return {
typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContract",
value: MsgExecuteContract.fromPartial({
sender: this.sender,
contract: this.contractAddress,
msg: toUtf8(JSON.stringify({
buy_now: {
collection,
expires,
finder,
finders_fee_bps: findersFeeBps,
token_id: tokenId
}
})),
funds
})
};
};
removeBid = ({
collection,
tokenId
Expand Down Expand Up @@ -328,6 +383,31 @@ export class MarketplaceMessageComposer implements MarketplaceMessage {
})
};
};
rejectBid = ({
bidder,
collection,
tokenId
}: {
bidder: string;
collection: string;
tokenId: number;
}, funds?: Coin[]): MsgExecuteContractEncodeObject => {
return {
typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContract",
value: MsgExecuteContract.fromPartial({
sender: this.sender,
contract: this.contractAddress,
msg: toUtf8(JSON.stringify({
reject_bid: {
bidder,
collection,
token_id: tokenId
}
})),
funds
})
};
};
setCollectionBid = ({
collection,
expires,
Expand Down
16 changes: 15 additions & 1 deletion types/src/Marketplace.types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file was automatically generated by @cosmwasm/ts-codegen@0.24.0.
* This file was automatically generated by @cosmwasm/ts-codegen@0.26.0.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run the @cosmwasm/ts-codegen generate command to regenerate this file.
*/
Expand Down Expand Up @@ -57,6 +57,14 @@ export type ExecuteMsg = {
sale_type: SaleType;
token_id: number;
};
} | {
buy_now: {
collection: string;
expires: Timestamp;
finder?: string | null;
finders_fee_bps?: number | null;
token_id: number;
};
} | {
remove_bid: {
collection: string;
Expand All @@ -69,6 +77,12 @@ export type ExecuteMsg = {
finder?: string | null;
token_id: number;
};
} | {
reject_bid: {
bidder: string;
collection: string;
token_id: number;
};
} | {
set_collection_bid: {
collection: string;
Expand Down
2 changes: 1 addition & 1 deletion types/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file was automatically generated by @cosmwasm/ts-codegen@0.24.0.
* This file was automatically generated by @cosmwasm/ts-codegen@0.26.0.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run the @cosmwasm/ts-codegen generate command to regenerate this file.
*/
Expand Down

0 comments on commit 3194311

Please sign in to comment.