-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* replace nft module and update funds allocating * forbid to withdraw allocated tokens * update queries * admin vesting * test vesting * update nft staking * nft staking * remove useless logs * add amount field to delegation * update accumulator proto
- Loading branch information
1 parent
03a0140
commit 234dfc8
Showing
122 changed files
with
9,384 additions
and
12,516 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
syntax = "proto3"; | ||
package cosmos.accumulator; | ||
|
||
import "google/protobuf/any.proto"; | ||
import "cosmos/base/query/v1beta1/pagination.proto"; | ||
import "google/api/annotations.proto"; | ||
import "gogoproto/gogo.proto"; | ||
import "cosmos/base/v1beta1/coin.proto"; | ||
|
||
option go_package = "github.com/cosmos/cosmos-sdk/x/accumulator/types"; | ||
|
||
message Admin { | ||
string address = 1; | ||
|
||
int64 vesting_period = 2; | ||
|
||
cosmos.base.v1beta1.Coin reward_per_period = 3 [(gogoproto.nullable) = false]; | ||
|
||
int64 vesting_periods_count = 4; | ||
|
||
int64 last_vesting_time = 5; | ||
|
||
int64 vesting_counter = 6; | ||
|
||
string denom = 7; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
syntax = "proto3"; | ||
package accumulator; | ||
package cosmos.accumulator; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "cosmos/accumulator/params.proto"; | ||
import "cosmos/accumulator/admin.proto"; | ||
|
||
// this line is used by starport scaffolding # genesis/proto/import | ||
|
||
option go_package = "github.com/cosmos/cosmos-sdk/x/accumulator/types"; | ||
|
||
// GenesisState defines the bruhaccumulator module's genesis state. | ||
// GenesisState defines the accumulator module's genesis state. | ||
message GenesisState { | ||
Params params = 1 [(gogoproto.nullable) = false]; | ||
repeated cosmos.accumulator.Admin admins = 2 [(gogoproto.nullable) = false]; | ||
|
||
// this line is used by starport scaffolding # genesis/proto/state | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
syntax = "proto3"; | ||
package cosmos.nft; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "cosmos/nft/params.proto"; | ||
import "cosmos/nft/nft.proto"; | ||
|
||
|
||
// this line is used by starport scaffolding # genesis/proto/import | ||
|
||
option go_package = "github.com/cosmos/cosmos-sdk/x/nft/types"; | ||
|
||
// GenesisState defines the nft module's genesis state. | ||
message GenesisState { | ||
Params params = 1 [(gogoproto.nullable) = false]; | ||
repeated cosmos.nft.NFT nfts = 2 [(gogoproto.nullable) = false]; | ||
|
||
// this line is used by starport scaffolding # genesis/proto/state | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
syntax = "proto3"; | ||
package cosmos.nft; | ||
|
||
import "google/protobuf/any.proto"; | ||
import "cosmos/base/query/v1beta1/pagination.proto"; | ||
import "google/api/annotations.proto"; | ||
import "gogoproto/gogo.proto"; | ||
import "cosmos/base/v1beta1/coin.proto"; | ||
|
||
option go_package = "github.com/cosmos/cosmos-sdk/x/nft/types"; | ||
|
||
// NFT defines the NFT. | ||
message NFT { | ||
string address = 1; | ||
|
||
string owner = 2; | ||
|
||
string uri = 3; | ||
|
||
int64 vesting_period = 4; | ||
|
||
cosmos.base.v1beta1.Coin reward_per_period = 5 [(gogoproto.nullable) = false]; | ||
|
||
int64 vesting_periods_count = 6; | ||
|
||
cosmos.base.v1beta1.Coin available_to_withdraw = 7 [(gogoproto.nullable) = false]; | ||
|
||
int64 last_vesting_time = 8; | ||
|
||
int64 vesting_counter = 9; | ||
|
||
string denom = 10; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
syntax = "proto3"; | ||
package cosmos.nft; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "cosmos/nft/nft.proto"; | ||
|
||
option go_package = "github.com/cosmos/cosmos-sdk/x/nft/types"; | ||
|
||
// Params defines the parameters for the module. | ||
message Params { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
|
||
// this line is used by starport scaffolding # | ||
syntax = "proto3"; | ||
package cosmos.nft; | ||
import "google/api/annotations.proto"; | ||
|
||
|
||
import "gogoproto/gogo.proto"; | ||
import "cosmos/nft/params.proto"; | ||
import "cosmos/base/query/v1beta1/pagination.proto"; | ||
import "google/protobuf/any.proto"; | ||
import "cosmos/nft/nft.proto"; | ||
|
||
option go_package = "github.com/cosmos/cosmos-sdk/x/nft/types"; | ||
|
||
// Query defines the gRPC querier service. | ||
service Query { | ||
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { | ||
option (google.api.http).get = "/cosmos/nft/params"; | ||
} | ||
|
||
rpc GetNFTByAddress(QueryNFTByAddress) returns (QueryNFTByAddressResponse) { | ||
option (google.api.http).get = "/cosmos/nft/{address}"; | ||
} | ||
} | ||
|
||
// QueryParamsRequest is request type for the Query/Params RPC method. | ||
message QueryParamsRequest {} | ||
|
||
// QueryParamsResponse is response type for the Query/Params RPC method. | ||
message QueryParamsResponse { | ||
// params holds all the parameters of this module. | ||
Params params = 1 [(gogoproto.nullable) = false]; | ||
} | ||
|
||
message QueryNFTByAddress { | ||
string address = 1; // address of nft | ||
} | ||
|
||
message QueryNFTByAddressResponse { | ||
cosmos.nft.NFT nft = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
syntax = "proto3"; | ||
package cosmos.nft; | ||
|
||
import "cosmos/base/v1beta1/coin.proto"; | ||
import "google/protobuf/timestamp.proto"; | ||
import "gogoproto/gogo.proto"; | ||
import "cosmos/nft/params.proto"; | ||
import "google/protobuf/any.proto"; | ||
|
||
// this line is used by starport scaffolding # proto/tx/import | ||
option go_package = "github.com/cosmos/cosmos-sdk/x/nft/types"; | ||
|
||
// Msg defines the Msg service. | ||
service Msg { | ||
// Balance queries the number of NFTs of a given class owned by the owner, same as balanceOf in ERC721 | ||
rpc Undelegate(MsgUndelegate) returns (MsgUndelegateResponse); | ||
|
||
rpc Delegate(MsgDelegate) returns (MsgDelegateResponse); | ||
|
||
// Class queries an NFT class based on its id | ||
rpc Send(MsgSend) returns (MsgSendResponse); | ||
|
||
rpc Withdraw (MsgWithdrawal) returns (MsgWithdrawalResponse); | ||
|
||
rpc Redelegate ( MsgRedelegate) returns (MsgRedelegateResponse); | ||
} | ||
|
||
message MsgWithdrawal { | ||
string creator = 1; | ||
string address = 2; | ||
cosmos.base.v1beta1.Coin amount = 5 [(gogoproto.nullable) = false]; | ||
|
||
} | ||
|
||
message MsgWithdrawalResponse {} | ||
|
||
message MsgDelegate { | ||
string creator = 1; | ||
string address = 2; | ||
string validator = 3; | ||
cosmos.base.v1beta1.Coin amount = 5 [(gogoproto.nullable) = false]; | ||
} | ||
|
||
message MsgDelegateResponse {} | ||
|
||
message MsgUndelegate { | ||
string creator = 1; | ||
string address = 2; | ||
string validator = 3; | ||
cosmos.base.v1beta1.Coin amount = 5 [(gogoproto.nullable) = false]; | ||
|
||
} | ||
|
||
message MsgUndelegateResponse {} | ||
|
||
message MsgSend { | ||
string creator = 1; | ||
string address = 2; | ||
string recipient = 3; | ||
cosmos.base.v1beta1.Coin amount = 5 [(gogoproto.nullable) = false]; | ||
} | ||
|
||
message MsgSendResponse {} | ||
|
||
message MsgRedelegate { | ||
string creator = 1; | ||
string address = 2; | ||
string validatorSrc = 3; | ||
string validatorNew = 4; | ||
cosmos.base.v1beta1.Coin amount = 5 [(gogoproto.nullable) = false]; | ||
} | ||
|
||
message MsgRedelegateResponse {} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.