-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Asset Hub Flow #283
Comments
Hey team! Please add your planning poker estimate with Zenhub @ebma @gianfra-t @Sharqiewicz |
To be discussed: how identify the Asset Hub user and derive the memo for sep10 (#257) |
We can use the same function @gianfra-t implemented for the EVM accounts and just pass the Polkadot address. We need to make sure that we pass the addresses using the same ss58 encoding and we don't mix it up ending with different memos for the same account. |
That makes sense, but I also meant the signing part. Do Polkadot wallets also have a standardized API to sign arbitrary messages? (I guess so, this happens on Polkassembly for example). |
I think so, we will use also the talisman package as in the portal right? In the only example of the package they show a message sign. |
I am not familiar with the Talisman package. That works with every Polkadot wallet, not just with Talisman? |
If I understand correctly, yes, it's our |
Polkadot.js supports signing arbitrary messages, see the docs here. As we can't do |
For offramping Asset Hub USDC, we need to implement a new flow structure that starts with the Asset Hub.
Different flow structures will also imply that other parts of the code are more generic, e.g., the
OfframpingState
type.Proposal
OfframpingState
for the new flowsquidRouterApproveHash
,squidRouterSwapHash
,moonbeamXcmTransactionHash
will not be required but they are defined as optional anywaysquidRouterReceiverId
andsquidRouterReceiverHash
are determined inconstructInitialState
but we can keep this logic as we can use it to show a unique id to the user (Update transaction ID shown to the user #193)
OfframpingState
that describes the type of flow (e.g.,"type": "evmMoonbeam" | "assetHub"
)assetHubXcm
and a handlerWeightLimit: Unlimited
subsidizePreSwap
squidRouterSwapHash
evm transaction from thependulumFundEphemeral
phase handlerprepareTransactions
phase handler proceed tosquidRouter
ifstate.type === "evmMoonbeam"
pendulumFundEphemeral
ifstate.type === "assetHub"
pendulumFundEphemeral
phase handler proceed toexecuteXCM
ifstate.type === "evmMoonbeam"
assetHubXcm
ifstate.type === "assetHub"
Note
The new flow structure is not explicitly defined in the file
src/services/offrampingFlow.ts
but implicitly defined by the successor phase returned in every phase handler.Whereas the initial structure of the evm-moonbeam flow is:
prepareTransactions
squidRouter
pendulumFundEphemeral
executeXCM
subsidizePreSwap
the structure for the Asset Hub flow is:
prepareTransactions
pendulumFundEphemeral
assetHubXcm
subsidizePreSwap
The text was updated successfully, but these errors were encountered: