Commit Graph

117 Commits

Author SHA1 Message Date
Kaku 7ef11596a0
cosmwasm: update cw wormhole rust tests (#4190)
* cosmwasm(cw_wormhole): integration tests- initial implementation

* chore: adding additional vaa parsing tests

* cosmwasm: added cw_wormhole integration tests and some code cleanup

cosmwasm: reverted contract changes

* cosmwasm: refactored the to guardianAddress logic

* wormchain: lower ict setup params to improve stability
2024-12-18 19:08:27 -06:00
cs 347357b251 fix clippy::needless-lifetimes warnings
by removing the binders for inferrable lifetimes
2024-12-02 12:56:17 -05:00
Kaku c35940ae96
cosmwasm: add support for json schemas for all contracts (#4118)
* cosmwasm: add support for json schemas for all contracts

* cosmwasm: fixed formatting as per the linter
2024-10-28 09:59:53 -05:00
Kaku aa81f9157b
cosmwasm: add wormchain ibc receiver tests (#4121) 2024-10-28 09:59:36 -05:00
bruce-riley 83c5e498c3
Terra2: Use "docker compose", not docker-compose (#4056) 2024-08-02 15:00:29 -05:00
Csongor Kiss 5995fd65b5 cosmwasm: add missing feature flags in Cargo.toml files
These flags were previously not declared, which is now reported by
clippy.
Also fixed the docstring indentation, which clippy also complains about now.
2024-07-25 11:23:35 -04:00
Csongor Kiss 0f3ffe705f
sdk,cosmwasm: fix new clippy 1.78.0 lints (#3925)
The 1.78 version of the rust toolchain has been released on the stable channel: https://github.com/rust-lang/rust-clippy/blob/master/CHANGELOG.md#rust-178

It introduces a number of new clippy lints. The relevant ones:

- https://rust-lang.github.io/rust-clippy/master/index.html#/assigning_clones
- https://rust-lang.github.io/rust-clippy/master/index.html#/multiple_bound_locations
- https://rust-lang.github.io/rust-clippy/master/index.html#/new_without_default

This commit fixes these lints.
2024-05-02 20:38:55 +01:00
A5 Pickle 22e31affe2
sdk/rust: prepare to publish crate (#3849)
* sdk/rust: organize workspace

* sdk/rust: add serde_wormhole to deps

* sdk/rust: serde_wormhole -> wormhole-raw-serde

* sdk/rust: add supported-chains; serde_wormhole -> wormhole-vaas-serde

* cosmwasm: fix deps

* sdk/rust: fix fmt

* sdk/rust: jk

* sdk/rust: add desc

* sdk/rust: rm Cargo.lock

* .github: fix workflow

---------

Co-authored-by: A5 Pickle <a5-pickle@users.noreply.github.com>
2024-03-25 14:09:54 -04:00
Jeff Schroeder b175dd43c8
docs: quit the spelling spam typo fix PRs with cspell magic (#3845)
* Add cspell configuration and custom dictionary

The goal is to cut down on both incoming tyops, and well meaning but
spammy tyop fix PRs.

To run cspell locally install it and run:

    cspell '**/*.md' \
        --config cspell.config.yaml \
        --words-only \
        --unique \
        --quiet | sort --ignore-case

* docs: cspell updates

* wormchain: cspell updates

* aptos: cspell updates

* node: cspell updates

* algorand: cspell updates

* whitepapers: cspell updates

* near: cspell updates

* solana: cspell updates

* terra: cspell updates

* cosmwasm: cspell updates

* ethereum: cspell updates

* clients: cspell updates

* cspell updates for DEVELOP document

* github: run cspell github action

* sdk: cspell updates

* github: only run cspell on markdown files

* algorand: EMMITTER --> EMITTER

Suggested-by: @evan-gray

* cspell: removed from dictionary

Suggested-by: @evan-gray

* aptos and node: cspell updates

Suggested-by: @evan-gray

* cosmowasm: doc updates for terra2

Suggested-by: @evan-gray

* algorand: cspell updates

Suggested-by: @evan-gray

* algorand: cspell updates

Suggested-by: @evan-gray

* cspell: updated custom word dictionary

This resorts the dictionary and adds a few new words from the
algorand/MEMORY.md document around varints and integers.

* cspell: sort the dictionary how vscode does it

On macOS the sorting is locale dependent. To do this on macOS, you have
to invert the case, do a character insensitive sort, and then invert the
case again:

    LC_COLLATE="en_US.UTF-8" cspell '**/*.md' --config cspell.config.yaml \
        --words-only \
        --unique \
        --no-progress \
        --quiet \
    | tr 'a-zA-Z' 'A-Za-z' \
    | sort --ignore-case \
    | tr 'a-zA-Z' 'A-Za-z'

This requires the `LC_COLLATE` variable to be set to `en_US.UTF-8`, or it
will not do the right thing.

* docs: grammar clean up

---------

Co-authored-by: Evan Gray <battledingo@gmail.com>
2024-03-20 15:40:02 -04:00
Evan Gray 3a8aec6217 ntt-accountant: update comment and add test 2024-03-15 20:49:23 -04:00
Evan Gray 8ca620b81e ntt-accountant: clean up and add normalize test 2024-03-07 11:04:06 -05:00
Evan Gray 71120245f1 ntt-accountant: update readme 2024-03-07 11:04:06 -05:00
Evan Gray 41e0b9accd ntt-accountant: improved relayer parsing test 2024-03-07 11:04:06 -05:00
Evan Gray fca76d14f5 ntt-accountant: remove commented tests, leave TODOs 2024-03-07 11:04:06 -05:00
Evan Gray dbc1bf6955 sdk/rust: shared accountant ModificationKind 2024-03-07 11:04:06 -05:00
Evan Gray 02e37667ff cosmwasm: functional ntt-accountant contract 2024-03-07 11:04:06 -05:00
Evan Gray 6aea705f0c ntt-accountant: copy from global-accountant
Change-Id: Ib27ad40c4c8cb1ab36391a0cbb1b79f1c711d0e3
2024-03-07 11:04:06 -05:00
Bing Yu 738a68a543
cosmwasm: accounting: change str.try_into().unwrap() to str.into() because conversion is infallible… (#3623)
Signed-off-by: bingyuyap <bingyu.yap.21@gmail.com>
2024-01-04 00:39:00 +08:00
Evan Gray 09d18801fd terra: update devnet address 2023-12-13 11:45:07 -05:00
Evan Gray 094a404902 tilt: remove additional root CA support 2023-12-12 14:22:05 -06:00
Evan Gray 69dbfb7c30 ci: fix terra2 test 2023-12-11 11:53:57 -05:00
Csongor Kiss 9a46b2e317 cosmwasm/Dockerfile: fix target cache
the cosmwasm optimizer script builds to the root directory
2023-12-06 20:40:17 +00:00
Steve 745351199b
Tokenfactory metadata display fix (#3337)
* Add tests for ibc-translator contract

* Tokenfactory metadata symbol fix: if symbol is empty when registering an
asset, populate tokenfactory's metadata symbol with the denom with
exponent string so it is not empty.

* Tokenfactory metadata display fix: use denom with exponent for this
string instead of base denom.
2023-11-14 14:46:09 -08:00
Steve fcd41cf883
Tokenfactory metadata symbol fix (#3336)
* Add tests for ibc-translator contract

* Tokenfactory metadata symbol fix: if symbol is empty when registering an
asset, populate tokenfactory's metadata symbol with the denom with
exponent string so it is not empty.

---------

Co-authored-by: Nikhil Suri <nikhilsuri@comcast.net>
2023-11-14 12:43:01 -08:00
Nikhil Suri 11bc1a5a91
cosmwasm: fix ibc-translator reply tests (#3521) 2023-11-13 17:17:47 -08:00
Steve ac9ff33b39
Add tests for ibc-translator contract (#3301) 2023-11-13 11:33:46 -08:00
Nikhil Suri 9c678e1db7
cosmwasm: update packet timeout comment in ibc-translator contract (#3510) 2023-11-13 11:29:38 -08:00
Nikhil Suri ff970b5cad cosmwasm: ibc-translator: increase packet timeout to 1 year 2023-10-27 00:25:14 -04:00
Csongor Kiss 299427087c
cosmwasm/global-accountant: fix clippy warning (#3432) 2023-10-10 14:59:31 -05:00
Csongor Kiss 512e507081 cosmwasm: run cargo fmt using new stable 1.72.0
commit-id:cb70a6c2
2023-08-25 10:39:21 -05:00
Steve 821a6e8752
Add ibc-translator contract to the cosmwasm workspace and it's governance packet to the rust sdk. (#3174)
* Add ibc-translator contract and it's governance packet to the rust sdk.

* Remove unnecessary cargo script

* rustfmt and clippy fixes

* Address review comments

* Use WormholeQuery instead of contract to verify vaa, remove wormhole
core contract dependency, remove feature flag on anybuf.

* Add cw20 token metadata to tokenfactory metadata

* Change Simple/ContractControlled payloads to
GatewayTransfer/GatewayTransferWithPayload

* Change display and scaled denom to ensure x/bank conformance.
2023-08-10 07:08:22 -07:00
Paul Noel 1badc908f5 cosmwasm: fix terra2 test 2023-06-13 07:51:38 -05:00
heyitaki 0ecc427d6f docker: build CLI in shared image
Co-authored-by: Evan Gray <battledingo@gmail.com>
2023-06-01 15:33:07 +01:00
bruce-riley 1514d7cd79
Scripts: For upgrading testnet (#2984) 2023-05-26 08:29:14 -05:00
Kevin Peters 1937691afe terra2: Fix broken CI tests due to LocalTerra v2.4.0 update
LocalTerra was updated to v2.4.0 and the LCD no longer returns
HTTP errors on some transaction failures (not enough gas still returns
an HTTP error). This caused some of the integration tests to break, because
the typescript SDK would throw on those HTTP errors.

https://github.com/terra-money/LocalTerra/releases/tag/v2.4.0
2023-05-25 13:14:10 -04:00
Nikhil Suri f6f93bf35e
tilt: devnet deployment for ibc generic messaging (#2593)
* Tilt devnet deployment for ibc generic messaging

* Address review comments from kcsongor and hendrikhofstadt

* Add IBC channel whitelist updates to wormchain and terra devnet deploy scripts

* VAAs had guardian set index three instead of zero

* ci: update addresses

* Remove message.block_height and message.tx_index from attributes

* Remove unnecessary contracts from terra2 devnet deployment

* Update wormhole-ibc address on terra2

* Update wormhole-ibc guardian set on terra2 devnet deployment

* IBC relayer testnet deployment fixes

* Wormchain update whitelist fix

---------

Co-authored-by: Bruce Riley <briley@jumptrading.com>
Co-authored-by: Evan Gray <battledingo@gmail.com>
2023-05-18 18:56:18 -04:00
Nikhil Suri 892274ffa4
cosmwasm: ibc contracts (#2591)
* cosmwasm: add wormchain-ibc-receiver and wormhole-ibc contracts

* Address review comments from jynnantonix and hendrikhofstadt

* Fix lint errors and test failures

* Update naming to reflect new mapping of channelId -> chainId

* Return errors in ibc handlers that should never be called

* Remove contract name and version logic from migration handlers

* Add query handlers to wormhole-ibc contract

* Add wormchain channel id whitelisting to wormhole-ibc contract

* Increase packet timeout to 1 year

* Rebase on main, update imports to new names

* Add governance replay protection to both contracts

* wormhole_ibc SubmitUpdateChannelChain should only handle a single VAA

* better error messages

* Better logging and strip null characters from channel_id from governance VAA

* add brackets back for empty query methods

* Update Cargo.lock

* Only send wormhole wasm event attributes via IBC and add attribute whitelist on the receiver end

* tilt: fix terra2 deploy

* Update based on comments from jynnantonix

---------

Co-authored-by: Evan Gray <battledingo@gmail.com>
2023-05-18 07:34:15 -04:00
Nikhil Suri 842462fd78
cosmwasm: remove terraswap dependency (#2739)
* cosmwasm: remove terraswap dependency

* add test to ensure serialization is the same
2023-05-04 07:56:01 -07:00
Nikhil Suri c5df4dbfe6
cosmwasm: token bridge: add new CompleteTransferResponse struct as data to complete_transfer executions (#2653) 2023-04-20 07:13:49 -07:00
Nikhil Suri d7b6be7358
Cosmwasm package naming updates (#2641)
* sdk: update wormhole-core to wormhole-sdk and fix lib name to be wormhole_sdk

* cosmwasm: update wormhole and token bridge cosmwasm package/lib names

* Fix terra2 deployment script with new artifact names
2023-04-18 09:31:38 -07:00
Nikhil Suri 8837a9af50
cosmwasm: bump k256 dependency to 0.11 (#2630)
* cosmwasm: add test for keys_equal

* cosmwasm: bump k256 from 0.9.4 to 0.11

* Update bad_signature tests to use new error messages
2023-04-14 15:04:49 -05:00
Nikhil Suri 56b847c41d
cosmwasm: clean up unused dependencies (#2629) 2023-04-13 12:34:08 +01:00
Conor Patrick 26839604c8 accountant: export governance modules from sdk to double check in contract 2023-03-16 08:48:25 -05:00
Conor Patrick 6324a239f9 accountant: address comments from #2513 2023-03-16 08:48:25 -05:00
Conor Patrick 3a1bc456e3 accountant: separate modify_balance into separate module and check test errors 2023-03-16 08:48:25 -05:00
Evan Gray c07cba2836 cosmwasm: acct: fix emitter requirements 2023-03-10 14:44:17 -06:00
Conor Patrick a64e4717de accountant: review comments 2023-02-27 08:52:42 -06:00
Conor Patrick 7c5bdb1863 accountant: remove double keccak for submitting observations 2023-02-27 08:52:42 -06:00
Conor Patrick b35480f966 accountant: address review comments for modify governance vaa 2023-02-15 06:23:25 -08:00
Conor Patrick a3a8e3ea87 accountant: use token bridge governance vaa to make modifications 2023-02-15 06:23:25 -08:00