Skip to content
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

Zeta ABI #2

Merged
merged 22 commits into from
Feb 21, 2023
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
52 changes: 52 additions & 0 deletions .github/workflow/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Program

on: [push, pull_request]

env:
CARGO_TERM_COLOR: always
SOLANA_VERSION: "1.13.5"
ANCHOR_VERSION: "0.26.0"

jobs:
build:
name: Build program and test
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3
name: Checkout source
- uses: actions/cache@v3
name: Cache Cargo registry + index
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: cargo-${{ runner.os }}-v0000-${{ hashFiles('**/Cargo.lock') }}
- uses: actions/cache@v3
name: Cache Solana Tool Suite
id: cache_solana
with:
path: |
~/.cache/solana/
~/.local/share/solana/
key: solana-${{ runner.os }}-v0001-${{ env.SOLANA_VERSION }}
- uses: actions-rs/toolchain@v1
if: steps.cache_solana.outputs.cache-hit != 'true'
name: Install Rust toolchain
with:
profile: minimal
toolchain: stable
- run: rustup component add rustfmt clippy
- name: Setup Solana CLI
run: |
sh -c "$(curl -sSfL https://release.solana.com/v${SOLANA_VERSION}/install)"
echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
PATH="$HOME/.local/share/solana/install/active_release/bin:$PATH"
solana --version
yes | solana-keygen new
- name: Build zeta-abi
run: cargo build
- name: Build abi-wrapper
run: cd abi-wrapper && anchor build --skip-lint
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/target
Cargo.lock
*.bk
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Changelog

All notable changes to this project will be documented in this file.
Version changes are pinned to SDK releases.

## [0.2.0] 21-02-2023

- program: Add support for new DEX APIs: place_order_v4, place_perp_order_v2, close_open_orders, close_margin_account ([#2](https://github.com/zetamarkets/zeta-abi/pull/2))
- program: add APT asset
- program: MarginAccount helper functions: get_initial_margin(), get_maintenance_margin(), get_unrealized_pnl()
- abi-wrapper: introducing sample program that utilizes ABI CPIs

## [0.1.0] - 2022-10-27

- program: First version with support for initialization of margin and open orders accounts, deposit, withdraw, order placement and cancellation
Loading