-
-
Notifications
You must be signed in to change notification settings - Fork 261
feat: CowSwap intent base swap #6547
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
base: main
Are you sure you want to change the base?
Conversation
852c2ca to
3db0fcf
Compare
refactor: intent api in utils with validators
3db0fcf to
546dc9d
Compare
d913692 to
6cfc1db
Compare
3f2ec7d to
4b28212
Compare
| const intentTransactionParams = { | ||
| chainId: formatChainIdToHex(chainId), | ||
| from: accountAddress, | ||
| to: | ||
| intent.settlementContract ?? | ||
| '0x9008D19f58AAbd9eD0D60971565AA8510560ab41', // Default settlement contract | ||
| data: `0x${orderUid.slice(-8)}`, // Use last 8 chars of orderUid to make each transaction unique | ||
| value: '0x0', | ||
| gas: '0x5208', // Minimal gas for display purposes | ||
| gasPrice: '0x3b9aca00', // 1 Gwei - will be converted to EIP-1559 fees if network supports it | ||
| skipInitialGasEstimate: true, | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this transaction do? Is it a noop transaction that costs gas? If I'm understanding the usage correctly, it's purpose is to add a tx to history + TransactionController, which the frontend can use to show the intent order's status in the activity list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the transaction's purpose indeed. I'll add a comment to clarify what it's for.
|
@metamaskbot publish-preview |
|
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions. |
468477b to
f620f5d
Compare
| maxFeePerGas: toHex(txFee.maxFeePerGas ?? 0), | ||
| maxPriorityFeePerGas: toHex(txFee.maxPriorityFeePerGas ?? 0), | ||
| gas: maxGasLimit, | ||
| gas: transactionParams.gas ? toHex(transactionParams.gas) : undefined, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oscarwroche Can you store it back in a const?
const maxGasLimit = transactionParams.gas ? toHex(transactionParams.gas) : undefined;
Also can you explain why is it fixing the gas issue we had?
Explanation
References
Checklist