Skip to content

Commit

Permalink
Merge pull request #11 from pyramation/telescope-with-ica
Browse files Browse the repository at this point in the history
Telescope with ica
  • Loading branch information
pyramation authored Oct 12, 2022
2 parents a95f405 + 18ed7c5 commit fd3b502
Show file tree
Hide file tree
Showing 23 changed files with 2,171 additions and 71 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
path = cosmos-sdk-0.45
url = https://github.com/cosmos/cosmos-sdk
[submodule "wasmd-0.25"]
path = wasmd-0.25
path = wasmd-0.28
url = https://github.com/CosmWasm/wasmd.git
44 changes: 39 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,47 @@ and this project adheres to

## [Unreleased]

## [0.5.2] - 2022-10-11

- Migrate from yarn to npm
- Upgrade ts-proto to 1.126.1 and regenerate code
- Upgrade Cosmos SDK protos to 0.45.8
- Upgrade wasmd protos to 0.28.0
- Add ibc.applications.interchain_accounts types ([#36])

[#36]: https://github.com/confio/cosmjs-types/issues/36

## [0.5.1]

No changelog, sorry. Maybe the diff helps.

## [0.5.0]

No changelog, sorry. Maybe the diff helps.

## [0.4.1]

No changelog, sorry. Maybe the diff helps.

## [0.4.0]

No changelog, sorry. Maybe the diff helps.

## [0.3.0]

No changelog, sorry. Maybe the diff helps.

## [0.2.0] - 2021-07-29

### Added

- wasmd 0.18 types (cosmwasm/wasm/v1/*)
- wasmd 0.18 types (cosmwasm/wasm/v1/\*)

[unreleased]:
https://github.com/olivierlacan/keep-a-changelog/compare/v0.2.0...HEAD
[0.2.0]:
https://github.com/olivierlacan/keep-a-changelog/compare/v0.1.0...v0.2.0
[unreleased]: https://github.com/confio/cosmjs-types/compare/v0.5.2...HEAD
[0.5.2]: https://github.com/confio/cosmjs-types/compare/v0.5.1...v0.5.2
[0.5.1]: https://github.com/confio/cosmjs-types/compare/v0.5.0...v0.5.1
[0.5.0]: https://github.com/confio/cosmjs-types/compare/v0.4.1...v0.5.0
[0.4.1]: https://github.com/confio/cosmjs-types/compare/v0.4.0...v0.4.1
[0.4.0]: https://github.com/confio/cosmjs-types/compare/v0.3.0...v0.4.0
[0.3.0]: https://github.com/confio/cosmjs-types/compare/v0.2.0...v0.3.0
[0.2.0]: https://github.com/confio/cosmjs-types/compare/v0.1.0...v0.2.0
2 changes: 1 addition & 1 deletion cosmos-sdk-0.45
Submodule cosmos-sdk-0.45 updated 466 files
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cosmjs-types",
"version": "0.5.1",
"version": "0.5.2",
"description": "JS and TS types relating to Protocol Buffers used by Cosmos-SDK and other related projects",
"contributors": [
"Simon Warta <webmaster128@users.noreply.github.com>",
Expand Down
19 changes: 16 additions & 3 deletions scripts/codegen.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ const telescope = require('@osmonauts/telescope').default;

telescope({
protoDirs: [
'wasmd-0.25/proto',
'wasmd-0.25/third_party/proto',
'wasmd-0.28/proto',
'wasmd-0.28/third_party/proto',
'cosmos-sdk-0.45/proto',
'cosmos-sdk-0.45/third_party/proto'
],
Expand All @@ -32,7 +32,20 @@ telescope({
'ibc/core/port/v1/query.proto',
'ibc/lightclients/solomachine/v2/solomachine.proto',
'tendermint/libs/bits/types.proto',
'google/api/httpbody.proto'
'google/api/httpbody.proto',
'tendermint/blockchain/types.proto',
'tendermint/consensus/types.proto',
'tendermint/consensus/wal.proto',
'tendermint/mempool/types.proto',
'tendermint/p2p/conn.proto',
'tendermint/p2p/pex.proto',
'tendermint/privval/types.proto',
'tendermint/rpc/grpc/types.proto',
'tendermint/state/types.proto',
'tendermint/statesync/types.proto',
'tendermint/store/types.proto',
'tendermint/types/canonical.proto',
'tendermint/types/events.proto',
]
},
methods: {
Expand Down
186 changes: 186 additions & 0 deletions src/cosmos/feegrant/v1beta1/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,23 @@ export interface QueryAllowancesResponse {

pagination?: PageResponse;
}
/** QueryAllowancesByGranterRequest is the request type for the Query/AllowancesByGranter RPC method. */

export interface QueryAllowancesByGranterRequest {
granter: string;
/** pagination defines an pagination for the request. */

pagination?: PageRequest;
}
/** QueryAllowancesByGranterResponse is the response type for the Query/AllowancesByGranter RPC method. */

export interface QueryAllowancesByGranterResponse {
/** allowances that have been issued by the granter. */
allowances: Grant[];
/** pagination defines an pagination for the response. */

pagination?: PageResponse;
}

function createBaseQueryAllowanceRequest(): QueryAllowanceRequest {
return {
Expand Down Expand Up @@ -316,6 +333,162 @@ export const QueryAllowancesResponse = {
return message;
},
};

function createBaseQueryAllowancesByGranterRequest(): QueryAllowancesByGranterRequest {
return {
granter: "",
pagination: undefined,
};
}

export const QueryAllowancesByGranterRequest = {
encode(message: QueryAllowancesByGranterRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.granter !== "") {
writer.uint32(10).string(message.granter);
}

if (message.pagination !== undefined) {
PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim();
}

return writer;
},

decode(input: _m0.Reader | Uint8Array, length?: number): QueryAllowancesByGranterRequest {
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseQueryAllowancesByGranterRequest();

while (reader.pos < end) {
const tag = reader.uint32();

switch (tag >>> 3) {
case 1:
message.granter = reader.string();
break;

case 2:
message.pagination = PageRequest.decode(reader, reader.uint32());
break;

default:
reader.skipType(tag & 7);
break;
}
}

return message;
},

fromJSON(object: any): QueryAllowancesByGranterRequest {
return {
granter: isSet(object.granter) ? String(object.granter) : "",
pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined,
};
},

toJSON(message: QueryAllowancesByGranterRequest): unknown {
const obj: any = {};
message.granter !== undefined && (obj.granter = message.granter);
message.pagination !== undefined &&
(obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined);
return obj;
},

fromPartial<I extends Exact<DeepPartial<QueryAllowancesByGranterRequest>, I>>(
object: I,
): QueryAllowancesByGranterRequest {
const message = createBaseQueryAllowancesByGranterRequest();
message.granter = object.granter ?? "";
message.pagination =
object.pagination !== undefined && object.pagination !== null
? PageRequest.fromPartial(object.pagination)
: undefined;
return message;
},
};

function createBaseQueryAllowancesByGranterResponse(): QueryAllowancesByGranterResponse {
return {
allowances: [],
pagination: undefined,
};
}

export const QueryAllowancesByGranterResponse = {
encode(message: QueryAllowancesByGranterResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
for (const v of message.allowances) {
Grant.encode(v!, writer.uint32(10).fork()).ldelim();
}

if (message.pagination !== undefined) {
PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
}

return writer;
},

decode(input: _m0.Reader | Uint8Array, length?: number): QueryAllowancesByGranterResponse {
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseQueryAllowancesByGranterResponse();

while (reader.pos < end) {
const tag = reader.uint32();

switch (tag >>> 3) {
case 1:
message.allowances.push(Grant.decode(reader, reader.uint32()));
break;

case 2:
message.pagination = PageResponse.decode(reader, reader.uint32());
break;

default:
reader.skipType(tag & 7);
break;
}
}

return message;
},

fromJSON(object: any): QueryAllowancesByGranterResponse {
return {
allowances: Array.isArray(object?.allowances)
? object.allowances.map((e: any) => Grant.fromJSON(e))
: [],
pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined,
};
},

toJSON(message: QueryAllowancesByGranterResponse): unknown {
const obj: any = {};

if (message.allowances) {
obj.allowances = message.allowances.map((e) => (e ? Grant.toJSON(e) : undefined));
} else {
obj.allowances = [];
}

message.pagination !== undefined &&
(obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined);
return obj;
},

fromPartial<I extends Exact<DeepPartial<QueryAllowancesByGranterResponse>, I>>(
object: I,
): QueryAllowancesByGranterResponse {
const message = createBaseQueryAllowancesByGranterResponse();
message.allowances = object.allowances?.map((e) => Grant.fromPartial(e)) || [];
message.pagination =
object.pagination !== undefined && object.pagination !== null
? PageResponse.fromPartial(object.pagination)
: undefined;
return message;
},
};
/** Query defines the gRPC querier service. */

export interface Query {
Expand All @@ -324,6 +497,12 @@ export interface Query {
/** Allowances returns all the grants for address. */

Allowances(request: QueryAllowancesRequest): Promise<QueryAllowancesResponse>;
/**
* AllowancesByGranter returns all the grants given by an address
* Since v0.46
*/

AllowancesByGranter(request: QueryAllowancesByGranterRequest): Promise<QueryAllowancesByGranterResponse>;
}
export class QueryClientImpl implements Query {
private readonly rpc: Rpc;
Expand All @@ -332,6 +511,7 @@ export class QueryClientImpl implements Query {
this.rpc = rpc;
this.Allowance = this.Allowance.bind(this);
this.Allowances = this.Allowances.bind(this);
this.AllowancesByGranter = this.AllowancesByGranter.bind(this);
}

Allowance(request: QueryAllowanceRequest): Promise<QueryAllowanceResponse> {
Expand All @@ -345,4 +525,10 @@ export class QueryClientImpl implements Query {
const promise = this.rpc.request("cosmos.feegrant.v1beta1.Query", "Allowances", data);
return promise.then((data) => QueryAllowancesResponse.decode(new _m0.Reader(data)));
}

AllowancesByGranter(request: QueryAllowancesByGranterRequest): Promise<QueryAllowancesByGranterResponse> {
const data = QueryAllowancesByGranterRequest.encode(request).finish();
const promise = this.rpc.request("cosmos.feegrant.v1beta1.Query", "AllowancesByGranter", data);
return promise.then((data) => QueryAllowancesByGranterResponse.decode(new _m0.Reader(data)));
}
}
Loading

0 comments on commit fd3b502

Please sign in to comment.