-
Notifications
You must be signed in to change notification settings - Fork 3
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
Implement Valence and Astroport Utils #1
Merged
Merged
Changes from all commits
Commits
Show all changes
74 commits
Select commit
Hold shift + click to select a range
5db1c8a
Create TestContext.
dowlandaiello 4b896ac
Create a neutron example.
dowlandaiello 7c8a209
Get create_auction working.
dowlandaiello 90c1677
Add utility mehods for creating astroport pools.
dowlandaiello eabe38c
Finish get_pool implementation.
dowlandaiello 3050aba
Create github action.
dowlandaiello c0766ca
Fix test path.
dowlandaiello d7d4844
Rename all create functions to tx_create.
dowlandaiello 334b352
Add methods for funding auctions and starting auctions.
dowlandaiello 8fdf576
Add fund astroport pool helpers.
dowlandaiello 21c4760
Use with_ prefix for builder methods.
dowlandaiello 9c00a7a
Migrate astroport functions from serde_json::value to canonical vals.
dowlandaiello 52b0c78
Fix API conformance issues in example after previous commit.
dowlandaiello 47611c6
Update astroport contracts.
dowlandaiello 65b6ce2
Add ConfigChainBuilder defaults for stride, neutron, osmosis.
dowlandaiello afcf3bc
Use defaut API port.
dowlandaiello 2ca08e1
Builder-ify many txs.
dowlandaiello df3c1c8
Use with_offer_asset instead of with_pair.
dowlandaiello 483b9b2
Fix an incorrect builder method.
dowlandaiello e1e2277
Finish builder migration.
dowlandaiello 982c7f5
Remove an extraneous println.
dowlandaiello 88cb030
Attach proper denom quantities to funding tx.
dowlandaiello 3773ed6
See previous.
dowlandaiello f155eb8
Add methods for minting tokens.
dowlandaiello b1f7d97
Finish mint tokenfactory token impl.
dowlandaiello 0c04b55
Increase gas for providing liquidity.
dowlandaiello 146a6fc
Increase all gas limits.
dowlandaiello 77011bc
Add a setter for block delta.
dowlandaiello 12d3c4d
Use new end_block_delta option in neutron.rs.
dowlandaiello b79a9ca
Inline all exec() error logs.
dowlandaiello 5114992
Add price orable utils.
dowlandaiello 2724ef3
Allow another logs format for get_tx_events.
dowlandaiello 99db25f
Migrate from chain id's to chain names.
dowlandaiello ad05068
Add slippage tolerance to LP builder.
dowlandaiello dd193a3
Rename get_tx_events to get_tx_errors.
dowlandaiello 89d98f3
Debugging github actions.
dowlandaiello 6421c25
Being ratelimited.
dowlandaiello 09da67b
Add an option for skipping logs unwrapping.
dowlandaiello 3384024
Pin localic-std.
dowlandaiello 58cef7e
Start working on osmosis helper functions.
dowlandaiello 03c52d7
Fix pool creation.
dowlandaiello b3d0295
Start working on IBC transfer.
dowlandaiello 3a9b509
Add a flake file.
dowlandaiello 9cf3717
Run IBC tests in GH action.
dowlandaiello ea127b8
Fix ibc transfers.
dowlandaiello bd76216
Send funds for initial deposit alongside create pool tx.
dowlandaiello fe2af3d
Send tokens with create pool tx.
dowlandaiello 3f11d4e
Don't send funds alongside pool creation.
dowlandaiello 08f4184
Revert "Don't send funds alongside pool creation."
dowlandaiello 8cd95b6
Reapply "Don't send funds alongside pool creation."
dowlandaiello ea682d0
Implement ibc transfers.
dowlandaiello 85bf346
Implement get osmo pool.
dowlandaiello 1b47899
Fix osmosis tx receipt guarding.
dowlandaiello 9f34ad5
Only include recipient if the user specifies it in mint tx.
dowlandaiello 1b33ab8
Guard tokenfactory txs.
dowlandaiello 387251d
Guard more txs.
dowlandaiello 2c69266
Use proper chain name when unwrapping logs for tokenfactory tx.
dowlandaiello 3f8504c
Unwrap logs for osmosis pool creation.
dowlandaiello 354b997
Separate test jobs into separate jobs.
dowlandaiello ba1745b
Rename a job.
dowlandaiello 0867b54
Fix denom get function.
dowlandaiello 46e4303
Update neutron osmosis tests to make pools.
dowlandaiello 78b5a32
Fix get ibc denom helper function.
dowlandaiello 840d5f1
Gitignore logs.json.
dowlandaiello 6df58fc
Use addrs consistent with other chain configs.
dowlandaiello e74aeb3
Update src/utils/test_context.rs
dowlandaiello 21de788
Remove some errors from fixtures.rx.
dowlandaiello 696ea78
Update addresses in osmo test.
dowlandaiello 3c16ad3
Add a helper for getting an IBC trace.
dowlandaiello f5b4632
Add a trace type to ibc.
dowlandaiello a991fc2
Add dest denoms to ibc trace type.
dowlandaiello f5b2800
Use Keyne's ibc channel lookup logic.
dowlandaiello d26c395
IBC denom get fix: denoms are calculated using src denoms.
dowlandaiello 52f0f79
Unwind denoms in get_ibc_denom.
dowlandaiello File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: Test Localic-utils | ||
|
||
on: [push] | ||
|
||
env: | ||
GO_VERSION: 1.21 | ||
|
||
jobs: | ||
neutron-int-test: | ||
name: Neutron integration test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
|
||
- name: Install local-ic | ||
run: cd examples && git clone https://github.com/strangelove-ventures/interchaintest.git && cd interchaintest/local-interchain && make install | ||
|
||
- name: Get cargo | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
|
||
- name: Run neutron example | ||
run: cd examples && local-ic start neutron_gaia --api-port 42069 & curl --head -X GET --retry 200 --retry-connrefused --retry-delay 1 http://localhost:42069 && cd examples && cargo run --example neutron | ||
neutron-osmosis-int-test: | ||
name: Neutron-Osmosis integration test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
|
||
- name: Install local-ic | ||
run: cd examples && git clone https://github.com/strangelove-ventures/interchaintest.git && cd interchaintest/local-interchain && make install | ||
|
||
- name: Get cargo | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
|
||
- name: Run neutron-osmosis example | ||
run: cd examples && local-ic start neutron_gaia --api-port 42069 & curl --head -X GET --retry 200 --retry-connrefused --retry-delay 1 http://localhost:42069 && cd examples && cargo run --example neutron_osmosis | ||
osmosis-int-test: | ||
name: Osmosis integration test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
|
||
- name: Install local-ic | ||
run: cd examples && git clone https://github.com/strangelove-ventures/interchaintest.git && cd interchaintest/local-interchain && make install | ||
|
||
- name: Get cargo | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
|
||
- name: Run osmosis example | ||
run: cd examples && local-ic start neutron_gaia --api-port 42069 & curl --head -X GET --retry 200 --retry-connrefused --retry-delay 1 http://localhost:42069 && cd examples && cargo run --example osmosis |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[package] | ||
name = "localic-utils" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
localic-std = { git = "https://github.com/strangelove-ventures/interchaintest", rev = "f326371" } | ||
cosmwasm-std = "1.5.4" | ||
serde = { version = "1.0.203", features = ["derive"] } | ||
serde_json = "1.0.117" | ||
thiserror = "1.0" | ||
derive_builder = "0.20.0" | ||
log = "0.4.21" | ||
astroport = "5.1.0" | ||
reqwest = { version = "0.11.20", features = ["rustls-tls"] } | ||
|
||
[dev-dependencies] | ||
env_logger = "0.11.3" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# localic-utils examples | ||
|
||
To run the examples: | ||
|
||
## Start local-interchain | ||
|
||
```bash | ||
local-ic start <example_chain> --api-port 42069 | ||
``` | ||
|
||
## Run the eample | ||
|
||
```bash | ||
cargo run --example <example_name> | ||
``` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,206 @@ | ||
{ | ||
"chains": [ | ||
{ | ||
"name": "gaia", | ||
"chain_id": "localcosmos-1", | ||
"denom": "uatom", | ||
"binary": "gaiad", | ||
"bech32_prefix": "cosmos", | ||
"docker_image": { | ||
"version": "v15.0.0-rc2" | ||
}, | ||
"gas_prices": "0%DENOM%", | ||
"chain_type": "cosmos", | ||
"coin_type": 118, | ||
"trusting_period": "336h", | ||
"gas_adjustment": 2.0, | ||
"number_vals": 1, | ||
"number_node": 0, | ||
"ibc_paths": [], | ||
"debugging": true, | ||
"block_time": "500ms", | ||
"host_port_override": { | ||
"26657": "26658", | ||
"1317": "1318", | ||
"9090": "9091" | ||
}, | ||
"genesis": { | ||
"modify": [ | ||
{ | ||
"key": "app_state.gov.params.voting_period", | ||
"value": "3s" | ||
}, | ||
{ | ||
"key": "app_state.interchainaccounts.host_genesis_state.params.allow_messages", | ||
"value": [ | ||
"/cosmos.bank.v1beta1.MsgSend", | ||
"/cosmos.bank.v1beta1.MsgMultiSend", | ||
"/cosmos.staking.v1beta1.MsgDelegate", | ||
"/cosmos.staking.v1beta1.MsgUndelegate", | ||
"/cosmos.staking.v1beta1.MsgBeginRedelegate", | ||
"/cosmos.staking.v1beta1.MsgRedeemTokensforShares", | ||
"/cosmos.staking.v1beta1.MsgTokenizeShares", | ||
"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", | ||
"/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", | ||
"/ibc.applications.transfer.v1.MsgTransfer" | ||
] | ||
} | ||
], | ||
"accounts": [ | ||
{ | ||
"name": "acc0", | ||
"address": "cosmos1hj5fveer5cjtn4wd6wstzugjfdxzl0xpxvjjvr", | ||
"amount": "20000000000%DENOM%", | ||
"mnemonic": "decorate bright ozone fork gallery riot bus exhaust worth way bone indoor calm squirrel merry zero scheme cotton until shop any excess stage laundry" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "neutron", | ||
"chain_id": "localneutron-1", | ||
"denom": "untrn", | ||
"binary": "neutrond", | ||
"bech32_prefix": "neutron", | ||
"docker_image": { | ||
"version": "v3.0.4", | ||
"repository": "ghcr.io/strangelove-ventures/heighliner/neutron" | ||
}, | ||
"gas_prices": "0.0untrn,0.0uatom", | ||
"chain_type": "cosmos", | ||
"coin_type": 118, | ||
"trusting_period": "336h", | ||
"gas_adjustment": 1.3, | ||
"number_vals": 1, | ||
"number_node": 0, | ||
"ics_consumer_link": "localcosmos-1", | ||
"ibc_paths": ["neutron-osmosis"], | ||
"debugging": true, | ||
"block_time": "500ms", | ||
"host_port_override": { | ||
"26657": "26657", | ||
"1317": "1317", | ||
"9090": "9090" | ||
}, | ||
"genesis": { | ||
"modify": [ | ||
{ | ||
"key": "consensus_params.block.max_gas", | ||
"value": "100000000" | ||
}, | ||
{ | ||
"key": "app_state.ccvconsumer.params.soft_opt_out_threshold", | ||
"value": "0.05" | ||
}, | ||
{ | ||
"key": "app_state.ccvconsumer.params.reward_denoms", | ||
"value": ["untrn"] | ||
}, | ||
{ | ||
"key": "app_state.ccvconsumer.params.provider_reward_denoms", | ||
"value": ["uatom"] | ||
}, | ||
{ | ||
"key": "consensus_params.block.max_gas", | ||
"value": "1000000000" | ||
}, | ||
{ | ||
"key": "app_state.globalfee.params.minimum_gas_prices", | ||
"value": [ | ||
{ | ||
"denom": "untrn", | ||
"amount": "0" | ||
} | ||
] | ||
}, | ||
{ | ||
"key": "app_state.feeburner.params.treasury_address", | ||
"value": "neutron1hj5fveer5cjtn4wd6wstzugjfdxzl0xpznmsky" | ||
}, | ||
{ | ||
"key": "app_state.tokenfactory.params.fee_collector_address", | ||
"value": "neutron1hj5fveer5cjtn4wd6wstzugjfdxzl0xpznmsky" | ||
}, | ||
{ | ||
"key": "app_state.interchainaccounts.host_genesis_state.params.allow_messages", | ||
"value": [ | ||
"/cosmos.bank.v1beta1.MsgSend", | ||
"/cosmos.bank.v1beta1.MsgMultiSend", | ||
"/cosmos.staking.v1beta1.MsgDelegate", | ||
"/cosmos.staking.v1beta1.MsgUndelegate", | ||
"/cosmos.staking.v1beta1.MsgBeginRedelegate", | ||
"/cosmos.staking.v1beta1.MsgRedeemTokensforShares", | ||
"/cosmos.staking.v1beta1.MsgTokenizeShares", | ||
"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", | ||
"/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", | ||
"/ibc.applications.transfer.v1.MsgTransfer", | ||
"/ibc.lightclients.localhost.v2.ClientState", | ||
"/ibc.core.client.v1.MsgCreateClient", | ||
"/ibc.core.client.v1.Query/ClientState", | ||
"/ibc.core.client.v1.Query/ConsensusState", | ||
"/ibc.core.connection.v1.Query/Connection" | ||
] | ||
} | ||
], | ||
"accounts": [ | ||
{ | ||
"name": "acc0", | ||
"address": "neutron1hj5fveer5cjtn4wd6wstzugjfdxzl0xpznmsky", | ||
"amount": "100000000000000000%DENOM%", | ||
"mnemonic": "decorate bright ozone fork gallery riot bus exhaust worth way bone indoor calm squirrel merry zero scheme cotton until shop any excess stage laundry" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "osmosis", | ||
"chain_id": "localosmosis-1", | ||
"denom": "uosmo", | ||
"binary": "osmosisd", | ||
"bech32_prefix": "osmo", | ||
"docker_image": { | ||
"version": "v25.0.4", | ||
"repository": "ghcr.io/strangelove-ventures/heighliner/osmosis" | ||
}, | ||
"gas_prices": "0.0025%DENOM%", | ||
"chain_type": "cosmos", | ||
"coin_type": 118, | ||
"trusting_period": "336h", | ||
"gas_adjustment": 2, | ||
"number_vals": 1, | ||
"number_node": 0, | ||
"ibc_paths": ["neutron-osmosis"], | ||
"debugging": true, | ||
"block_time": "500ms", | ||
"host_port_override": { | ||
"26657": "26659", | ||
"1317": "1319", | ||
"9090": "9092" | ||
}, | ||
"genesis": { | ||
"modify": [ | ||
{ | ||
"key": "app_state.gov.params.voting_period", | ||
"value": "3s" | ||
}, | ||
{ | ||
"key": "app_state.gov.params.max_deposit_period", | ||
"value": "15s" | ||
}, | ||
{ | ||
"key": "app_state.gov.params.min_deposit.0.denom", | ||
"value": "uosmo" | ||
} | ||
], | ||
"accounts": [ | ||
{ | ||
"name": "acc0", | ||
"address": "osmo1hj5fveer5cjtn4wd6wstzugjfdxzl0xpwhpz63", | ||
"amount": "10000000000%DENOM%", | ||
"mnemonic": "decorate bright ozone fork gallery riot bus exhaust worth way bone indoor calm squirrel merry zero scheme cotton until shop any excess stage laundry" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} |
Oops, something went wrong.
Oops, something went wrong.
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.
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.
@uditvira do we want to have either a
timewave
orvalance
prefix for the crate name ?