Commit Graph

499 Commits

Author SHA1 Message Date
scnale 11a82aee56
sdk/js: fixes id check in token helper for sui. (#3382) 2023-09-28 08:40:43 -04:00
derpy-duck faa397ca4f
AutoRelayer: v1.1 Release (#3313)
* AutoRelayer: remove forwards

* AutoRelayer: reentrancy guard

* AutoRelayer: remove forwards from sdk

* AutoRelayer: VaaKey -> MessageKey internals

* AutoRelayer: check delivery provider supports keyType

* AutoRelayer: VaaKey backcompat wire format

* AutoRelayer: sdk fix

* AutoRelayer: Add supported keys to delivery provider

* AutoRelayer: reintroduce reentrancy guard, revert when replay protection triggered

* AutoRelayer: fix manual delivery test

* AutoRelayer: review flups

* AutoRelayer: move libraries within relayer folder

* AutoRelayer: fix delivery provider config script

Also fix delivery provider revert bug

* AutoRelayer: Andreas code review flups

* AutoRelayer: js sdk includes MessageKey serde

* AutoRelayer: update sdk to use message key

* AutoRelayer: Simplify executeInstruction to internal call (#3352)

* refund instead of revert for replay protection (#3371)

* refund instead of revert for replay protection

* Remove mention of forward from IWormholeReceiver

* AutoRelayer: 1.1 reintroduce forwards (#3385)

* forward fallback WIP

* forward fallback no tmp storage

* Re-introduce testing of 'forward'

* Reintroduce forwards with original or default behavior for refund info + delivery provider info

* Reintroduce reentrant, only store refund information

---------

Co-authored-by: Joe Howarth <josephehowarth@gmail.com>
Co-authored-by: Joe Howarth <jhowarth@jumptrading.com>
2023-09-22 15:07:59 -04:00
M-Picco bb8873ffea Add Kujira chain id 2023-09-15 12:40:42 -04:00
bruce-riley ac11e15746
Node/SDK: Set testnet wormchain token bridge addr (#3372) 2023-09-12 08:29:18 -05:00
Martin Picco e8266174e7
sdk/js: add cosmoshub and evmos chain ids (#3317) 2023-09-11 19:18:13 -04:00
bruce-riley c1ff1e1d1c
Node/Gateway: Relay attestations (#3350) 2023-09-07 14:11:15 -05:00
derpy-duck 5457e7ff98
bugfix (#3319) 2023-09-05 12:19:09 -07:00
Paul Noel ede5c5bc1e sdk/js: change sei array conversion 2023-09-05 10:59:34 -05:00
Evan Gray 6f7b2ffdb7 sdk/js: version bump to resolve conflict 2023-08-28 12:32:19 -04:00
Kevin Peters cdbc8da028 sdk/js: v0.10.0 release 2023-08-28 10:48:22 -04:00
Kevin Peters 04b7afeb62 sdk/js: Aptos transfer with payload support 2023-08-28 10:48:22 -04:00
Kevin Peters a9ea12c071 sdk/js: v0.9.24 release 2023-08-25 13:16:02 -05:00
Kevin Peters 93122bca88 sdk/js: Added transfer with payload from Sui 2023-08-25 13:16:02 -05:00
bruce-riley 153ee5514c
Node/Gateway: Watcher shouldn't drop recv_packet (#3304) 2023-08-21 16:46:01 -05:00
Steve 6b3819cc41
wormchain: add upgrade vaa and upgrade handler. Removes set params vaa. (#3292)
* Add chain upgrade vaa and upgrade handler. Removes set params vaa.

* Update node package

* Fix vaa payload test
2023-08-16 20:24:57 -04:00
Nikhil Suri 6aa80d459c
wormchain: setparams gov vaa (#3285)
* node: add new governance VAA for setting default tokenfactory and packet forward middleware params on Gateway

* wormchain: add msg_server handler to set default tokenfactory and pfm params

* node: add gateway template command

* node: fix lint errors

* Update goverance message to be generic

* x/wormhole: add RunInPlaceUpgrade tx cli command

* Merge gateway governance VAAs into a single rpc handler

* update admin client naming for gateway governance messages
2023-08-14 20:37:50 -04:00
bruce-riley 1cabbe8a2d
sdk: Rootstock readonly (#3235) 2023-08-14 13:17:47 -04:00
bruce-riley 86e905e1e8
node: Gateway watcher support (#3275)
* Gateway/Node: Watcher support

* Fix prettier error

* Work around duplicate VAA error
2023-08-14 11:13:20 -04:00
Steve 3337783c6d
wormchain: add ibc-composability-mw to gateway (#3273)
* Add ibc-composability-mw to gateway along with updates to node for
ibc-composability-mw and ibc-translator.

* Move governance action to new GatewayModule

---------

Co-authored-by: Nikhil Suri <nikhilsuri@comcast.net>
2023-08-14 10:49:02 -04:00
Paul Noel 826c9939d1 sdk/js: add circleIntegration parsing 2023-08-14 10:45:51 -04:00
Kevin Peters 8e5807bdea sdk/js: v0.9.23 release 2023-08-10 10:10:17 -04: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
derpy-duck 89e97fc366 sdk changes 2023-08-09 18:24:55 -05:00
Nikhil Suri aa44e82f7c
Instantiate allowlist (#3181)
* sdk: add wormchain instantiate allowlist governance VAA

* wormchain: add wasm instantiate allowlist msg handler

* Add cli for instantiate allowlist (#3199)

* Add cli for instantiate allowlist and fix
vaa.BodyWormchainAllowlistInstantiateContract deserialization

* Lint fixes

* Add instantiate allowlist to codec and genesis

* Add MsgDeleteWasmInstantiateAllowlist, update naming to be consistent across all types

* Fix key prefix for GetAllWasmInstiateAllowedAddresses

* Update wasmd tag version

* Fix 5 bit encoding bug

* Add query cli and rpc handler

* Add query cli and rpc files

* use cosmos-sdk method for computing bech32

---------

Co-authored-by: Steve <1848680+misko9@users.noreply.github.com>
2023-08-07 11:18:40 -07:00
Ben Guidarelli 155d206322
SDK: fix chain id/name types (#3250) 2023-08-04 12:57:43 -04:00
Ben Guidarelli 544d542c6e
SDK: remove semicolon in event definition (#3249) 2023-08-02 16:44:44 -04:00
derpy-duck f11299b888
SDK: const update (#3242) 2023-07-28 12:36:09 -04:00
Ben Guidarelli 53fd4c3a7a
SDK: bump algosdk version (#3231) 2023-07-25 14:15:48 -04:00
Kevin Peters a13e06c153 CI should run prettier@2.3.2 2023-07-25 12:54:44 -05:00
Kevin Peters 94321a2d84 sdk/js: v0.9.22 release 2023-07-19 15:55:45 -05:00
bruce-riley d1cfbdf46c
Node: Base deployment (#3213)
* Node: Base deployment

Change-Id: I9ccd5cbc6c44d1891acb9d443e9e2b29b25afa3c

* Add governance VAAs

Change-Id: I426107fd7ad2e6bef063b8f178c1683a6590a54e

* Update contract addresses

Change-Id: I1cf92bb08d1c45b22dec195e2d076e7aabf3e369

* Update URL in repair script

* Add baseRPC to devnet/node.yaml
2023-07-18 08:17:27 -04:00
derpy-duck 575d2fe9a0
sdk/js: Update relayer testing on mainnet (#3164) 2023-07-13 10:10:23 -04:00
Kevin Peters f10e4d3003 sdk/js: prettier formatting changes 2023-07-12 12:12:09 -05:00
0xksure a9e04dbbd9
sdk/js: make explicit types for transferPayloads (#3111)
* sdk: make explicit types for transferPayloads

* update according to review, revert to fee potentially being undefined
2023-07-12 11:45:57 -04:00
Paul Noel 6309b321e8
ci: add github workflow with prettier checks for clients/js/src and sdk/js/src (#3176)
* github: add prettier check for clients/js

* github: update workflow to include sdk/js
2023-07-12 11:30:14 -04:00
Kevin Peters fabc9e9082 sdk/js: v0.9.21 release 2023-07-12 09:37:47 -05:00
derpy-duck 8d79fdd287
SDK: Relayer fixes for running tests in Tilt (#3178) 2023-07-06 15:41:13 -04:00
derpy-duck 9b9c5eac5a
sdk: improvements for relayer status function (#3157)
* sdk: improvements for relayer status function

* Fix boolean

* Remove clients/js changes

* Remove file

* RPC change for bsc

* sdk change

* Remove info comments - add newline

* sdk: improvements for relayer status function

* Fix boolean

* Remove clients/js changes

* Remove file

* RPC change for bsc

* sdk change

* Remove info comments - add newline

* Prettier
2023-06-30 14:13:36 -04:00
Ben Guidarelli 7de46f68b4
SDK: tweak typedefs to make doc generation easier (#3036) 2023-06-30 12:26:31 -04:00
Hernán Di Pietro fd37be7199
tilt: algorand changes for 3.16.2 (#3114)
* Changes for 3.16.2 Tilt / Devnet.

* Updated constants in test file

* modified python script to 3.16.2

* More AppID Changes.

* Found more AppIds to replace.

* testApp fixed to 1008.
2023-06-28 11:37:41 -04:00
Kevin Peters 716d78a53d sdk/js: v0.9.20 release 2023-06-27 18:25:05 -04:00
derpy-duck 632a767926
bugfix in test for Testnet and Mainnet (#3123) 2023-06-26 11:51:57 -04:00
Kevin Peters bbf587095c sdk/js: bumped terra.js version 2023-06-26 10:25:55 -04:00
derpy-duck 44c8146c3f
relayer/ update delivery provider addresses (#3115) 2023-06-23 18:43:41 -04:00
Joe Howarth 74e53beac7
sdk: WormholeRelayer mainnet addresses (#3108)
* basic delivery helpers done

* reorganize

* sdk: WormholeRelayer mainnet addresses

* acala and karura

* sdk: include manual delivery in relayer tests

* fix test

* sdk: Fix deliveryProvider -> wormholeRelayer

* fix

* SDK fixes

* add l2s

---------

Co-authored-by: derpy-duck <115193320+derpy-duck@users.noreply.github.com>
2023-06-22 15:13:30 -05:00
Joe Howarth a1e9d15187
Relayer: delivery helpers in ts sdk (#3107)
* basic delivery helpers done

* reorganize

* sdk: include manual delivery in relayer tests

* fix test

* fix

* SDK fixes

---------

Co-authored-by: derpy-duck <115193320+derpy-duck@users.noreply.github.com>
2023-06-22 09:51:22 -05:00
Kevin Peters 55a3ba684e sdk/js: Added optional Sui package ID parameters to functions
The package IDs can be passed in to avoid fetching them via RPC
2023-06-22 10:25:09 -04:00
Kevin Peters 817f179b34 clients/js: Added transfer token command 2023-06-22 10:24:07 -04:00
Sushant Chandla 44273c0641
sdk/js: parse sequence of versioned solana transaction (#2568) 2023-06-20 12:51:47 -04:00
derpy-duck 22b1311da4
make forge dependencies as part of SDK build (#3100)
* make forge dependencies as part of SDK build
2023-06-16 12:42:27 -04:00
derpy-duck 10cc45aba2
Relayer/merge into wormhole relayer engine (#3042)
Note: The time limit for CI needs to be increased because now the relayer engine needs to build the SDK from source (the ethereum folder) in it's docker image.

Once the SDK is published, I can have the relayer engine docker image simply import the SDK, which should save a lot of time and allow us to reduce the CI time limit again.
2023-06-14 15:08:28 -04:00
derpy-duck 3c0fecc3fa
Relayer: Generic Relayer Guardian Changes for Merging into Main (#3041)
* gRelayer: surrounding files

* modification to get compilation

* restore devnet

* remove generic relayer docker

* remove wait for relayer engine

* keep build time 20

* sh -> bash

* sh -> bash

* Remove comment

* bash -> sh

* Revert "bash -> sh"

This reverts commit 5c37e92fa1.

* bash->sh

* gRelayer: ethereum folder changes for generic-relayer-merge

* add eth-devnet

* Adds .github because workflow needs to install forge

* sdk-ci-tests need to install forge

* don't wait for nonexistent relayer engine

* update package.json and package-lock.json

* Remove unnecessary types from package.json

* ts-node

* gRelayer: ethereum folder changes for generic-relayer-merge

* sdk-ci-tests need to install forge

* don't wait for nonexistent relayer engine

* update package.json and package-lock.json

* remove these changes

* Relayer: Natspec documentation in IWormholeRelayer (#3032)

* WIP

* Fixes

* Updated interfaces

* remove bash

* Forward uses same refund chain id and refund address (#3034)

* WIP

* Fixes

* Forward uses same refund chain id and refund address

* Updated interfaces

* Adds .github because workflow needs to install forge

* sdk-ci-tests need to install forge

* don't wait for nonexistent relayer engine

* SDK minus payload tests

* Rename sdk relayer folder and file

* modify index.ts

* modify path

* sdk-ci-tests need to install forge

* don't wait for nonexistent relayer engine

* Add three governance VAA actions for generic relayers

* demandOption and const

* Remove forge build warnings

* Add note to interface for resend

* Verify additional VAAs in SDK

* via-ir on unless in Tilt

* Correct IWormholeReceiver interface

* Wormhole message fee now part of quoteDeliveryPrice (#3043)

* Fix to PR 3043

* Remove compiler warning

* Remove files

* remove generic relayer docker

* Fix typo

* Relayer/address drew review (#3060)

* Fix typo in Create2Factory

* Add event for contract upgrades

* Prevent registering contract if it is already registered

* Prevent allowing unset chainId for default delivery provider governance VAA

* memory to calldata for external functions in WormholeRelayerSend

* continue memory to calldata for external functions

* Fix pricing in delivery provider

* Sanity check new default delivery provider isn't 0 address

* Don't save vaaKey as local variable

* cache the length of array rather than iterate every time for vaaKeys

* Replacing memory with calldata in few locations

* Remove stale file DeliveryProviderMessages

* Remove batch VAA sender script

* Remove batch VAA from WormholeSimulator

* Wait for a confirmation in deploy scripts

* remove unnecessary comments

* Fix Delivery Provider Pricing and add a test

* remove console logs

* Revert "continue memory to calldata for external functions"

This reverts commit f322afb6c0.

* Revert "memory to calldata for external functions in WormholeRelayerSend"

This reverts commit 42fcaad884.

* Revert "Don't save vaaKey as local variable"

This reverts commit a9172379c5.

* Revert "cache the length of array rather than iterate every time for vaaKeys"

This reverts commit d61380a9b0.

* Revert "Replacing memory with calldata in few locations"

This reverts commit 94e47b6e72.

* Revert "Fix typo in Create2Factory"

This reverts commit a9f7bdf461.

* Update contract addresses for via-ir

* Update register chain test to only do one registration

* Slight improvements to delivery provider implementation

* typed errors for delivery provider

* Update SDK to have via-ir devnet address

* Fix test

* enable VIA-IR in CI and not in Tilt

* Fix chain id

* get register chain test to work

* correct contract address for via ir

* update sdk consts for via ir address

* base 32 address

* merge

* -f to -r

* relay provider -> delivery provider

* fix await

* Readme changes
2023-06-14 10:27:00 -04:00
derpy-duck c83e8895a5
Relayer: Generic Relayer SDK for Merging into Main (#3040)
* gRelayer: surrounding files

* modification to get compilation

* restore devnet

* remove generic relayer docker

* remove wait for relayer engine

* keep build time 20

* sh -> bash

* sh -> bash

* Remove comment

* bash -> sh

* Revert "bash -> sh"

This reverts commit 5c37e92fa1.

* bash->sh

* gRelayer: ethereum folder changes for generic-relayer-merge

* add eth-devnet

* Adds .github because workflow needs to install forge

* sdk-ci-tests need to install forge

* don't wait for nonexistent relayer engine

* update package.json and package-lock.json

* Remove unnecessary types from package.json

* ts-node

* gRelayer: ethereum folder changes for generic-relayer-merge

* sdk-ci-tests need to install forge

* don't wait for nonexistent relayer engine

* update package.json and package-lock.json

* remove these changes

* Relayer: Natspec documentation in IWormholeRelayer (#3032)

* WIP

* Fixes

* Updated interfaces

* remove bash

* Forward uses same refund chain id and refund address (#3034)

* WIP

* Fixes

* Forward uses same refund chain id and refund address

* Updated interfaces

* Adds .github because workflow needs to install forge

* sdk-ci-tests need to install forge

* don't wait for nonexistent relayer engine

* SDK minus payload tests

* Rename sdk relayer folder and file

* modify index.ts

* modify path

* Remove forge build warnings

* Add note to interface for resend

* Verify additional VAAs in SDK

* via-ir on unless in Tilt

* Correct IWormholeReceiver interface

* Wormhole message fee now part of quoteDeliveryPrice (#3043)

* Fix to PR 3043

* Remove compiler warning

* Remove files

* remove generic relayer docker

* Relayer/address drew review (#3060)

* Fix typo in Create2Factory

* Add event for contract upgrades

* Prevent registering contract if it is already registered

* Prevent allowing unset chainId for default delivery provider governance VAA

* memory to calldata for external functions in WormholeRelayerSend

* continue memory to calldata for external functions

* Fix pricing in delivery provider

* Sanity check new default delivery provider isn't 0 address

* Don't save vaaKey as local variable

* cache the length of array rather than iterate every time for vaaKeys

* Replacing memory with calldata in few locations

* Remove stale file DeliveryProviderMessages

* Remove batch VAA sender script

* Remove batch VAA from WormholeSimulator

* Wait for a confirmation in deploy scripts

* remove unnecessary comments

* Fix Delivery Provider Pricing and add a test

* remove console logs

* Revert "continue memory to calldata for external functions"

This reverts commit f322afb6c0.

* Revert "memory to calldata for external functions in WormholeRelayerSend"

This reverts commit 42fcaad884.

* Revert "Don't save vaaKey as local variable"

This reverts commit a9172379c5.

* Revert "cache the length of array rather than iterate every time for vaaKeys"

This reverts commit d61380a9b0.

* Revert "Replacing memory with calldata in few locations"

This reverts commit 94e47b6e72.

* Revert "Fix typo in Create2Factory"

This reverts commit a9f7bdf461.

* Update contract addresses for via-ir

* Update register chain test to only do one registration

* Slight improvements to delivery provider implementation

* typed errors for delivery provider

* Update SDK to have via-ir devnet address

* Fix test

* enable VIA-IR in CI and not in Tilt

* Fix chain id

* get register chain test to work

* correct contract address for via ir

* update sdk consts for via ir address

* base 32 address

* chain 24 not 26

* remove unintended line removal

* restore WormholeRelayerSend
2023-06-13 17:27:49 -04:00
Martin Picco 12fc66cc97
sdk/js: Add sei native denom check to isNativeCosmWasmDenom (#3071) 2023-06-13 09:42:11 -04:00
Jonathan Claudius c5523d39fc
sdk: Add unit-testing and fuzz-testing for leftpadbytes (#2997) 2023-05-30 16:48:17 -04:00
Jonathan Claudius 703fbe32c7
sdk: add CalculateQuorum documentation and fuzz testing (#2996)
* sdk: Add fuzz testing and documentation for CalculateQuorum

* Use testify assertions instead of stdlib

* sdk: move unit and fuzz run into one line

* sdk: use better testify function for zero check

* sdk: drop unnecessary format string assertions

* sdk: remove obviously ignored test corpus items
2023-05-30 16:46:51 -04:00
bruce-riley 1514d7cd79
Scripts: For upgrading testnet (#2984) 2023-05-26 08:29:14 -05:00
Kevin Peters 0cff646fed sdk/js: injective parseSmartContractStateResponse fix 2023-05-24 13:05:28 -05:00
bruce-riley f5b96ecb4e
Node/SDK: Mainnet Sei deploy (#2969)
Change-Id: I18491c36963e44791c688d1b14fb2c8062eb6544
2023-05-23 17:14:26 -05: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
heyitaki b114875528 sdk/js: bump to 0.9.17 2023-05-17 12:19:15 -07:00
heyitaki 7608b2b740 sdk/js: normalize all sui addresses and types being compared 2023-05-17 12:19:15 -07:00
gator-boi d7e9a0b2dd sui: update testnet Sui addresses 2023-05-17 12:26:00 -04:00
A5 Pickle 6f8c8430ac
solana: fix token metadata program interaction (#2913)
* testing: fix pubkey caused by 0b0b9cea70

* solana: fix token-metadata forked dependency

* sdk/js: fix tokenMetadata and Solana IDLs

* testing: fix tests; add token-metadata dependency

---------

Co-authored-by: A5 Pickle <a5-pickle@users.noreply.github.com>
2023-05-15 20:55:03 +01:00
Nikhil Suri ee7d0765f9
sdk: add new governance VAA for IbcReceiverUpdateChainConnection (#2590)
* sdk: add new governance VAA for IbcReceiverUpdateChainConnection

* Enforce connectionId to be 64 bytes, add tests in rust sdk

* Update PrependBufferBytesFixed to LeftPadBytes, add template function + command for IBC governance VAA

* Add >64 length check for ibcReceiverUpdateChainConnectionConnectionId in runIbcReceiverUpdateChainConnectionTemplate command

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

* Add TargetChainID to admin commands

* Node: Add IBC update channel to admin verify cmd

---------

Co-authored-by: Bruce Riley <briley@jumptrading.com>
2023-05-12 06:11:21 -04:00
Jonathan Claudius df796930b1
sdk: add FuzzUnmarshalBigPayload (#2893) 2023-05-12 06:02:43 -04:00
tbjump d9d5481092 node: update golang to 1.20 from 1.19 2023-05-12 05:59:53 -04:00
Nikhil Suri 96682bdbeb
sdk: rust: add Sei, Btc, and Base chains and change Ropsten to Sepolia (#2851) 2023-05-10 08:28:54 -07:00
Jonathan Claudius 6ac2444172
sdk: assert no negative numGuardians in quorum calculation (#2892)
* sdk: assert no negative numGuardians in quorum calculation

* sdk: fix formating on quorum tests
2023-05-09 08:45:10 -07:00
tbjump c24fff4d2d sdk: fix linter warnings 2023-05-05 07:13:40 -07:00
A5 Pickle d99a0d8ee8 sdk/js: fix `publishTokenBridgeUpgradeContract` 2023-05-03 14:57:45 -04:00
A5 Pickle 0b0b9cea70 sdk/js: fix `publishAttestMeta` in mock 2023-05-03 14:57:45 -04:00
Evan Gray d050ad1d67 sdk/js: sui support posting VAAs over 1024 2023-05-02 22:05:33 -04:00
Evan Gray 39369d3d2b sdk/js: version bump 2023-05-02 22:05:33 -04:00
heyitaki 412680fba5 sui: update devnet addresses 2023-05-02 15:14:23 -04:00
Kevin Peters 6a1bb7bc78 sdk/js: sui get latest package from CurrentPackage 2023-05-02 15:14:23 -04:00
heyitaki ed733f8e73 sdk/js: add Sui support
Co-authored-by: Evan Gray <battledingo@gmail.com>
Co-authored-by: Kevin Peters <kpeters@jumptrading.com>
2023-05-02 15:14:23 -04:00
bruce-riley 67c7c86419
Node: Add Sui mainnet support (#2826)
Change-Id: I6ea3e345c2e907f738fc82298d5497ce858f55fd
2023-05-02 09:24:57 -05:00
Evan Gray cf37919416 sdk/js: version bump 2023-04-18 16:37:05 -04: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
bruce-riley 8a866c3c1d
node: sei testnet support (#2660)
* Sei testnet support

* Set contract addresses

* node/pkg/watchers: add RunWithScissors

* SDK tweaks

* node: revert "node/pkg/watchers: add RunWithScissors" (#2620)

This reverts commit 9b8bed4dbf.

* Make Sei use IBC watcher

---------

Co-authored-by: Paul Noel <panoel007@gmail.com>
Co-authored-by: Paul Noel <35237584+panoel@users.noreply.github.com>
2023-04-18 09:34:01 -04:00
Evan Gray 7640539a44 sdk/js: bump injective sdk 2023-04-17 21:45:00 -04:00
Kevin Peters 908dc5fb3a sdk/js: bumped version to v0.9.12 2023-04-04 16:45:32 +02:00
bruce-riley f9758b38e7
SDK/Node: Sepolia deployment (#2567) 2023-04-03 09:24:17 -05:00
Nikhil Suri 081f1997a5
sdk: remove outdated comment on vaa payload size limit (#2546) 2023-03-24 14:34:02 -05:00
tbjump 24f3893b49 vaa/governance: Document other ActionIds 2023-03-20 10:43:44 -07:00
bruce-riley 18e8e14402
Node: Circle Integration governance fixes (#2507) 2023-03-16 09:13:50 -05: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 0f123dedb1 node: use new action and module for accountant modify_balance 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
bruce-riley 2658868ba6
Node: Support VAAs with large payloads (#2518)
* Node: Support VAAs with large payloads

Change-Id: Ie09bdc8ea0813ee90f9b686f3fe95365baa4014f

* Clean up tests

Change-Id: I983a40a2e7763271c8212ac18455b8b45e48fd3e
2023-03-14 14:32:30 -04:00
bruce-riley 5023ffec2b
Node: Circle Integration governance support (#2444)
* Node: Circle Integration governance support

* Fix spacing

* Code review rework
2023-03-06 13:23:48 -06:00
Conor Patrick a64e4717de accountant: review comments 2023-02-27 08:52:42 -06:00
Conor Patrick d4e0445785 node: calculate digests using Vaa type or using message prefix 2023-02-27 08:52:42 -06:00
bruce-riley a2d09dad4b
Node: Base watcher support for testnet (#2424)
* Node: Base watcher support for testnet

* Add a comment

* Add base to rpc dump command
2023-02-23 18:37:35 -05:00
Kevin Peters 96624168b8 sdk/js: bumped version to v0.9.11 2023-02-23 16:53:31 -05:00
bruce-riley caa71f18a6
Deploy base to testnet (#2422)
* Deploy base to testnet

* Shouldn't add testnet evmChainId to impl

* Add base to rpc dump command

* Oops, wrong branch!
2023-02-23 15:42:30 -05:00
Conor Patrick bbec427145 accountant: minor cleanup 2023-02-16 18:03:47 -05:00
Conor Patrick b35480f966 accountant: address review comments for modify governance vaa 2023-02-15 06:23:25 -08:00
Conor Patrick 4640b6ae73 node: add modify governance vaa for token bridge 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
Kevin Peters 3e05a027af sdk/js: v0.9.10 release 2023-02-14 16:03:42 +01:00
heyitaki 1deee6f7a1 sdk/js: reconstruct TokenId obect in getForeignAssetAptos to reduce number of RPC calls 2023-02-10 12:35:34 -05:00
heyitaki e0bebed306 sdk/js: replace bigint literal 2023-02-10 12:35:34 -05:00
heyitaki 0e8f8fa771 sdk/js: add flexible typing for getForeignAssetAptos tokenId param 2023-02-10 12:35:34 -05:00
heyitaki dc924313b9 sdk/js: getForeignAssetAptos takes in tokenId for foreign chains 2023-02-10 12:35:34 -05:00
Kevin Peters 09d7dfbc45 sdk/js: Remove undeployed aptos testnet nft bridge address 2023-02-10 12:35:34 -05:00
Kevin Peters 4eed588d2d sdk/js: CI tests use aptos gas estimates instead of manual overrides 2023-02-10 12:35:34 -05:00
Kevin Peters eab0e38b89 sdk/js: Fix CI eth test wallet tx nonce race 2023-02-10 12:35:34 -05:00
Kevin Peters 0243019453 sdk/js: Added second solana devnet wallet, fixed race in Aptos NFT CI tests 2023-02-10 12:35:34 -05:00
Kevin Peters 7a8dea5158 sdk/js: getOriginalAssetAptos NFT returns tokenId 2023-02-10 12:35:34 -05:00
heyitaki aa56dc5498 sdk/js: finish aptos tests 2023-02-10 12:35:34 -05:00
heyitaki 54cf6781d1 sdk/js: add additional tests & docs 2023-02-10 12:35:34 -05:00
heyitaki 3bb0562f45 sdk/js: add tests for aptos sdk 2023-02-10 12:35:34 -05:00
heyitaki 7c1721d199 sdk/js: add aptos js sdk
Updated aptos npm package version to use `AptosAccount.getResourceAccountAddress` api in aptos.ts. `getForeignAsset` is also currently unimplemented.
2023-02-10 12:35:34 -05:00
heyitaki f584f5c739 sdk/js: refactor nft test utils 2023-02-10 12:35:34 -05:00
Conor Patrick aac92a19e7 wormchain: add migrating contracts with vaa 2023-02-07 12:15:11 -06:00
Evan Gray 7f9a03254a test: accountant e2e 2023-01-31 11:09:43 -05:00
A5 Pickle 58e6afd439 sdk/rust: fix clippy error 2023-01-26 18:36:03 -06:00
Bojan Angjelkoski 81d1f83f45
sdk/js: injective package bump (#2175)
* chore: package bump

* chore: updated to latest package versions

* refactor: migrate to MsgExecuteContractCompat for EIP712 compatibility

* chore: added dev deps

* chore: packages bump
2023-01-23 21:33:26 -05:00
Chirantan Ekbote b2ca522e73 sdk/rust: Add test with hardcoded digest
Add a test for digest calculation that uses a hardcoded digest.  The
digest for this test was calculated using the `worm` CLI to ensure
interoperability.
2023-01-23 11:53:39 -05:00
tbjump 5323453b81
node: add channel read/write type constraints (#1931) 2023-01-20 13:15:13 -08:00
Chirantan Ekbote d19fc98091 sdk/rust: Properly support tokenbridge payload3 messages
Add the payload as an explicit field to the `TransferWithPayload` enum
variant.  This is a generic parameter that defaults to `Box<RawMessage>`
for maximum flexibility (and to avoid leaking lifetimes higher up the
stack) but users are encouraged to replace this default type parameter
with an explicit `&RawMessage` in places where the serde_wormhole data
format is used.

The main benefit of this change is that the payload is now included as
part of the actual message and no longer requires callers to awkwardly
append it after serialization.  This is especially useful in human-
readable formats like JSON (see the `transfer_with_payload` test in
token.rs for an example of this simplification).

The main downside is that this now requires explicit type annotations
when using the non-payload3 variants so that the compiler will pick up
the default generic parameter.  This is a relatively minor inconvenience
and the benefit appears to be worth the cost.

There should be no functional change.
2023-01-20 18:12:41 +09:00
Chirantan Ekbote 421a030dca sdk/rust: Remove `*_with_payload` methods
The RawMessage type provides a more flexible way to handle trailing
payloads so replace all usage of the `*_with_payload` functions to use
`RawMessage` instead.

There should be no functional change.
2023-01-18 09:33:10 +09:00
Chirantan Ekbote 3c6702b6f7 sdk/rust: Add serde_wormhole::RawMessage
Add a RawMessage type that can be used to defer parsing parts of a
payload, similar to the `json.RawMessage` from Go.  The implementation
is inspired by `serde_json::RawValue`, which does a similar thing.

When serializing, RawMessage will serialize to a base64-encoded string
if it detects that the data format is human readable (like JSON).
Otherwise it will simply forward the raw bytes to the serializer.

RawMessage has both borrowed and boxed versions.  The borrowed version
is the most efficient as it enables zero-copy handling of the input data
but also requires that the input data already contains raw bytes and is
not suitable when dealing with human-readable formats like JSON.

The boxed version is more flexible as it supports byte slices, base64-
encoded strings, and byte sequences but is slightly less efficient as it
requires copying or decoding the input data.
2023-01-18 09:29:05 +09:00
bruce-riley 3f61661051
sdk: Add Aptos NFT bridge address (#2244) 2023-01-13 15:03:15 -06:00
Kevin Peters 5f6782e67d sdk/js: Use BN.toArrayLike in `tokenIdToMint` function for browserify compatibility. 2023-01-11 13:38:54 -05:00
Evan Gray 735ce417b6 sdk/js: generate docs fixes #1821 2023-01-11 13:01:46 -05:00
Chirantan Ekbote e05176c9be sdk/rust: Remove `expiration_time` from `GuardianSetInfo`
This field doesn't actually appear in `GuardianSetUpgrade` governance
messages and was already being skipped by serde so just remove it
completely.  Contracts that need to keep track of this information can
encapsulate the `GuardianSetInfo` inside another struct that has an
`expiration_time` field.
2023-01-04 16:17:14 +09:00
Chirantan Ekbote 3a1dd9eccd sdk/rust: Simplify quorum calculation
Also add tests.
2023-01-04 16:17:14 +09:00
Chirantan Ekbote ab172b4da5 sdk/rust: Ensure chain conversions are isomorphic
Ensure that converting `Chain` to/from a u16 or to/from a string is
always isomorphic.  This requires changing the `FromStr` impl so that in
can handle strings like "Unknown(27)".
2023-01-04 16:17:14 +09:00
Chris Sentman 0f066614b3 sdk: tests for vaa.UnmarshalBody()
Full coverage save for a non-empty payload read error.
2023-01-03 09:59:56 -05:00
Chris Sentman 66c8399dcb sdk: test ChainID.String()
Completing coverage for method.
2023-01-03 09:59:56 -05:00
Jeff Schroeder bc1edba32c sdk: full test coverage of ChainID.FromString()
The optimism coverage was a lie as it wasn't explicitly tested.
2023-01-03 09:59:56 -05:00
Jeff Schroeder 2b6ede0d54 sdk: test vaa.Address.UnmarshalJSON()
Full coverage including the error condition.
2023-01-03 09:59:56 -05:00
Jeff Schroeder 6ea4cf054a sdk: test BodyWormchainInstantiateContract.Serialize()
This completes full test coverage of sdk/vaa/payloads.go!
2023-01-03 09:59:56 -05:00
Jeff Schroeder a2857e3b1d sdk: test BodyWormchainStoreCode.Serialize() 2023-01-03 09:59:56 -05:00
Jeff Schroeder 1cc177bf64 sdk: cleanup vaa payloads test
Less duplication of the addr.
2023-01-03 09:59:56 -05:00
Jeff Schroeder 7a439e4cfd sdk: BodyTokenBridgeRegisterChain.Serialize() test
* Switch the BodyTokenBridgeRegisterChain.Serialize() test to table driven
  and add coverage for the panic condition.
2023-01-03 09:59:56 -05:00
Jonathan Claudius 98c843e85d
sdk: Add unit-tests for quorum calculation (#2127)
* sdk: Add unit-tests for quorum calculation

* sdk: fix go imports error

* node: remove duplicate sdk unit-test
2022-12-27 13:27:47 -05:00
Kevin Peters a7be5a639c sdk/js: 0.9.8 version bump 2022-12-22 12:57:20 -06:00
Kevin Peters 88e0c6cddf sdk/js: Use BN.toArrayLike for compatibility with browserify and similar tools.
Fixes this error when calling `deriveWrappedMintKey` in the browser:
TypeError: (intermediate value).toBuffer is not a function
2022-12-22 12:57:20 -06:00
Kevin Peters 49de9ef8f2 sdk/js: 0.9.7 version bump 2022-12-21 11:05:40 -06:00
guibescos 43035fcc44
sdk/js: Add instruction decoder to solana (#2095)
* Bump package

* Refactor coder add decoder

* Refactor

* Fix

* Fix u64

* Simplify encode

* Add comment

* Fix verify signatures

* Fix package lock

* Revert "Fix package lock"

This reverts commit 9f219bc6fc21d2d0f8bf33fedafd6c204a00e659.

* Fix deps

* Fix import for bs58
2022-12-21 06:35:37 -05:00
Chirantan Ekbote b400a2d51d sdk/rust: Add test for digest calculation
Add a test to ensure that calculating the digest from the structured
body, serialized data, or partial body + serialized payload all give the
same result.
2022-12-21 13:59:01 +09:00
Chirantan Ekbote 0dbeeec3d4 sdk/rust: Add `Body::with_payload`
Add the `Body::with_payload` method, which can be used to change the
type of the payload for a `Body`.  This is useful when parsing the
payload needs to be deferred until after the body is parsed.
2022-12-19 17:14:33 +09:00
Chirantan Ekbote 4ea369d7a9 sdk/rust: Implement Display for Address
This will be used later by the accounting contract.
2022-12-19 17:14:33 +09:00
Nikhil Suri eff4eb2ebd wormchain: add accounting contract bindings 2022-12-16 08:51:41 -05:00
Chirantan Ekbote 16b22a8cfc cosmwasm: wormhole-bindings: Use the Signature type from the SDK
Use the `Signature` type from the core SDK to avoid unnecessary
type conversions.  Cosmwasm requires its message types to implement
`JsonSchema` so also derive that impl for the `Signature` type behind a
feature flag.

This change uncovered a separate issue where the fake `WormholeKeeper`
was using regular ecdsa signatures rather than recoverable signatures
so fix the signing and verification methods to use the recoverable
signatures.
2022-12-15 12:22:37 +09:00