Skip to content

IDL 2.103.0 update #84

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
rustup component add clippy rustfmt
- name: install libdrift_ffi_sys
run: |
curl -L https://github.com/user-attachments/files/17849111/libdrift_ffi_sys.so.zip > ffi.zip
curl -L https://github.com/drift-labs/drift-ffi-sys/releases/download/v2.103.0/libdrift_ffi_sys.so.zip > ffi.zip
unzip ffi.zip
ldd libdrift_ffi_sys.so
sudo cp libdrift_ffi_sys.so $CARGO_DRIFT_FFI_PATH
Expand All @@ -50,4 +50,4 @@ jobs:
env:
TEST_DEVNET_RPC_ENDPOINT: ${{ secrets.DEVNET_RPC_ENDPOINT }}
TEST_MAINNET_RPC_ENDPOINT: ${{ secrets.MAINNET_RPC_ENDPOINT }}
TEST_PRIVATE_KEY: ${{ secrets.TEST_PRIVATE_KEY }}
TEST_PRIVATE_KEY: ${{ secrets.TEST_PRIVATE_KEY }}
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ Experimental, high performance Rust SDK for building offchain clients for [Drift
## Install
```toml
# crates.io*
drift-rs = "1.0.0-alpha.3"
drift-rs = "1.0.0-alpha.4"

# build from source (also builds and links 'libdrift_ffi_sys')
drift-rs = { git = "https://github.com/drift-labs/drift-rs", tag = "v1.0.0-alpha.3" }
drift-rs = { git = "https://github.com/drift-labs/drift-rs", tag = "v1.0.0-alpha.4" }
```

_*_`drift-rs` uses drift program over ffi.
Expand Down Expand Up @@ -70,3 +70,10 @@ CARGO_DRIFT_FFI_STATIC=1
# Provide a prebuilt drift_ffi_sys lib
CARGO_DRIFT_FFI_PATH="/path/to/libdrift_ffi_sys"
```
## Development

## Update IDL types
1) copy updated IDL to `res/drift.json` from protocol-v2 branch
2) `cargo check`
3) commit changes

2 changes: 2 additions & 0 deletions crates/drift-idl-gen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ impl ArgType {
"Pubkey".to_string()
} else if t == "bytes" {
"Vec<u8>".to_string()
} else if t == "string" {
"String".to_string()
} else {
t.clone()
}
Expand Down
Loading