Skip to content

Unify xcm addres #270

Open
Divljo31 wants to merge 4 commits intomasterfrom
feat/unify-addresses
Open

Unify xcm addres #270
Divljo31 wants to merge 4 commits intomasterfrom
feat/unify-addresses

Conversation

@Divljo31
Copy link
Copy Markdown
Member

Add bidirectional address resolution driven by CallType - users can now pass either H160 or SS58 addresses

issue #134

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Feb 10, 2026

⚠️ No Changeset found

Latest commit: 19bef9a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

const { amount, sender, source } = ctx;
const transfer = await this.getTransfer(ctx);
return this.adapter.buildCall(sender, amount, source.feeBalance, transfer);
const callType = route.contract ? CallType.Evm : CallType.Substrate;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about programs / moves ? this line is fishy ..

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

const address = route.contract
? await formatEvmAddress(sender, chain)
: sender;
const feeCallType = route.contract ? CallType.Evm : CallType.Substrate;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

if (chain.isEvmParachain()) {
const evmParachain = chain as EvmParachain;
return evmParachain.getDerivatedAddress(address);
return callType === CallType.Evm
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same issue here

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has isEvmParachain check so it only has evm and substrate options

const transfer = await this.getTransfer(ctx);
return this.adapter.buildCall(sender, amount, source.feeBalance, transfer);
const callType = route.contract ? CallType.Evm : CallType.Substrate;
const account = await resolveAddress(sender, chain, callType);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

besides i would move resolve logic to getTransfer where builders are

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants