Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General enhancements and fix #1 #16

Closed
wants to merge 2 commits into from
Closed
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
5 changes: 4 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ src/types
project.yaml

# dotenv files
.env*
.env.sample
.env.development
.env.production
.env.test

# not needed
docs
Expand Down
5 changes: 4 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
"trailingComma": "es5",
"tabWidth": 2,
"singleQuote": false,
"bracketSpacing": false
"bracketSpacing": false,
"semi": true,
"quoteProps": "consistent",
"jsxSingleQuote": false
}
1 change: 1 addition & 0 deletions docker-compose.development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ services:
- ./src:/app/src
- ignore_types:/app/src/types
command:
- ${SUBQUERY_NODE_EXTRA_PARAMS:-}
- --unfinalized-blocks=true
healthcheck:
test: ["CMD", "curl", "-f", "http://subquery-node:3000/ready"]
Expand Down
4 changes: 2 additions & 2 deletions docker/pgadmin/servers.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"DefaultServers": {
"Servers": {
"1": {
"Name": "[email protected]",
"Name": "Pocketdex",
"Group": "Localnet",
"Host": "postgres",
"Port": 5432,
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,18 @@
"eslint-plugin-jest": "^27.2.3",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-sort-destructure-keys": "^1.4.0",
"lodash": "^4.17.21",
"nodemon": "^3.1.4",
"prettier": "^2.5.1",
"pretty-quick": "^3.1.3",
"typescript": "^5.2.2"
},
"dependencies": {
"@subql/node-cosmos": "4.0.1",
"@subql/types-cosmos": "3.5.0",
"@subql/node-cosmos": "^4.1.1",
"@subql/types-cosmos": "^3.5.2",
"@types/json-bigint": "^1.0.4",
"@types/node": "^22.0.0",
"json-bigint": "^1.0.0",
"pino": "^7.8.0",
"ts-proto": "^1.112.1",
"tslib": "^2.3.1"
Expand Down
25 changes: 19 additions & 6 deletions proto/cosmos/base/v1beta1/coin.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ message Coin {
string denom = 1;
string amount = 2 [
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "Int",
(gogoproto.customtype) = "cosmossdk.io/math.Int",
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true
];
Expand All @@ -33,16 +33,29 @@ message DecCoin {
option (gogoproto.equal) = true;

string denom = 1;
string amount = 2
[(cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "Dec", (gogoproto.nullable) = false];
string amount = 2 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
}

// IntProto defines a Protobuf wrapper around an Int object.
// Deprecated: Prefer to use math.Int directly. It supports binary Marshal and Unmarshal.
message IntProto {
string int = 1 [(cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "Int", (gogoproto.nullable) = false];
string int = 1 [
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "cosmossdk.io/math.Int",
(gogoproto.nullable) = false
];
}

// DecProto defines a Protobuf wrapper around a Dec object.
// Deprecated: Prefer to use math.LegacyDec directly. It supports binary Marshal and Unmarshal.
message DecProto {
string dec = 1 [(cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "Dec", (gogoproto.nullable) = false];
}
string dec = 1 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
}
28 changes: 16 additions & 12 deletions proto/cosmos/gov/v1beta1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,27 @@ package cosmos.gov.v1beta1;

import "gogoproto/gogo.proto";
import "cosmos/gov/v1beta1/gov.proto";
import "amino/amino.proto";

option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types";
option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1";

// GenesisState defines the gov module's genesis state.
message GenesisState {
// starting_proposal_id is the ID of the starting proposal.
uint64 starting_proposal_id = 1 [(gogoproto.moretags) = "yaml:\"starting_proposal_id\""];
uint64 starting_proposal_id = 1;
// deposits defines all the deposits present at genesis.
repeated Deposit deposits = 2 [(gogoproto.castrepeated) = "Deposits", (gogoproto.nullable) = false];
repeated Deposit deposits = 2
[(gogoproto.castrepeated) = "Deposits", (gogoproto.nullable) = false, (amino.dont_omitempty) = true];
// votes defines all the votes present at genesis.
repeated Vote votes = 3 [(gogoproto.castrepeated) = "Votes", (gogoproto.nullable) = false];
repeated Vote votes = 3
[(gogoproto.castrepeated) = "Votes", (gogoproto.nullable) = false, (amino.dont_omitempty) = true];
// proposals defines all the proposals present at genesis.
repeated Proposal proposals = 4 [(gogoproto.castrepeated) = "Proposals", (gogoproto.nullable) = false];
// params defines all the paramaters of related to deposit.
DepositParams deposit_params = 5 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"deposit_params\""];
// params defines all the paramaters of related to voting.
VotingParams voting_params = 6 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"voting_params\""];
// params defines all the paramaters of related to tally.
TallyParams tally_params = 7 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"tally_params\""];
}
repeated Proposal proposals = 4
[(gogoproto.castrepeated) = "Proposals", (gogoproto.nullable) = false, (amino.dont_omitempty) = true];
// deposit_params defines all the parameters related to deposit.
DepositParams deposit_params = 5 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
// voting_params defines all the parameters related to voting.
VotingParams voting_params = 6 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
// tally_params defines all the parameters related to tally.
TallyParams tally_params = 7 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
}
Loading