Commit Graph

46 Commits

Author SHA1 Message Date
Chirantan Ekbote f7cc16aa91 terra: Fix clippy warnings 2022-10-28 14:35:44 -04:00
Chirantan Ekbote 68ae3ff6cd terra: Fix formatting
Also disable the unstable options in rustfmt.toml.
2022-10-28 14:35:44 -04:00
Csongor Kiss 37ee5cf4a4 terra: Add fromAddress to payload 3 2022-09-27 12:19:25 -04:00
Csongor Kiss d0900c791a terra/token-bridge: fix lunc tax deduction 2022-09-27 11:54:47 -04:00
Csongor Kiss ca43f8629a
terra: Check that bytes32 fits into 20 bytes before truncating (#1458) 2022-08-23 21:13:30 +02:00
Csongor Kiss 3e63590c10 terra: Don't migrate wrapped assets for now
See comment in the code for more context
2022-08-10 22:19:16 +01:00
Csongor Kiss 9c9f5b4b23 terra/token_bridge: fixed wrapped asset ids
The wrapped assets on terra have been migrated to code id 767, but the
config wasn't updated to store this new code id, so newly created
wrapped assets all use an older code id. This patch upgrades all wrapped
assets to 767 and changes the config so future wrapped assets also use
that code id.

Also added a new function `migrate_wrapped_assets` so this task can be
done in the future in a less error-prone way.
2022-08-08 12:42:32 -05:00
Csongor Kiss aea76be327 terra: Ensure that recipient address is 32 bytes.
Before this check, users were able to lose funds by sending money to an
address that's shorter than 32 bytes.
This commit is essentially a backport of the fix from the new cosmwasm contract.
2022-08-08 12:12:14 -05:00
Kevin Peters 910eb0f3e0 fix terra classic native token parsing
when a native denom is received (complete transfer native),
check if the token chain is terra classic
2022-08-03 12:02:02 -05:00
Csongor Kiss d8e7a5f93f terra/token_bridge: transfer with payload
Also rename terra token-bridge package so it's unique Otherwise cargo
can't find it externally, and confuses it with the solana one.
2022-05-11 21:24:36 -04:00
Chirantan Ekbote e907a05b1e sdk, terra: Fix tests and add them to CI
The terra tests had bit rotted quite terribly. It seems no one has run
them in almost a year because the API changed with the 0.14 release of
cosmwasm_vm in April, 2021.

Completely remove cosmwasm_vm from dev-dependencies.  The tests aren't
doing anything that requires interacting with the wasm code and can just
test the relevant functions directly.

Once this goes in the tests should be running in the CI so hopefully no
one will be able to push any more breaking changes.

commit-id:537d95e6
2022-04-20 09:46:51 +09:00
Chirantan Ekbote 1ae8ee4913 terra: Send relayer fee to message sender
This was incorrectly sending the fee to the recipient.
2022-03-29 00:30:35 +09:00
Csongor Kiss 0044bb5e44 terra/token_bridge: remove migration code
This migration handler has successfuly completed (txn:
67E8FCFF48EEFE11BF6A975E621B6866BA930F9D2A85BC9AC5A70F009EE354C7) so
we can remove it.
2022-01-28 10:44:10 +00:00
Csongor Kiss 52562cacb0 terra/token_bridge: reentrancy protection
commit-id:2c0bdfaf
2022-01-28 10:44:10 +00:00
Csongor Kiss 5d90af5195
terra/token_bridge: fix cw20 migrations (#745)
commit-id:c8aac03a
2022-01-20 19:06:34 +00:00
Csongor Kiss 7e212fa739
terra/nft_bridge: Implement nft-bridge for terra (#698)
commit-id:0b547fa5
2022-01-07 16:47:33 +01:00
Evan Gray 98cb787512 terra: fix tax calculation on withdraw_tokens 2021-12-23 15:03:04 -05:00
Reisen 7415fda312 terra/token_bridge: migration prep
Change-Id: I3bc054265e6296ce2fa4191c0395ca8531b0f4a8
2021-10-29 16:51:34 +00:00
Reisen c832b123fc terra: cw20 migrations
Change-Id: I3c75291a0d3016a197a15d9ee0717b16b3b479d3
2021-10-27 19:55:42 +00:00
Reisen 17ba6b12d0 terra: post migration fee change
Change-Id: I9e1517cf3038f80836b58810e11bddc1b58e6fbf
2021-10-19 15:25:01 +00:00
Reisen fc1c91a4b4 terra/token_bridge: set code_id to deployed cw20_wrapped
Change-Id: I275cb38a049290e8399f3fdc5f304c3fc12551f6
2021-10-11 16:53:07 +00:00
Reisen ddf43b85d7 terra: migrations for lower bridge fee
Change-Id: Ic83b321d42c9148f3915a365d195298ff052eda2
2021-10-11 16:32:56 +00:00
Reisen 91087bdb66 terra/token_bridge: allow newer sequenced vaa metadata
Change-Id: Ie81584abe6671595118082796df57bcea75a8fd3
2021-10-11 16:24:36 +00:00
Reisen e2a16b6756 terra: migrations for cw20
Change-Id: I201021ed763e8b94a2d029d79ba5ce7e3d3868e3
2021-10-11 16:21:33 +00:00
Reisen b9a61a152e terra/token_bridge: remove tax from native transfers
Change-Id: Ia40808508c08b13a2f1bd1b43c0102eabb2c54f6
2021-10-05 14:57:16 +00:00
Reisen 3607884556 terra/token_bridge: upgradability
Change-Id: Ib41583c0d99aad0e77fb970bc9ee0f7be56f6b4e
2021-10-05 10:41:09 +00:00
Reisen b662de4efb terra: columbus-5 contracts by default
Change-Id: I007689b032c6182e35421b47b56787a657a6919c
2021-10-04 16:41:31 +00:00
Reisen d2c976b04c terra/token_bridge: subtract tax from deposited tokens
Change-Id: Ib1647a4b3757054fc91fe4dd51317a5095a526a2
2021-10-04 16:41:31 +00:00
Reisen 56c1b43280 bridge_ui: deposit tokens in terra flow
Change-Id: If64963644e638dbb24c1334eebbc207b415e5a3a
2021-10-04 16:41:31 +00:00
Reisen a9e98247bc terra/token_bridge: transfer native
Change-Id: I53fb27b467c96474f2980d495232ac955187775a
2021-10-04 16:41:31 +00:00
Reisen 50bd0355fd terra/contracts: rustfmt in line with solana
Change-Id: I566dc2c4504bf7014d11a6d18775c4eec896b42f
2021-09-06 14:58:48 +00:00
Leo 9a85dbafe5 Add Go linting stage to CI
rustfmt appears to be a little more complicated since it wants to
download dependencies and needs nightly Rust.

Change-Id: Ia348def30a6459ae2ab6c29a8c3a413216f5eb4b
2021-08-31 08:58:17 +00:00
Alwin Peng e08116635e deduct taxes from coins sent to wormhole contract from token bridge, in case fee denom switches from uluna
Change-Id: I141b53b51c883162b49d6caa74225ce1c030995f
2021-08-30 08:43:37 +00:00
Hendrik Hofstadt b37853f7d9 Use safe math in terra
This uses safe math even in places where it's technically not necessary, but we want to be consistent here.

Change-Id: I5f9c8e2c0a798a38e4459f673541024bc0f07ef4
2021-08-02 15:55:40 +00:00
Hendrik Hofstadt 7f67ba1194 Replay protection for terra governance VAAs
Change-Id: Ib197e1d842093c578c2a6858c3b0a3ef3d18665d
2021-08-02 15:55:40 +00:00
Hendrik Hofstadt 895e40578c Check emitter for wAsset creation on terra
Addresses audit comment

Change-Id: Icf6b1e52e58f5cab6e39db1ed663dc6f6a2c2476
2021-08-02 15:55:40 +00:00
Alwin Peng 2d9ae8e860 check & add vaa to archive on all submit_vaa calls
Change-Id: Ia0b1a5e9ee8f6467dff34d9cd92183cba49bccf5
2021-07-29 15:25:38 -04:00
Alwin Peng 2c56a916eb fix bytes -> string, flip arg order to be less confusing
Change-Id: I952b73628e56bc9449e5525bfd85e57851c20143
2021-07-28 16:00:44 +00:00
Alwin Peng c8bc1b57cc decimal shifting + max outstanding in terra token bridge
Change-Id: I830ea33abfd0b836ea5e69a77678f962cd771e01
2021-07-28 16:00:42 +00:00
Hendrik Hofstadt c819165d5c Port terra governance changes to token bridge
Change-Id: I534b408c4539a6badf636d298b57f6d2df3c34d8
2021-07-26 19:04:20 +00:00
Hendrik Hofstadt 4753700d3f Remove persistence remainders from terra
Change-Id: I27657333ebd4f8b7ba433c6d0680ee061b965571
2021-07-20 23:52:40 +02:00
Hendrik Hofstadt d12863f957 fix terra vaa parsing
Change-Id: I27306e004897f971d62c82e6046c1f6ec0016247
2021-07-20 17:09:39 +00:00
Hendrik Hofstadt 0f854dc08b Track optional persistence in guardian and terra
Also reformatting

Change-Id: Ibdc426aa09a74a6f564090bb838be1b037a9fce1
2021-07-05 18:02:04 +00:00
Alwin 2025efd50a switch terra contracts over to using governance packet structure
Change-Id: I10b53cb0cfdb86ca2aa57cab20ec375a26fd252e
2021-06-01 17:10:34 -04:00
Alwin 08ca466a40 clean up error messages, duplicated files, fix bug where asset can be attested multiple times
Change-Id: I95655968d3582e837a28eddc34d15d4ca55a488b
2021-05-31 18:04:12 -04:00
Alwin 16cc520187 initial terra contracts for wormhole v2
Change-Id: Ie28f1e7ce381fcbf33de609bc6c8465679cd2a43
2021-05-31 09:13:59 -04:00