Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/docs/statik/statik.go

Large diffs are not rendered by default.

43 changes: 37 additions & 6 deletions client/docs/swagger-ui/swagger-starname.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ paths:
title: >-
refund_escrow is the fee to be paid to refund the account
or domain placed in an escrow
complete_auction:
type: string
title: >-
complete_auction is the fee to be paid to complete an
auction
title: >-
Fees contains different type of fees to calculate coins to
detract when processing different messages
Expand Down Expand Up @@ -535,11 +540,15 @@ paths:
state.
- ESCROW_STATE_COMPLETED: ESCROW_STATE_COMPLETED defines a completed state.
- ESCROW_STATE_REFUNDED: ESCROW_STATE_REFUNDED defines a refunded state.
- ESCROW_STATE_EXPIRED: ESCROW_STATE_REFUNDED defines an expired state.
- ESCROW_STATE_EXPIRED: ESCROW_STATE_EXPIRED defines an expired escrow or an auction that can be completed.
title: EscrowState defines the state of an escrow
deadline:
type: string
format: uint64
is_auction:
type: boolean
last_bidder:
type: string
broker_address:
type: string
broker_commission:
Expand Down Expand Up @@ -978,11 +987,15 @@ paths:
state.
- ESCROW_STATE_COMPLETED: ESCROW_STATE_COMPLETED defines a completed state.
- ESCROW_STATE_REFUNDED: ESCROW_STATE_REFUNDED defines a refunded state.
- ESCROW_STATE_EXPIRED: ESCROW_STATE_REFUNDED defines an expired state.
- ESCROW_STATE_EXPIRED: ESCROW_STATE_EXPIRED defines an expired escrow or an auction that can be completed.
title: EscrowState defines the state of an escrow
deadline:
type: string
format: uint64
is_auction:
type: boolean
last_bidder:
type: string
broker_address:
type: string
broker_commission:
Expand Down Expand Up @@ -2945,6 +2958,9 @@ definitions:
title: >-
refund_escrow is the fee to be paid to refund the account or domain
placed in an escrow
complete_auction:
type: string
title: complete_auction is the fee to be paid to complete an auction
title: >-
Fees contains different type of fees to calculate coins to detract when
processing different messages
Expand Down Expand Up @@ -3173,6 +3189,9 @@ definitions:
title: >-
refund_escrow is the fee to be paid to refund the account or
domain placed in an escrow
complete_auction:
type: string
title: complete_auction is the fee to be paid to complete an auction
title: >-
Fees contains different type of fees to calculate coins to detract
when processing different messages
Expand Down Expand Up @@ -3388,11 +3407,15 @@ definitions:
- ESCROW_STATE_OPEN: ESCROW_STATE_OPEN defines an open state.
- ESCROW_STATE_COMPLETED: ESCROW_STATE_COMPLETED defines a completed state.
- ESCROW_STATE_REFUNDED: ESCROW_STATE_REFUNDED defines a refunded state.
- ESCROW_STATE_EXPIRED: ESCROW_STATE_REFUNDED defines an expired state.
- ESCROW_STATE_EXPIRED: ESCROW_STATE_EXPIRED defines an expired escrow or an auction that can be completed.
title: EscrowState defines the state of an escrow
deadline:
type: string
format: uint64
is_auction:
type: boolean
last_bidder:
type: string
broker_address:
type: string
broker_commission:
Expand All @@ -3410,7 +3433,7 @@ definitions:
- ESCROW_STATE_OPEN: ESCROW_STATE_OPEN defines an open state.
- ESCROW_STATE_COMPLETED: ESCROW_STATE_COMPLETED defines a completed state.
- ESCROW_STATE_REFUNDED: ESCROW_STATE_REFUNDED defines a refunded state.
- ESCROW_STATE_EXPIRED: ESCROW_STATE_REFUNDED defines an expired state.
- ESCROW_STATE_EXPIRED: ESCROW_STATE_EXPIRED defines an expired escrow or an auction that can be completed.
title: EscrowState defines the state of an escrow
starnamed.x.escrow.v1beta1.QueryEscrowResponse:
type: object
Expand Down Expand Up @@ -3623,11 +3646,15 @@ definitions:
- ESCROW_STATE_OPEN: ESCROW_STATE_OPEN defines an open state.
- ESCROW_STATE_COMPLETED: ESCROW_STATE_COMPLETED defines a completed state.
- ESCROW_STATE_REFUNDED: ESCROW_STATE_REFUNDED defines a refunded state.
- ESCROW_STATE_EXPIRED: ESCROW_STATE_REFUNDED defines an expired state.
- ESCROW_STATE_EXPIRED: ESCROW_STATE_EXPIRED defines an expired escrow or an auction that can be completed.
title: EscrowState defines the state of an escrow
deadline:
type: string
format: uint64
is_auction:
type: boolean
last_bidder:
type: string
broker_address:
type: string
broker_commission:
Expand Down Expand Up @@ -3851,11 +3878,15 @@ definitions:
- ESCROW_STATE_OPEN: ESCROW_STATE_OPEN defines an open state.
- ESCROW_STATE_COMPLETED: ESCROW_STATE_COMPLETED defines a completed state.
- ESCROW_STATE_REFUNDED: ESCROW_STATE_REFUNDED defines a refunded state.
- ESCROW_STATE_EXPIRED: ESCROW_STATE_REFUNDED defines an expired state.
- ESCROW_STATE_EXPIRED: ESCROW_STATE_EXPIRED defines an expired escrow or an auction that can be completed.
title: EscrowState defines the state of an escrow
deadline:
type: string
format: uint64
is_auction:
type: boolean
last_bidder:
type: string
broker_address:
type: string
broker_commission:
Expand Down
41 changes: 38 additions & 3 deletions docs/proto/proto-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
- [TestTimeConstrainedObject](#starnamed.x.escrow.v1beta1.TestTimeConstrainedObject)

- [iov/escrow/v1beta1/tx.proto](#iov/escrow/v1beta1/tx.proto)
- [MsgCompleteAuction](#starnamed.x.escrow.v1beta1.MsgCompleteAuction)
- [MsgCompleteAuctionResponse](#starnamed.x.escrow.v1beta1.MsgCompleteAuctionResponse)
- [MsgCreateEscrow](#starnamed.x.escrow.v1beta1.MsgCreateEscrow)
- [MsgCreateEscrowResponse](#starnamed.x.escrow.v1beta1.MsgCreateEscrowResponse)
- [MsgRefundEscrow](#starnamed.x.escrow.v1beta1.MsgRefundEscrow)
Expand Down Expand Up @@ -216,6 +218,7 @@ Fees contains different type of fees to calculate coins to detract when processi
| `update_escrow` | [string](#string) | | update_escrow is the fee to be paid to update an escrow |
| `transfer_to_escrow` | [string](#string) | | transfer_to_escrow is the fee to be paid to transfer coins to an escrow |
| `refund_escrow` | [string](#string) | | refund_escrow is the fee to be paid to refund the account or domain placed in an escrow |
| `complete_auction` | [string](#string) | | complete_auction is the fee to be paid to complete an auction |



Expand Down Expand Up @@ -408,11 +411,12 @@ EventCreatedEscrow is emitted when an escrow is created
| `id` | [string](#string) | | |
| `seller` | [string](#string) | | |
| `fee_payer` | [string](#string) | | |
| `broker_address` | [string](#string) | | |
| `broker_commission` | [string](#string) | | |
| `price` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | |
| `object` | [google.protobuf.Any](#google.protobuf.Any) | | |
| `deadline` | [uint64](#uint64) | | |
| `broker_address` | [string](#string) | | |
| `broker_commission` | [string](#string) | | |
| `is_auction` | [bool](#bool) | | |
| `fees` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | |


Expand Down Expand Up @@ -489,6 +493,8 @@ Escrow defines the struct of an escrow
| `price` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | TODO: refactor this to use sdk.Coin instead of sdk.Coins Although the price contains multiple coins, for now we enforce a specific denomination, so there will be only one coin type in a valid escrow |
| `state` | [EscrowState](#starnamed.x.escrow.v1beta1.EscrowState) | | |
| `deadline` | [uint64](#uint64) | | |
| `is_auction` | [bool](#bool) | | |
| `last_bidder` | [string](#string) | | |
| `broker_address` | [string](#string) | | |
| `broker_commission` | [string](#string) | | |

Expand All @@ -509,7 +515,7 @@ EscrowState defines the state of an escrow
| ESCROW_STATE_OPEN | 0 | ESCROW_STATE_OPEN defines an open state. |
| ESCROW_STATE_COMPLETED | 1 | ESCROW_STATE_COMPLETED defines a completed state. |
| ESCROW_STATE_REFUNDED | 2 | ESCROW_STATE_REFUNDED defines a refunded state. |
| ESCROW_STATE_EXPIRED | 3 | ESCROW_STATE_REFUNDED defines an expired state. |
| ESCROW_STATE_EXPIRED | 3 | ESCROW_STATE_EXPIRED defines an expired escrow or an auction that can be completed. |


<!-- end enums -->
Expand Down Expand Up @@ -733,6 +739,33 @@ TestTimeConstrainedObject defines a transferable object with a time constrain us



<a name="starnamed.x.escrow.v1beta1.MsgCompleteAuction"></a>

### MsgCompleteAuction



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `id` | [string](#string) | | |
| `sender` | [string](#string) | | |
| `fee_payer` | [string](#string) | | |






<a name="starnamed.x.escrow.v1beta1.MsgCompleteAuctionResponse"></a>

### MsgCompleteAuctionResponse







<a name="starnamed.x.escrow.v1beta1.MsgCreateEscrow"></a>

### MsgCreateEscrow
Expand All @@ -746,6 +779,7 @@ MsgCreateEscrow defines a message to create an escrow
| `object` | [google.protobuf.Any](#google.protobuf.Any) | | |
| `price` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | |
| `deadline` | [uint64](#uint64) | | |
| `is_auction` | [bool](#bool) | | |



Expand Down Expand Up @@ -869,6 +903,7 @@ Msg defines the escrow Msg service
| `UpdateEscrow` | [MsgUpdateEscrow](#starnamed.x.escrow.v1beta1.MsgUpdateEscrow) | [MsgUpdateEscrowResponse](#starnamed.x.escrow.v1beta1.MsgUpdateEscrowResponse) | UpdateEscrow defines a method for updating an escrow | |
| `TransferToEscrow` | [MsgTransferToEscrow](#starnamed.x.escrow.v1beta1.MsgTransferToEscrow) | [MsgTransferToEscrowResponse](#starnamed.x.escrow.v1beta1.MsgTransferToEscrowResponse) | TransferToEscrow defines a method for a buyer to transfer funds to the escrow | |
| `RefundEscrow` | [MsgRefundEscrow](#starnamed.x.escrow.v1beta1.MsgRefundEscrow) | [MsgRefundEscrowResponse](#starnamed.x.escrow.v1beta1.MsgRefundEscrowResponse) | RefundEscrow defines a method for the seller to return the assets locked in the escrow | |
| `CompleteAuction` | [MsgCompleteAuction](#starnamed.x.escrow.v1beta1.MsgCompleteAuction) | [MsgCompleteAuctionResponse](#starnamed.x.escrow.v1beta1.MsgCompleteAuctionResponse) | CompleteAuction defines a method to finish a completed auction | |

<!-- end services -->

Expand Down
6 changes: 6 additions & 0 deletions proto/iov/configuration/v1beta1/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,12 @@ message Fees {
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
];
// complete_auction is the fee to be paid to complete an auction
string complete_auction = 26 [
(gogoproto.moretags) = "yaml:\"complete_auction\"",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
];
}

// GenesisState - genesis state of x/configuration
Expand Down
19 changes: 10 additions & 9 deletions proto/iov/escrow/v1beta1/events.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,21 @@ message EventCreatedEscrow {
string id = 1;
string seller = 2;
string fee_payer= 3;
string broker_address= 4;
string broker_commission= 5 [
(gogoproto.nullable) = false,
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec"
];
repeated cosmos.base.v1beta1.Coin price = 6 [
repeated cosmos.base.v1beta1.Coin price = 4 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
google.protobuf.Any object = 7 [
google.protobuf.Any object = 5 [
(cosmos_proto.accepts_interface) = "TransferableObject"
];
uint64 deadline= 8;
repeated cosmos.base.v1beta1.Coin fees = 9 [
uint64 deadline= 6;
string broker_address= 7;
string broker_commission= 8 [
(gogoproto.nullable) = false,
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec"
];
bool is_auction = 9;
repeated cosmos.base.v1beta1.Coin fees = 10 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
Expand Down
12 changes: 12 additions & 0 deletions proto/iov/escrow/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ service Msg {

// RefundEscrow defines a method for the seller to return the assets locked in the escrow
rpc RefundEscrow(MsgRefundEscrow) returns (MsgRefundEscrowResponse);

// CompleteAuction defines a method to finish a completed auction
rpc CompleteAuction(MsgCompleteAuction) returns (MsgCompleteAuctionResponse);
}

// MsgCreateEscrow defines a message to create an escrow
Expand All @@ -31,6 +34,7 @@ message MsgCreateEscrow {
google.protobuf.Any object = 3 [ (cosmos_proto.accepts_interface) = "TransferableObject" ];
repeated cosmos.base.v1beta1.Coin price = 4 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ];
uint64 deadline = 5;
bool is_auction = 6;
}

// MsgCreateEscrowResponse defines the Msg/CreateEscrow response type
Expand Down Expand Up @@ -68,3 +72,11 @@ message MsgRefundEscrow {
}

message MsgRefundEscrowResponse {}

message MsgCompleteAuction {
string id = 1;
string sender = 2;
string fee_payer = 3;
}

message MsgCompleteAuctionResponse {}
9 changes: 6 additions & 3 deletions proto/iov/escrow/v1beta1/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ message Escrow {
repeated cosmos.base.v1beta1.Coin price = 4 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ];
EscrowState state = 5;
uint64 deadline = 6;
string broker_address = 7;
string broker_commission = 8 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false ];
bool is_auction = 7;
string last_bidder = 8;
string broker_address = 9;
string broker_commission = 10 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false ];


/*
uint64 timestamp = 9;*/
Expand All @@ -38,6 +41,6 @@ enum EscrowState {
ESCROW_STATE_COMPLETED = 1 [ (gogoproto.enumvalue_customname) = "Completed" ];
// ESCROW_STATE_REFUNDED defines a refunded state.
ESCROW_STATE_REFUNDED = 2 [ (gogoproto.enumvalue_customname) = "Refunded" ];
// ESCROW_STATE_REFUNDED defines an expired state.
// ESCROW_STATE_EXPIRED defines an expired escrow or an auction that can be completed.
ESCROW_STATE_EXPIRED = 3 [ (gogoproto.enumvalue_customname) = "Expired" ];
}
Loading