Skip to content

Commit

Permalink
adding ibc support
Browse files Browse the repository at this point in the history
  • Loading branch information
karnthis committed Oct 3, 2024
1 parent 0a1598a commit 7b2e82e
Show file tree
Hide file tree
Showing 31 changed files with 6,367 additions and 34 deletions.
6 changes: 6 additions & 0 deletions scripts/protocgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ for file in $static_cosmwasm_proto_dirs; do
buf generate --template ./cfg/buf.gen.yaml "$file"
done

static_ibc_dirs_regex='(applications|core)'
static_ibc_proto_dirs=$(find -E . -iregex ".*\/staticProto\/ibc\/$static_ibc_dirs_regex.*\.proto")
for file in $static_ibc_proto_dirs; do
buf generate --template ./cfg/buf.gen.yaml "$file"
done

# Generate Custom Protos
proto_dirs=$(find ./proto -name '*.proto')
for file in $proto_dirs; do
Expand Down
13 changes: 12 additions & 1 deletion src/interfaces/ITxLibrary.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
import type { ITxBank, ITxCosmwasm, ITxFileTree, ITxNotifications, ITxOracle, ITxRns, ITxStorage } from '@/snackages'
import type {
ITxBank,
ITxCosmwasm,
ITxFileTree,
ITxIbc,
ITxNotifications,
ITxOracle,
ITxRns,
ITxStorage,
} from '@/snackages'

/**
* Collection of all custom Jackal Msgs.
Expand All @@ -10,6 +19,7 @@ import type { ITxBank, ITxCosmwasm, ITxFileTree, ITxNotifications, ITxOracle, IT
* @property {ITxStorage} storage
* @property {ITxBank} bank
* @property {ITxCosmwasm} cosmwasm
* @property {ITxIbc} ibc
*/
export interface ITxLibrary extends Record<string, any> {
fileTree: ITxFileTree
Expand All @@ -20,6 +30,7 @@ export interface ITxLibrary extends Record<string, any> {
/* cosmos */
bank: ITxBank
cosmwasm: ITxCosmwasm
ibc: ITxIbc
}

/**
Expand Down
10 changes: 4 additions & 6 deletions src/interfaces/snackages/IBankExtension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@ import {
* @interface IBankExtension
* @property {IBankExtensionMembers} bank
*/
export interface IBankExtension
extends Record<string, IBankExtensionMembers> {
export interface IBankExtension extends Record<string, IBankExtensionMembers> {
readonly bank: IBankExtensionMembers
}

/**
* Some functions for querying data from the Bank module.
*
* @interface IStorageExtensionMembers
* @interface IBankExtensionMembers
* @property {allBalances} allBalances()
* @property {balance} balance()
Expand All @@ -30,7 +29,7 @@ export interface IBankExtensionMembers
* @returns Promise<TQueryAllBalancesResponseStrict>
*/
readonly allBalances: (
request: DQueryAllBalances
request: DQueryAllBalances,
) => Promise<TQueryAllBalancesResponseStrict>

/**
Expand All @@ -39,7 +38,6 @@ export interface IBankExtensionMembers
* @returns Promise<TQueryBalanceResponseStrict>
*/
readonly balance: (
request: DQueryBalance
request: DQueryBalance,
) => Promise<TQueryBalanceResponseStrict>

}
16 changes: 16 additions & 0 deletions src/interfaces/snackages/IIbcExtension.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* @interface IIbcExtension
* @property {IIbcExtensionMembers} ibc
*/
export interface IIbcExtension extends Record<string, IIbcExtensionMembers> {
readonly ibc: IIbcExtensionMembers
}

/**
* Some functions for querying data from the IBC module.
*
* @interface IIbcExtensionMembers
*/
export interface IIbcExtensionMembers
extends Record<string, (request?: any) => Promise<any>> {}
1 change: 1 addition & 0 deletions src/interfaces/snackages/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export * from '@/interfaces/snackages/IBankExtension'
export * from '@/interfaces/snackages/ICosmwasmExtension'
export * from '@/interfaces/snackages/IFileTreeExtension'
export * from '@/interfaces/snackages/IIbcExtension'
export * from '@/interfaces/snackages/IJklMintExtension'
export * from '@/interfaces/snackages/INotificationsExtension'
export * from '@/interfaces/snackages/IOracleExtension'
Expand Down
Loading

0 comments on commit 7b2e82e

Please sign in to comment.