wormhole/terra/test
Csongor Kiss bd62e27789
terra: migrate to cosmwasm 1.1.0 (#3138)
* terra/contracts: migrate to cosmwasm 1.1.0

use `classic-bindings` crate instead of terra-cosmwasm.
This is the updated version that calls the correct query post chain upgrade

* terra/Dockerfile: update workspace optimizer

* terra: label is now required on instantiate

* terra: accept either 32 or 20 byte addresses

* terra: update devnet terra classic

* node/cosmwasm: always CW >1

* tilt: re-introduce terra classic tests

* terra: make get_address support both 20 and 32 byte addresses

* terra: fix tests to account for burn tax

Since the tests are now ran against the new LocalTerra which has burn
tax, the transaction results are different from before

* terra/token-bridge: check first 12 bytes to determine native denoms

* terra/token-bridge: simplify conditional

---------

Co-authored-by: Evan Gray <battledingo@gmail.com>
2023-12-13 16:27:17 +00:00
..
src terra: migrate to cosmwasm 1.1.0 (#3138) 2023-12-13 16:27:17 +00:00
.gitignore terra/token_bridge: transfer with payload 2022-05-11 21:24:36 -04:00
README.md terra/token_bridge: transfer with payload 2022-05-11 21:24:36 -04:00
jestconfig.json Add framework for Terra contract testing (#1050) 2022-04-06 11:25:18 -05:00
package-lock.json terra: migrate to cosmwasm 1.1.0 (#3138) 2023-12-13 16:27:17 +00:00
package.json terra: migrate to cosmwasm 1.1.0 (#3138) 2023-12-13 16:27:17 +00:00
tsconfig.json Add framework for Terra contract testing (#1050) 2022-04-06 11:25:18 -05:00

README.md

Wormhole Contract Test Suite

Running Local Terra Node

In order to run these tests, you need to have a local Terra node running. These tests are meant to be run using LocalTerra. This requires Docker Compose to run. You can also run terrad with the same set up Tilt uses (see configuration here).

Build

In the terra root directory, run the following:

make artifacts

Run the Test Suite

The easy way would be to navigate to the terra root directory, run the following:

make test

If you plan on adding new tests and plan on persisting LocalTerra, make sure dependencies are installed:

npm ci

And run in this directory:

npm run test

These tests are built using Jest and is meant to be structured very similarly to the ethereum unit tests, which requires running a local node via ganache before truffle can run any of the testing scripts in the test directory.

Currently the only test that exists is for the token bridge's transfer and transfer with payload.