Skip to content
Merged
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: 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',
)
})
})
Loading