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

IBC transfer service - WIP #62

Merged
merged 30 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
ff698f6
IBC transfer service - WIP
stiiifff Oct 11, 2024
4ac1908
Merge branch 'main' into sde/ibc-transfer-service
stiiifff Oct 11, 2024
bf6662c
Fix build
stiiifff Oct 11, 2024
dc8e638
IBC transfer service - WIP / Neutron-specific account
stiiifff Oct 14, 2024
4fbaac6
Remove NeutronMsg + wasm bindings and use protobuf directly
stiiifff Oct 15, 2024
b2dfd0a
Merge branch 'main' into sde/ibc-transfer-service
stiiifff Oct 15, 2024
fa134ed
Cleanup
stiiifff Oct 15, 2024
163d739
cargo fmt
stiiifff Oct 15, 2024
0d25414
Cleanup
stiiifff Oct 15, 2024
a77bf39
Add validations & tests for generic service, support for full amount.
stiiifff Oct 15, 2024
6a879a0
Neutron IBC Transfer service
stiiifff Oct 16, 2024
5ef6c20
Update local-ic test to also test a FullAmount transfer (after updati…
stiiifff Oct 16, 2024
d9f2862
cargo fmt
stiiifff Oct 16, 2024
06344ab
Add support for PFM in Neutron IBC transfer service
stiiifff Oct 17, 2024
012eaa9
cargo fmt
stiiifff Oct 17, 2024
2158c3f
Update CI actions
stiiifff Oct 17, 2024
a958a04
Add support for PFM in Generic IBC transfer service
stiiifff Oct 17, 2024
055e5b7
Fix e2e PFM test names
stiiifff Oct 17, 2024
0f426cb
Merge branch 'main' into sde/ibc-transfer-service
stiiifff Oct 17, 2024
b0e4dfa
Revert "Add support for PFM in Generic IBC transfer service"
stiiifff Oct 17, 2024
b61d26a
Merge branch 'main' into sde/ibc-transfer-service
stiiifff Oct 17, 2024
5b53dfe
Fix build
stiiifff Oct 18, 2024
a371904
Add README files; add validation & test for denom_to_pfm_map (current…
stiiifff Oct 18, 2024
3ab0115
Fix Neutron IBC Transfer service README
stiiifff Oct 18, 2024
e45b48a
Fix local-ic tests
stiiifff Oct 18, 2024
3be7979
Fix local-ic tests
stiiifff Oct 18, 2024
501573d
Remove unnecessary code
stiiifff Oct 18, 2024
0b1a552
Remove denom pfm validation & test - breaks the local-ic test for the…
stiiifff Oct 18, 2024
d3de03f
Merge branch 'main' into sde/ibc-transfer-service
stiiifff Oct 18, 2024
9ca194e
Remove port_id from IBC transfer service configs
stiiifff Oct 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
150 changes: 135 additions & 15 deletions .github/workflows/check-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}

keyleu marked this conversation as resolved.
Show resolved Hide resolved
- name: Get cargo
uses: actions-rs/toolchain@v1
with:
Expand Down Expand Up @@ -135,11 +130,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}

- name: Get cargo
uses: actions-rs/toolchain@v1
with:
Expand Down Expand Up @@ -185,10 +175,50 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
- name: Get cargo
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: optimized-contracts
path: ./artifacts

- name: List downloaded files
run: ls -l ./artifacts

- name: Download local-ic artifact
uses: actions/download-artifact@v3
with:
go-version: ${{ env.GO_VERSION }}
name: local-ic
path: /tmp

- name: Make local-ic executable
run: chmod +x /tmp/local-ic

- name: Start local-ic and wait for it to be ready
run: |
cd local-interchaintest
/tmp/local-ic start neutron_juno --api-port 42069 &
curl --head -X GET --retry 200 --retry-connrefused --retry-delay 5 http://localhost:42069

- name: Run 2 party POL Astroport on Neutron example
env:
RUST_LOG: debug
run: cargo run --package local-interchaintest --example two_party_pol_astroport_neutron

- name: Cleanup
run: killall local-ic && exit 0

local-ic-ibc-transfer-ntrn-juno:
needs: build
name: IBC transfer NTRN->JUNO e2e test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Get cargo
uses: actions-rs/toolchain@v1
Expand Down Expand Up @@ -219,10 +249,100 @@ jobs:
/tmp/local-ic start neutron_juno --api-port 42069 &
curl --head -X GET --retry 200 --retry-connrefused --retry-delay 5 http://localhost:42069

- name: Run 2 party POL Astroport on Neutron example
- name: Run IBC transfer NTRN->JUNO example
env:
RUST_LOG: debug
run: cargo run --package local-interchaintest --example two_party_pol_astroport_neutron
run: cargo run --package local-interchaintest --example ibc_transfer_ntrn_juno

- name: Cleanup
run: killall local-ic && exit 0

local-ic-ibc-transfer-juno-ntrn:
needs: build
name: IBC transfer JUNO->NTRN e2e test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Get cargo
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: optimized-contracts
path: ./artifacts

- name: List downloaded files
run: ls -l ./artifacts

- name: Download local-ic artifact
uses: actions/download-artifact@v3
with:
name: local-ic
path: /tmp

- name: Make local-ic executable
run: chmod +x /tmp/local-ic

- name: Start local-ic and wait for it to be ready
run: |
cd local-interchaintest
/tmp/local-ic start neutron_juno --api-port 42069 &
curl --head -X GET --retry 200 --retry-connrefused --retry-delay 5 http://localhost:42069

- name: Run IBC transfer JUNO->NTRN example
env:
RUST_LOG: debug
run: cargo run --package local-interchaintest --example ibc_transfer_juno_ntrn

- name: Cleanup
run: killall local-ic && exit 0

local-ic-ibc-transfer-ntrn-juno-gaia-pfm:
needs: build
name: IBC transfer NTRN->JUNO->GAIA PFM e2e test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Get cargo
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: optimized-contracts
path: ./artifacts

- name: List downloaded files
run: ls -l ./artifacts

- name: Download local-ic artifact
uses: actions/download-artifact@v3
with:
name: local-ic
path: /tmp

- name: Make local-ic executable
run: chmod +x /tmp/local-ic

- name: Start local-ic and wait for it to be ready
run: |
cd local-interchaintest
/tmp/local-ic start neutron_juno --api-port 42069 &
curl --head -X GET --retry 200 --retry-connrefused --retry-delay 5 http://localhost:42069

- name: Run IBC transfer NTRN->JUNO example
env:
RUST_LOG: debug
run: cargo run --package local-interchaintest --example ibc_transfer_ntrn_juno_gaia_pfm

- name: Cleanup
run: killall local-ic && exit 0
81 changes: 73 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 26 additions & 21 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,37 +52,42 @@ thiserror = "1.0.63"
osmosis-std = "0.26.0"

# our contracts
valence-authorization = { path = "contracts/authorization", features = ["library"] }
valence-base-account = { path = "contracts/accounts/base_account", features = ["library"] }
valence-processor = { path = "contracts/processor", features = ["library"] }
valence-splitter-service = { path = "contracts/services/splitter", features = ["library"] }
valence-test-dynamic-ratio = { path = "contracts/testing/test-dynamic-ratio", features = ["library"] }
valence-test-service = { path = "contracts/testing/test-service", features = ["library"] }
valence-workflow-registry = { path = "contracts/workflow-registry", features = ["library"] }
valence-astroport-lper = { path = "contracts/services/astroport-lper", features = ["library"] }
valence-forwarder-service = { path = "contracts/services/forwarder", features = ["library"] }
valence-astroport-withdrawer = { path = "contracts/services/astroport-withdrawer", features = ["library"] }
valence-reverse-splitter-service = { path = "contracts/services/reverse-splitter", features = ["library"] }
valence-authorization = { path = "contracts/authorization", features = ["library"] }
valence-base-account = { path = "contracts/accounts/base_account", features = ["library"] }
valence-processor = { path = "contracts/processor", features = ["library"] }
valence-splitter-service = { path = "contracts/services/splitter", features = ["library"] }
valence-test-dynamic-ratio = { path = "contracts/testing/test-dynamic-ratio", features = ["library"] }
valence-test-service = { path = "contracts/testing/test-service", features = ["library"] }
valence-workflow-registry = { path = "contracts/workflow-registry", features = ["library"] }
valence-astroport-lper = { path = "contracts/services/astroport-lper", features = ["library"] }
valence-forwarder-service = { path = "contracts/services/forwarder", features = ["library"] }
valence-astroport-withdrawer = { path = "contracts/services/astroport-withdrawer", features = ["library"] }
valence-generic-ibc-transfer-service = { path = "contracts/services/generic-ibc-transfer", features = ["library"] }
valence-neutron-ibc-transfer-service = { path = "contracts/services/neutron-ibc-transfer", features = ["library"] }
valence-reverse-splitter-service = { path = "contracts/services/reverse-splitter", features = ["library"] }
valence-osmosis-gamm-lper = { path = "contracts/services/osmosis-gamm-lper", features = ["library"] }

# our packages
valence-account-utils = { path = "packages/account-utils" }
valence-astroport-utils = { path = "packages/astroport-utils" }
valence-account-utils = { path = "packages/account-utils" }
valence-astroport-utils = { path = "packages/astroport-utils" }
valence-osmosis-utils = { path = "packages/osmosis-utils" }
valence-authorization-utils = { path = "packages/authorization-utils" }
valence-macros = { path = "packages/valence-macros" }
valence-polytone-utils = { path = "packages/polytone-utils" }
valence-processor-utils = { path = "packages/processor-utils" }
valence-service-base = { path = "packages/service-base" }
valence-service-utils = { path = "packages/service-utils" }
valence-workflow-registry-utils = { path = "packages/workflow-registry-utils" }
valence-workflow-manager = { path = "workflow-manager" }
valence-authorization-utils = { path = "packages/authorization-utils" }
valence-ibc-utils = { path = "packages/ibc-utils" }
valence-local-interchaintest-utils = { path = "packages/local-interchaintest-utils" }
valence-macros = { path = "packages/valence-macros" }
valence-polytone-utils = { path = "packages/polytone-utils" }
valence-processor-utils = { path = "packages/processor-utils" }
valence-service-base = { path = "packages/service-base" }
valence-service-utils = { path = "packages/service-utils" }
valence-workflow-registry-utils = { path = "packages/workflow-registry-utils" }
valence-workflow-manager = { path = "workflow-manager" }

# dev-dependencies
cw-multi-test = { version = "2.1.1", features = ["cosmwasm_1_4"] }
cw20 = { version = "2.0.0" }
cw20-base = { version = "2.0.0" }
hex = "0.4.3"
localic-utils = { git = "https://github.com/timewave-computer/localic-utils", branch = "main" }
margined-neutron-std = "4.2.0"
neutron-test-tube = "4.2.0"
tokio = "1.40.0"
Expand Down
1 change: 0 additions & 1 deletion contracts/accounts/base_account/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ optimize = """docker run --rm -v "$(pwd)":/code \
[dependencies]
cosmwasm-schema = { workspace = true }
cosmwasm-std = { workspace = true, features = ["stargate"] }

cw-ownable = { workspace = true }
cw-storage-plus = { workspace = true }
cw2 = { workspace = true }
Expand Down
4 changes: 1 addition & 3 deletions contracts/accounts/base_account/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ impl BaseAccountTestSuite {
crate::contract::query,
);

let inner = AccountTestSuiteBase::new(
Box::new(account_code) as Box<dyn cw_multi_test::Contract<_, _>>
);
let inner = AccountTestSuiteBase::new(Box::new(account_code));

Self {
inner,
Expand Down
Loading
Loading