Compare commits
4 Commits
0.1-preprod
...
0.1-dev
| Author | SHA256 | Date | |
|---|---|---|---|
| b14cfdb52e | |||
| 79b654e336 | |||
| b60f897110 | |||
| 9ed818d1d0 |
Executable
+39
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "Usage: $0 <github-snapshot-branch>" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
BRANCH="$1"
|
||||
|
||||
SOURCE="$HOME/projects/com_r35157_nenjim-hubd-api"
|
||||
TARGET="$HOME/projects/com_r35157_nenjim-hubd-api_github_snapshot"
|
||||
|
||||
cd "$TARGET"
|
||||
|
||||
git fetch origin
|
||||
|
||||
if git show-ref --verify --quiet "refs/heads/$BRANCH"; then
|
||||
git switch "$BRANCH"
|
||||
elif git show-ref --verify --quiet "refs/remotes/origin/$BRANCH"; then
|
||||
git switch --track "origin/$BRANCH"
|
||||
else
|
||||
git switch --create "$BRANCH"
|
||||
fi
|
||||
|
||||
rsync -a --delete \
|
||||
--exclude '.git' \
|
||||
"$SOURCE/" \
|
||||
"$TARGET/"
|
||||
|
||||
git add -A
|
||||
|
||||
if git diff --cached --quiet; then
|
||||
echo "No snapshot changes to publish on branch '$BRANCH'."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
git commit -m "Mirror snapshot"
|
||||
git push -u origin "$BRANCH"
|
||||
@@ -13,11 +13,15 @@ import java.math.BigDecimal;
|
||||
* @param entryPrice the entry price of the position, denominated in USDC
|
||||
* @param direction whether the position is long or short
|
||||
* @param tradedTokenMint the mint address of the token being traded
|
||||
* @param sizeUsd the size of this position in USD
|
||||
* @param collateralUsd the amount of USD representing the collateral for this position
|
||||
*/
|
||||
public record JupiterPerpsPosition(
|
||||
ΩJupiterPerpsPositionAccountΩ positionAccount,
|
||||
ΩUSDCPriceΩ entryPrice,
|
||||
JupiterPerpsPositionDirection direction,
|
||||
ΩSPLMintAddressΩ tradedTokenMint
|
||||
ΩSPLMintAddressΩ tradedTokenMint,
|
||||
ΩUSDCAmountΩ sizeUsd,
|
||||
ΩUSDCAmountΩ collateralUsd
|
||||
) {
|
||||
}
|
||||
Reference in New Issue
Block a user