-
Notifications
You must be signed in to change notification settings - Fork 14
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
Feat: Extend Evm Vault swaps functionality #5344
Merged
albert-llimos
merged 43 commits into
main
from
feat/evm-extend-contract-swaps-functionality
Oct 29, 2024
Merged
Feat: Extend Evm Vault swaps functionality #5344
albert-llimos
merged 43 commits into
main
from
feat/evm-extend-contract-swaps-functionality
Oct 29, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
albert-llimos
changed the title
Feat/evm extend contract swaps functionality
Feat: Evm extend contract swaps functionality
Oct 22, 2024
albert-llimos
commented
Oct 22, 2024
bouncer/shared/contract_swap.ts
Outdated
// TODO: This will need some refactoring either putting the cfParameters outside the | ||
// ccmParams and the user should encode it as done here or, probably better, we just | ||
// add the SwapParameters support (Fok/Dca/Boost) as separate parameters, rename | ||
// cfParameters to ccmAdditionalData and do the encoding within the SDK. |
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.
I'll move the encodeCfParameters
into the SDK and then pass the DCA/Boost/Fok parameters separately here, as for deposit channels, so we abstract that layer of complexity from the end user.
dandanlen
approved these changes
Oct 28, 2024
github-merge-queue
bot
removed this pull request from the merge queue due to failed status checks
Oct 28, 2024
Another lp api flakiness issue... hopefully I can get the fix in soon. |
github-merge-queue
bot
removed this pull request from the merge queue due to failed status checks
Oct 28, 2024
github-merge-queue
bot
removed this pull request from the merge queue due to failed status checks
Oct 28, 2024
github-merge-queue bot
pushed a commit
that referenced
this pull request
Oct 28, 2024
* feat: witnessing btc smart contract swaps * chore: address minor review comments * chore: start implementation * test: fix deposit witnessing tests * chore: add intial scale encoding for cfParameters * chore: improve logic * fix: address RuntimeCall size limit * chore: address clippy * chore: more cleanup and refactoring * chore: add contract swaps to dca test * chore: engine refactor * chore: refactor createEvmWallet * chore: cleanup * chore: add MAX_VAULT_SWAP_ATTRIBUTES_LENGTH * chore: refactor bouncer * chore: refactor into common for reusal * chore: rename attributes to parameters * chore: pass extra parameters to sdk * chore: fix issues * chore: engine renaming * chore: update SDK with new encoding logic * chore: remove unnecessary bouncer ts-scale * chore: lint * chore: update to right name * chore: fix missing rename * chore: add beneficiares and make FoK mandatory * chore: lint * chore: update broker_fees and cli * chore: update with hardcoded cfParameters * chore: bump sdk * fix: simplify cf params decoding * chore: downgrade error -> warning * chore: bump sdk with new broker_fees type * chore: fix failing test * chore: bump sdk * chore: lint --------- Co-authored-by: Maxim Shishmarev <maxim@chainflip.io> Co-authored-by: Daniel <daniel@chainflip.io>
github-merge-queue
bot
removed this pull request from the merge queue due to failed status checks
Oct 28, 2024
github-merge-queue bot
pushed a commit
that referenced
this pull request
Oct 28, 2024
* feat: witnessing btc smart contract swaps * chore: address minor review comments * chore: start implementation * test: fix deposit witnessing tests * chore: add intial scale encoding for cfParameters * chore: improve logic * fix: address RuntimeCall size limit * chore: address clippy * chore: more cleanup and refactoring * chore: add contract swaps to dca test * chore: engine refactor * chore: refactor createEvmWallet * chore: cleanup * chore: add MAX_VAULT_SWAP_ATTRIBUTES_LENGTH * chore: refactor bouncer * chore: refactor into common for reusal * chore: rename attributes to parameters * chore: pass extra parameters to sdk * chore: fix issues * chore: engine renaming * chore: update SDK with new encoding logic * chore: remove unnecessary bouncer ts-scale * chore: lint * chore: update to right name * chore: fix missing rename * chore: add beneficiares and make FoK mandatory * chore: lint * chore: update broker_fees and cli * chore: update with hardcoded cfParameters * chore: bump sdk * fix: simplify cf params decoding * chore: downgrade error -> warning * chore: bump sdk with new broker_fees type * chore: fix failing test * chore: bump sdk * chore: lint --------- Co-authored-by: Maxim Shishmarev <maxim@chainflip.io> Co-authored-by: Daniel <daniel@chainflip.io>
github-merge-queue
bot
removed this pull request from the merge queue due to failed status checks
Oct 28, 2024
github-merge-queue bot
pushed a commit
that referenced
this pull request
Oct 29, 2024
* feat: witnessing btc smart contract swaps * chore: address minor review comments * chore: start implementation * test: fix deposit witnessing tests * chore: add intial scale encoding for cfParameters * chore: improve logic * fix: address RuntimeCall size limit * chore: address clippy * chore: more cleanup and refactoring * chore: add contract swaps to dca test * chore: engine refactor * chore: refactor createEvmWallet * chore: cleanup * chore: add MAX_VAULT_SWAP_ATTRIBUTES_LENGTH * chore: refactor bouncer * chore: refactor into common for reusal * chore: rename attributes to parameters * chore: pass extra parameters to sdk * chore: fix issues * chore: engine renaming * chore: update SDK with new encoding logic * chore: remove unnecessary bouncer ts-scale * chore: lint * chore: update to right name * chore: fix missing rename * chore: add beneficiares and make FoK mandatory * chore: lint * chore: update broker_fees and cli * chore: update with hardcoded cfParameters * chore: bump sdk * fix: simplify cf params decoding * chore: downgrade error -> warning * chore: bump sdk with new broker_fees type * chore: fix failing test * chore: bump sdk * chore: lint --------- Co-authored-by: Maxim Shishmarev <maxim@chainflip.io> Co-authored-by: Daniel <daniel@chainflip.io>
github-merge-queue
bot
removed this pull request from the merge queue due to failed status checks
Oct 29, 2024
github-merge-queue
bot
removed this pull request from the merge queue due to failed status checks
Oct 29, 2024
…-extend-contract-swaps-functionality
albert-llimos
deleted the
feat/evm-extend-contract-swaps-functionality
branch
October 29, 2024 13:48
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request
Closes: PRO-1696, PRO-1737
Checklist
Please conduct a thorough self-review before opening the PR.
Summary
cfParameters
intoccmAdditionalData
for clarity (breaking change).The SDK needs to be updated for this to work, as there is a breaking change. There's a few TODOs in the bouncer indicating that. However, the contract swaps can already be tested and are working correctly.
I'll work on the SDK to have the intended interface (encoding values in the SDK instead) so we have the end-to-end flow working for all swaps. I'll then update the logic around the TODOs.
@msgmaxim Nothing that affects Bitcoin Vault though but just fyi. Also, I'll merge the changes in #5343 when completed.
EDIT: Just put up a draft for the SDK to it's easy to follow the changes end-to-end: chainflip-io/chainflip-sdk-monorepo#1037