Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ComposableFi/emulated-light-client
run a chain inside a chain
https://github.com/ComposableFi/emulated-light-client
Last synced: about 2 months ago
JSON representation
run a chain inside a chain
- Host: GitHub
- URL: https://github.com/ComposableFi/emulated-light-client
- Owner: ComposableFi
- License: other
- Created: 2023-07-31T12:51:25.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-04-12T18:42:45.000Z (7 months ago)
- Last Synced: 2024-04-14T05:11:35.166Z (7 months ago)
- Language: Rust
- Homepage:
- Size: 1.45 MB
- Stars: 10
- Watchers: 5
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ccamel - ComposableFi/emulated-light-client - run a chain inside a chain (Rust)
README
# Emulated Light Client
This is our attempt to build a bridge between Solana and Cosmos using IBC
## Instructions to test solana program
1. Run anchor test with `mocks` feature. Since we cannot pass features to anchor test command, we need to build it.
```
anchor build -- --features mocks
```2. Now while running the tests, we need to provide a flag to skip build since they are already set. Not providing the flag to skip build would make the program to be built again but without any features ( which we dont want for testing ).
```
anchor test --skip-build
```### Note:
- If you want to deploy the program with `mocks` feature, you need to build the program with the mocks feature and then deploy.
```
anchor build -- --features mocks
anchor deploy
```
- If you want to retain the local state once the tests are run, you would have to run a local validator. A local validator should run in the background and while running the test `skip-local-validator` flag has to be passed so that the program doesnt spin up its only validator.
Below is the command to run local validator ( run it in a seperate terminal).
```
solana-test-validator -r
```
And pass the flag to skip local validator while running the tests.
```
anchor test --skip-local-validator --skip-build
```
The `skip-build` has to be passed if you are running tests with `mocks` feature. So remember to build it with the command above before you run the tests.