Skip to content

Commit

Permalink
authz starship tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Zetazzz committed Jan 2, 2025
1 parent d8e1bc0 commit e4dabd8
Show file tree
Hide file tree
Showing 54 changed files with 193 additions and 207 deletions.
16 changes: 16 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,22 @@
"cwd": "${workspaceFolder}/libs/interchainjs",
"internalConsoleOptions": "neverOpen"
},
{
"type": "node",
"request": "launch",
"name": "Debug Jest Tests in Interchainjs authz",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": [
"--config",
"./jest.starship.config.js",
"--verbose",
"--bail",
"starship/__tests__/authz.test.ts"
],
"console": "integratedTerminal",
"cwd": "${workspaceFolder}/libs/interchainjs",
"internalConsoleOptions": "neverOpen"
},
{
"type": "node",
"request": "launch",
Expand Down
2 changes: 1 addition & 1 deletion libs/injective-react/src/binary.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].6
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/injective-react/src/extern.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].6
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
9 changes: 5 additions & 4 deletions libs/injective-react/src/helper-func-types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].6
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand All @@ -22,6 +22,8 @@ export interface QueryBuilderOptions<TReq, TRes> {
}

export function buildQuery<TReq, TRes>(opts: QueryBuilderOptions<TReq, TRes>) {
registerDependencies(opts.deps ?? []);

return async (request: TReq) => {
let rpc: Rpc | undefined;

Expand All @@ -33,8 +35,6 @@ export function buildQuery<TReq, TRes>(opts: QueryBuilderOptions<TReq, TRes>) {

if (!rpc) throw new Error("Query Rpc is not initialized");

registerDependencies(opts.deps ?? []);

const data = opts.encode(request).finish();
const response = await rpc.request(opts.service, opts.method, data);
return opts.decode(response);
Expand Down Expand Up @@ -82,6 +82,8 @@ export interface TxBuilderOptions {
}

export function buildTx<TMsg>(opts: TxBuilderOptions) {
registerDependencies(opts.deps ?? []);

return async (
signerAddress: string,
message: TMsg,
Expand All @@ -100,7 +102,6 @@ export function buildTx<TMsg>(opts: TxBuilderOptions) {
//register all related encoders and converters
client.addEncoders(opts.encoders ?? []);
client.addConverters(opts.converters ?? []);
registerDependencies(opts.deps ?? []);

const data = [
{
Expand Down
2 changes: 1 addition & 1 deletion libs/injective-react/src/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].6
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/injective-react/src/react-query.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].6
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/injective-react/src/registry.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].6
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/injective-react/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].6
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/injective-react/src/utf8.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].6
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/injective-react/src/varint.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].6
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/injective-vue/src/binary.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].6
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/injective-vue/src/extern.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].6
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/injective-vue/src/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].6
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/injective-vue/src/registry.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].6
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/injective-vue/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].6
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/injective-vue/src/utf8.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].6
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/injective-vue/src/varint.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].6
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/injective-vue/src/vue-query.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].6
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/injectivejs/src/binary.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].6
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/injectivejs/src/extern.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].6
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
9 changes: 5 additions & 4 deletions libs/injectivejs/src/helper-func-types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].6
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand All @@ -22,6 +22,8 @@ export interface QueryBuilderOptions<TReq, TRes> {
}

export function buildQuery<TReq, TRes>(opts: QueryBuilderOptions<TReq, TRes>) {
registerDependencies(opts.deps ?? []);

return async (request: TReq) => {
let rpc: Rpc | undefined;

Expand All @@ -33,8 +35,6 @@ export function buildQuery<TReq, TRes>(opts: QueryBuilderOptions<TReq, TRes>) {

if (!rpc) throw new Error("Query Rpc is not initialized");

registerDependencies(opts.deps ?? []);

const data = opts.encode(request).finish();
const response = await rpc.request(opts.service, opts.method, data);
return opts.decode(response);
Expand Down Expand Up @@ -82,6 +82,8 @@ export interface TxBuilderOptions {
}

export function buildTx<TMsg>(opts: TxBuilderOptions) {
registerDependencies(opts.deps ?? []);

return async (
signerAddress: string,
message: TMsg,
Expand All @@ -100,7 +102,6 @@ export function buildTx<TMsg>(opts: TxBuilderOptions) {
//register all related encoders and converters
client.addEncoders(opts.encoders ?? []);
client.addConverters(opts.converters ?? []);
registerDependencies(opts.deps ?? []);

const data = [
{
Expand Down
2 changes: 1 addition & 1 deletion libs/injectivejs/src/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].6
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/injectivejs/src/registry.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].6
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/injectivejs/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].6
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/injectivejs/src/utf8.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].6
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/injectivejs/src/varint.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].6
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/interchain-react/src/binary.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].6
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/interchain-react/src/extern.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].6
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
9 changes: 5 additions & 4 deletions libs/interchain-react/src/helper-func-types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].6
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand All @@ -22,6 +22,8 @@ export interface QueryBuilderOptions<TReq, TRes> {
}

export function buildQuery<TReq, TRes>(opts: QueryBuilderOptions<TReq, TRes>) {
registerDependencies(opts.deps ?? []);

return async (request: TReq) => {
let rpc: Rpc | undefined;

Expand All @@ -33,8 +35,6 @@ export function buildQuery<TReq, TRes>(opts: QueryBuilderOptions<TReq, TRes>) {

if (!rpc) throw new Error("Query Rpc is not initialized");

registerDependencies(opts.deps ?? []);

const data = opts.encode(request).finish();
const response = await rpc.request(opts.service, opts.method, data);
return opts.decode(response);
Expand Down Expand Up @@ -82,6 +82,8 @@ export interface TxBuilderOptions {
}

export function buildTx<TMsg>(opts: TxBuilderOptions) {
registerDependencies(opts.deps ?? []);

return async (
signerAddress: string,
message: TMsg,
Expand All @@ -100,7 +102,6 @@ export function buildTx<TMsg>(opts: TxBuilderOptions) {
//register all related encoders and converters
client.addEncoders(opts.encoders ?? []);
client.addConverters(opts.converters ?? []);
registerDependencies(opts.deps ?? []);

const data = [
{
Expand Down
2 changes: 1 addition & 1 deletion libs/interchain-react/src/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].6
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/interchain-react/src/react-query.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].6
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/interchain-react/src/registry.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].6
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/interchain-react/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].6
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/interchain-react/src/utf8.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].6
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/interchain-react/src/varint.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].6
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/interchain-vue/src/binary.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].6
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/interchain-vue/src/extern.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].6
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/interchain-vue/src/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].6
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/interchain-vue/src/registry.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].6
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
Loading

0 comments on commit e4dabd8

Please sign in to comment.