wormhole-foundation/wormhole-sdk-ts

malformed transaction on a usdt transfer from from Oasis to Ethereum

Closed this issue ยท 14 comments

I keep getting a malformed transaction when trying to bridge Usdtet from oasis to Usdt on ethereum.
image

What signer are you using?

i am using this
export async function getSigner<N extends Network, C extends Chain>(
chain: ChainContext<N, C>,
): Promise<SignerStuff<N, C>> {
// Read in from .env
(await import('dotenv')).config();

const signer: Signer = await evm.getSigner(
await chain.getRpc(),
getEnv('PRIVATE_KEY'),
);

return {
chain,
signer: signer as Signer<N, C>,
address: Wormhole.chainAddress(chain.chain, signer.address()),
};
}

I can repro but pasting the tx contents into this txdecoderI'd expect it to fail ๐Ÿค”

image

Do you often use Oasis? are there any gotchas for tx formatting?

No this is the first time I am using it, I have done a transaction to test, using the portal token bridge it worked fine https://explorer.oasis.io/mainnet/emerald/tx/0xde646172c18a8344c2d2931e53480765042051e7bd76c9f4a281a1bfffd6d25a
the Raw Data is: 0x0f5287b0000000000000000000000000dc19a122e268128b5ee20366299fc7b5b199c8e300000000000000000000000000000000000000000000000000000000000f42400000000000000000000000000000000000000000000000000000000000000002000000000000000000000000903a1bd58e377f70f5cf501b76134e71b218d5aa000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000feb00000

image
๐Ÿค” ๐Ÿค” ๐Ÿค”

i used the portal https://portalbridge.com/advanced-tools/#/transfer to do it, maybe it is different, maybe it includes some extra information for the oasis chain

On portal bridge, you'd be using a signer like metamask or something which probably has some additional logic to produce a transaction that is valid for Oasis.

Will need to dig around to figure out what else needs to be done for Oasis txs

Yes, I understand, it might use a different signer, or interface, Thank you for your help!

image ๐Ÿค” ๐Ÿค” ๐Ÿค”

On portal bridge, you'd be using a signer like metamask or something which probably has some additional logic to produce a transaction that is valid for Oasis.

Will need to dig around to figure out what else needs to be done for Oasis txs

So I succeded by modifying the signer and platform from the wormhole sdk by modifying the sign in signer and sendWait in platform .
if I provide the changes can you add them to the sdk ?

I'm curious to see what changes are necessary

I should have linked this before but wrapping a web signer like metamask may be all you need to do

after some debugging, I found that by setting the legacy gas params AND setting type to 0 in the transaction allows the tx to be parsed properly by Oasis

1963d50

after some debugging, I found that by setting the legacy gas params AND setting type to 0 in the transaction allows the tx to be parsed properly by Oasis

1963d50

yes I had to set it to legacy, but even broadcast did not work, is this merged into the sdk now?

It is now merged, and once the publish action finishes it will be available

https://github.com/wormhole-foundation/wormhole-sdk-ts/releases/tag/0.6.9-beta.0

It is now merged, and once the publish action finishes it will be available

https://github.com/wormhole-foundation/wormhole-sdk-ts/releases/tag/0.6.9-beta.0

I am just running a script that changes the sdk for now