Skip to content
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

Crosschain Swaps contracts and tests #3698

Merged
merged 141 commits into from
Jan 13, 2023
Merged

Conversation

nicolaslara
Copy link
Contributor

@nicolaslara nicolaslara commented Dec 13, 2022

Closes: #XXX

What is the purpose of the change

Introduces the crosschain swaps contracts and tests.

Note: This currently includes the changes from #3589 and should be merged after that.

Brief Changelog

  • Contracts and tests for crosschain swaps added to the repo

Testing and Verifying

  • There are comprehensive tests for the contracts

Documentation and Release Note

  • Does this pull request introduce a new feature or user-facing behavior changes? (no)
  • Is a relevant changelog entry added to the Unreleased section in CHANGELOG.md? (no)
  • How is the feature or change documented? (specification in the module readme and the contract readme )

Store the swaprouter code:

``` sh
> osmosisd-testnet tx wasm store ./bytecode/swaprouter.wasm --from owner --gas auto --gas-prices 0.1uosmo --gas-adjustment 1.3 -y
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note to self: I have better commands for this now. Cleanup and add the script I'm using to test this on the localrelayer tests.

Comment on lines 2 to 3
pub const SWAP_REPLY_ID: u64 = 1u64;
pub const FORWARD_REPLY_ID: u64 = 2u64;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

had to use a crate to get the value when passing it as a param, but it now is:

use enum_repr::EnumRepr;

// Msg Reply IDs
#[EnumRepr(type = "u64")]
pub enum MsgReplyID {
    Swap = 1,
    Forward = 2,
}

Copy link
Member

@ValarDragon ValarDragon left a comment

Choose a reason for hiding this comment

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

Down to merge to main and review more after merge

@nicolaslara nicolaslara merged commit e973f38 into main Jan 13, 2023
@nicolaslara nicolaslara deleted the nicolas/crosschain-swaps-new branch January 13, 2023 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:docs Improvements or additions to documentation T:CI V:state/compatible/no_backport State machine compatible PR, depends on prior breaks
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants