Skip to content

Commit

Permalink
Merge pull request #165 from AbstractSDK/adair/export-more
Browse files Browse the repository at this point in the history
Export additional functions
  • Loading branch information
adairrr authored Jan 16, 2025
2 parents f2008c0 + 236a881 commit 17c872d
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/loud-lizards-suffer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@abstract-money/core": patch
---

Export more functions
1 change: 1 addition & 0 deletions packages/core/src/actions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export * from './get-modules-from-api'
export * from './get-registry-address-from-api'
export * from './get-chain-rpc-from-api'
export * from './get-sub-account-ids-by-module-id'
export * from './simulate-remote-cosmos-msg'

export * from './account/public/get-account-address-from-api'
export * from './account/public/get-ibc-client-query-client-from-account'
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export * from './encoding'
export * from './events'
export * from './authz'
export * from './cosmwasm'
export * from './cosmos'
export * from './modules'
export * from './polytone'

Expand Down
20 changes: 18 additions & 2 deletions packages/core/src/utils/polytone/predict-proxy-address.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,29 @@ describe('predictPolytoneProxyAddress', () => {

it('returns the correct address with full function', async () => {
const result = await predictPolytoneProxyAddress({
controllerNoteAddress: neutronNoteAddress,
controllerSender: neutronSenderAddress,
hostVoiceAddress: neutronToOsmosisVoiceAddress,
hostProxyChecksum: osmosisProxyChecksum,
hostVoiceConnectionId: connectionIdFromVoice,
controllerNoteAddress: neutronNoteAddress,
controllerSender: neutronSenderAddress,
})

expect(result).toBe(expectedAddress)
})

it('returns the correct address with xion', async () => {
const result = await predictPolytoneProxyAddress({
controllerNoteAddress:
'xion1hs95lgvuy0p6jn4v7js5x8plfdqw867lsuh5xv6d2ua20jprkges7as2wd',
controllerSender: 'xion1kjzpqv393k4g064xh04j4hwy5d0s03wfcmqte2',
hostVoiceAddress:
'osmo1pd2tw9230k9qhzq046yrkel940x93732pq5c3mcqrnahj3ekhw7q64tfwr',
hostProxyChecksum: osmosisProxyChecksum,
hostVoiceConnectionId: 'connection-2823',
})

expect(result).toBe(
'osmo1lwaeqc7ahm2a7gvpyfqsu5s8ulaj349ggtzpfjd6r07xhper5q5qc6p2fs',
)
})
})

0 comments on commit 17c872d

Please sign in to comment.