Skip to content

Commit

Permalink
Fireblocks support READ (#53)
Browse files Browse the repository at this point in the history
closes #52 

- [x] get_transaction
- [x] get asset addresses
- [x] list contracts
- [x] list vault accounts
- [ ] contract_call
- [x] fireblocks wallet implementation
- [x]  fireblocks wallet tests
  • Loading branch information
supernovahs authored Aug 7, 2024
1 parent 5c26e69 commit c853f31
Show file tree
Hide file tree
Showing 17 changed files with 1,475 additions and 98 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ jobs:
test:
name: Run Integration Tests
runs-on: ubuntu-latest

env:
FIREBLOCKS_API_KEY: ${{ secrets.FIREBLOCKS_API_KEY }}
FIREBLOCKS_API_URL: ${{ secrets.FIREBLOCKS_API_URL }}

steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -19,6 +24,12 @@ jobs:
with:
toolchain: stable

- name: Create private key file
run: echo "${{ secrets.FIREBLOCKS_PRIVATE_KEY }}" > fireblocks_secret.key

- name: Set environment variable for private key path
run: echo "FIREBLOCKS_PRIVATE_KEY_PATH=$(pwd)/fireblocks_secret.key" >> $GITHUB_ENV

- name: Install nightly Rust
run: rustup toolchain install nightly

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
debug/
target/
coverage

117 changes: 103 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@ __TESTING__: ##
pr: ##
$(MAKE) start-anvil-chain-with-contracts-deployed
$(MAKE) start-anvil
cargo test --workspace --all-features
cargo test --workspace
cargo clippy --workspace --lib --examples --tests --benches --all-features
cargo +nightly fmt -- --check
$(MAKE) stop-anvil

fireblocks-tests:
$(MAKE) start-anvil-chain-with-contracts-deployed
$(MAKE) start-anvil
cargo test --workspace --features fireblock-tests
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,23 @@ You need `foundry` , `docker` and `make` and `nightly rust` to successfully run
```
make pr
```

At least 1 `approving` review is required to merge the PR.

### To run fireblocks tests

Add the following variables to your env

- FIREBLOCKS_API_KEY
- FIREBLOCKS_PRIVATE_KEY_PATH
- FIREBLOCKS_API_URL

and then run the following command

```
make fireblocks-tests
```
Note: The tests were written using sandbox environment , you would need to modify the testing parameters according to your own asset id's , tx-id etc.

### Test Coverage
Test coverage should aim to be around 80%.
Expand Down
Loading

0 comments on commit c853f31

Please sign in to comment.