Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
390 commits
Select commit Hold shift + click to select a range
e061e79
Manager Mapping (#537)
tonylee08 Sep 22, 2025
1f6e6ac
Balance manager registration (#539)
tonylee08 Sep 22, 2025
fb7dd92
Margin Registry Tests (#540)
tonylee08 Sep 23, 2025
9d1be75
Fix bug for manager with no debt (#543)
tonylee08 Sep 23, 2025
cae441f
math fix (#544)
tonylee08 Sep 23, 2025
5328928
Oracle Age Test (#541)
tonylee08 Sep 23, 2025
44ad295
deep pool params (#542)
tonylee08 Sep 24, 2025
45fa287
Referral trading fees test (#545)
0xaslan Sep 24, 2025
716f8ee
extra fields (#546)
0xaslan Sep 24, 2025
ab25748
EWMA tests (#547)
0xaslan Sep 24, 2025
4aceb40
add digest and event_digest to trades endpoint (#551)
tonylee08 Sep 25, 2025
680989e
Margin pool and margin manager read functions (#549)
tonylee08 Sep 25, 2025
9bfa2de
Setup payment-kit (#552)
tonylee08 Sep 25, 2025
67e371f
bump indexer framework (#548)
tharbert Sep 25, 2025
ed13617
Indexer fix (#555)
tonylee08 Sep 25, 2025
d1aa0fb
margin registry read only functions (#550)
tonylee08 Sep 25, 2025
c1043c7
Add DEEP burned to indexer (#553)
sb- Sep 26, 2025
2edfeb4
bump testnet version (#557)
tonylee08 Sep 26, 2025
0c7c3aa
alter pool w/ bigint (#556)
sb- Sep 26, 2025
e730179
update max taker penalty (#559)
0xaslan Sep 26, 2025
91b1d43
Track referral fee (#560)
tonylee08 Sep 26, 2025
519254b
fix (#561)
tonylee08 Sep 26, 2025
f227018
testnet (#562)
tonylee08 Sep 26, 2025
fc566bd
bump deps to pickup new indexer framework feature (#563)
tharbert Sep 26, 2025
0c1df54
swap exact with balance manager (#567)
0xaslan Sep 29, 2025
8079dec
only show referral fee when > 0 (#564)
tonylee08 Sep 29, 2025
760e344
rename package, use new test function (#569)
tonylee08 Sep 29, 2025
8f2db78
rename directory (#570)
tonylee08 Sep 29, 2025
778eda9
testnet version 7 (#571)
tonylee08 Sep 29, 2025
c2940f9
Setup testnet margin (#572)
tonylee08 Sep 29, 2025
692f089
Update Claude Code GitHub Workflow (#573)
sb- Sep 30, 2025
e9e9c2c
Borrow interest precision (#574)
tonylee08 Sep 30, 2025
ec2c982
upgrade (#575)
tonylee08 Sep 30, 2025
6b13a52
Rename to referral spread (#579)
tonylee08 Sep 30, 2025
262be45
publish margin (#580)
tonylee08 Sep 30, 2025
5c85bd7
add indexes to big tables (#578)
sb- Sep 30, 2025
1bb7fb1
rework supply referral (#584)
0xaslan Oct 1, 2025
49f51d2
Reduce only logic (#585)
tonylee08 Oct 2, 2025
0339d16
new margin package (#586)
tonylee08 Oct 2, 2025
a9018ce
naming update (#588)
tonylee08 Oct 2, 2025
22e4b0a
Token dependency (#589)
tonylee08 Oct 2, 2025
56f7431
lockfile updates (#590)
tonylee08 Oct 2, 2025
12d59ab
test dep (#592)
tonylee08 Oct 2, 2025
27c34ec
update margin dependency (#593)
tonylee08 Oct 2, 2025
52688fe
test tag (#594)
tonylee08 Oct 2, 2025
ae935db
Assert_eq deprecation update (#587)
tonylee08 Oct 3, 2025
e478567
handle previous packages + testnet in indexer (#568)
sb- Oct 3, 2025
143a353
add first checkpoint docker arg (#565)
tharbert Oct 3, 2025
3521303
move-binding-derive version bump (#595)
sb- Oct 6, 2025
b54c8e6
maintainer and protocol fees (#596)
0xaslan Oct 8, 2025
caded50
margin state tests (#597)
0xaslan Oct 9, 2025
8a7b429
add OHCLV to indexer (#577)
sb- Oct 10, 2025
80490c7
Sb/ohlcv endpoint (#598)
sb- Oct 10, 2025
4764300
Supplier Cap (#602)
tonylee08 Oct 15, 2025
bd083c4
fix candle formula (#603)
sb- Oct 15, 2025
2310010
Assert referral owner (#605)
tonylee08 Oct 15, 2025
82286e0
ewma fix (#606)
tonylee08 Oct 15, 2025
6a10b9f
Read only function addition (#609)
tonylee08 Oct 20, 2025
aca3f9e
Feature/OrderFullyFilled event (#601)
bathord Oct 20, 2025
11f5467
Referral refactor (#610)
tonylee08 Oct 20, 2025
e6ec850
Margin shares calculations (#608)
tonylee08 Oct 20, 2025
730b212
margin pool function refactor (#611)
tonylee08 Oct 20, 2025
1c3c462
add testnet packages (#612)
sb- Oct 20, 2025
0ee77df
Protocol spread update (#614)
tonylee08 Oct 21, 2025
f922a8f
Rename referral (#615)
tonylee08 Oct 21, 2025
31750bd
Maintainer withdrawal logic (#616)
tonylee08 Oct 21, 2025
6c1f4de
New Events (#617)
tonylee08 Oct 21, 2025
b67ee11
Confidence Interval Tests (#618)
tonylee08 Oct 21, 2025
6829ea1
testnet v8 (#619)
tonylee08 Oct 21, 2025
7c4b02c
new testnet margin (#620)
tonylee08 Oct 21, 2025
5e7fead
Trade Tests (#621)
tonylee08 Oct 21, 2025
e1ae580
token dependency update (#622)
tonylee08 Oct 21, 2025
5667733
Margin pool read only id (#623)
tonylee08 Oct 21, 2025
78abbef
Testnet margin v2 (#624)
tonylee08 Oct 21, 2025
b342a52
add pg_cron for candle updates (#625)
sb- Oct 22, 2025
a541708
Add configurable RPC url for indexer server (#626)
sb- Oct 22, 2025
fc78b78
bump sui repo deps (#627)
tharbert Oct 23, 2025
45a051e
Admin claim default referral (#628)
tonylee08 Oct 24, 2025
8fe6d4d
update referral fees tracker (#632)
0xaslan Oct 24, 2025
1329943
clear pool after full liquidation (#633)
tonylee08 Oct 24, 2025
238817b
Round up shares (#631)
tonylee08 Oct 27, 2025
07e7b05
Fee distribution update (#635)
tonylee08 Oct 28, 2025
6e58d65
Feature/add margin events indexer (#607)
sdelo Oct 28, 2025
5576ac8
Pause cap (#637)
tonylee08 Oct 28, 2025
ad4d4e9
new testnet package (#639)
tonylee08 Oct 28, 2025
2940df2
add packages to indexer (#638)
sb- Oct 28, 2025
8be61ff
fix claude permissions for tagging (#640)
sb- Oct 30, 2025
b6a591c
Read only manager function (#641)
tonylee08 Oct 30, 2025
bdc3d3a
Upgrade margin testnet (#643)
tonylee08 Oct 30, 2025
b611160
tag claude for review for internal contributors, automatic for extern…
sb- Oct 30, 2025
725e217
Make referral function public (#644)
tonylee08 Oct 31, 2025
1294079
upgrade testnet v9 (#645)
tonylee08 Oct 31, 2025
1909788
Improvements (#646)
tonylee08 Oct 31, 2025
0da84a4
Testnet v10 (#647)
tonylee08 Oct 31, 2025
c1b371b
margin v3 (#648)
tonylee08 Oct 31, 2025
1cc7513
additional tests (#653)
tonylee08 Nov 3, 2025
e3cf5c6
claude action fix (#654)
sb- Nov 4, 2025
29e96b7
store interest before update (#651)
tonylee08 Nov 4, 2025
7862e27
Permissionless settlement (#652)
tonylee08 Nov 4, 2025
e2a867b
comment update (#656)
tonylee08 Nov 5, 2025
1d80aaa
tests and repay minimum (#655)
tonylee08 Nov 5, 2025
b23aa87
update sui/usdc tick size (#657)
tonylee08 Nov 5, 2025
656a19e
Proxy permissionless settlement (#658)
tonylee08 Nov 10, 2025
a58911e
Add assertions for MarginPoolConfig (#660)
tonylee08 Nov 10, 2025
49804f5
taker penalty event (#661)
tonylee08 Nov 10, 2025
f806c9d
repay shares protection (#659)
tonylee08 Nov 10, 2025
e9a703a
increase protocol fees (#662)
tonylee08 Nov 10, 2025
4e4b5c2
update seal doc link (#667)
tonylee08 Nov 12, 2025
a95a566
Only owner can register balance manager (#666)
tonylee08 Nov 12, 2025
a298114
Supply with interest and true interest rate (#665)
tonylee08 Nov 12, 2025
3f53a2c
make id function public (#670)
tonylee08 Nov 13, 2025
9790157
update margin events for indexer (#668)
sb- Nov 13, 2025
edce590
add margin manager endpoint (#669)
sb- Nov 13, 2025
e3c7507
Authorize Margin Package (#672)
tonylee08 Nov 14, 2025
381a5a5
add margin manager states endpoint (#674)
sb- Nov 14, 2025
a129ad9
Add 7 missing margin events to indexer (#675)
sdelo Nov 17, 2025
5b062f8
Liquidation Vault (#671)
tonylee08 Nov 18, 2025
508a3ad
Oracle Protection (#664)
tonylee08 Nov 18, 2025
df0b49f
Depcreated functions update (#676)
tonylee08 Nov 18, 2025
5ef5521
add margin to default indexer packages (#677)
sb- Nov 18, 2025
b5d58a1
github action for testnet deploy (#649)
sb- Nov 18, 2025
692af4a
New margin package (#678)
tonylee08 Nov 19, 2025
efa3745
add unique constraint to manager state table (#679)
sb- Nov 19, 2025
566215a
event and readonly function (#683)
tonylee08 Nov 19, 2025
9cb433a
new package (#684)
tonylee08 Nov 19, 2025
7b48e61
Feature/events for PnL (#685)
avernikoz Nov 20, 2025
53d3435
Deposit/withdraw test changes (#686)
tonylee08 Nov 20, 2025
3a2434a
bump testnet (#688)
tonylee08 Nov 21, 2025
38a1b4d
Transfer Funds (#690)
tonylee08 Nov 24, 2025
1b63a14
Unregister margin manager (#691)
tonylee08 Nov 24, 2025
ef4e8d2
add deepbook_pool_id to server (#682)
sdelo Nov 25, 2025
cd9eccb
Add config support to DeepbookPoolRegistered (#689)
sdelo Nov 25, 2025
b28b8d2
fix deploy action (#692)
sb- Nov 25, 2025
64926e7
remove deprecated (#694)
tonylee08 Nov 25, 2025
9628a4f
Add health and status endpoints to DeepBook Server (#693)
sdelo Nov 25, 2025
2ad754b
rate limiter (#663)
sb- Dec 2, 2025
f30883c
use std::unit_test::destroy; (#696)
sb- Dec 3, 2025
6b39620
TP/SL 2 (#699)
tonylee08 Dec 5, 2025
e3ea12e
Get Quantity In (#698)
tonylee08 Dec 5, 2025
a03f3c9
testnet-core-12 (#701)
tonylee08 Dec 5, 2025
5c46eaf
prepare v4 (#702)
tonylee08 Dec 8, 2025
f7e47f9
new version (#703)
tonylee08 Dec 8, 2025
7048547
Additional asserts (#704)
tonylee08 Dec 8, 2025
9cf1525
Version update (#705)
tonylee08 Dec 8, 2025
8da7842
Update manager state (#708)
tonylee08 Dec 8, 2025
cb22f32
Macro to reduce boilerplate in handlers (#706)
sb- Dec 8, 2025
46436d5
Test upgrade (#710)
tonylee08 Dec 9, 2025
6621be3
clean up indexer server (#709)
sb- Dec 9, 2025
f888ba5
macos (#711)
tonylee08 Dec 9, 2025
7450753
update version (#713)
tonylee08 Dec 9, 2025
608ef56
Initialize Map for Balance Managers (#714)
tonylee08 Dec 10, 2025
f0621a8
better error codes for indexer server (#712)
sb- Dec 10, 2025
8053298
bump package IDs (#716)
sb- Dec 10, 2025
c0a2a77
Test BTC (#715)
tonylee08 Dec 10, 2025
32d8cb5
Upgrade margin testnet (#718)
tonylee08 Dec 10, 2025
fa4bc22
update (#717)
sb- Dec 10, 2025
39bee0c
deepboo mvr (#719)
tonylee08 Dec 11, 2025
9ef3e98
add fields to margin pool created (#720)
sb- Dec 11, 2025
e740feb
rm old margin packages (#721)
sb- Dec 11, 2025
c292dbe
migration (#722)
tonylee08 Dec 12, 2025
0799470
Additional Assert (#727)
tonylee08 Dec 15, 2025
c1a0482
Referral Update (#725)
tonylee08 Dec 15, 2025
0eb0e6c
add assets by balance manager endpoint (#724)
sb- Dec 15, 2025
8c67b2f
Indexer IDs (#728)
tonylee08 Dec 15, 2025
f7a0aeb
can liquidate (#730)
tonylee08 Dec 16, 2025
61fe7ac
margin version 4 (#731)
tonylee08 Dec 16, 2025
bc30060
Fix testnet endpoints (#729)
tonylee08 Dec 16, 2025
2db4903
Liquidation Updates (#732)
tonylee08 Dec 16, 2025
d64d90b
enable version 5 (#733)
tonylee08 Dec 17, 2025
c62bb5c
Referral read only functions (#734)
tonylee08 Dec 18, 2025
173cb45
transfer funds (#736)
tonylee08 Dec 18, 2025
62a8d41
Fix withdraw error (#735)
tonylee08 Dec 19, 2025
4f75e4a
new deepbook version (#737)
tonylee08 Dec 19, 2025
62f835c
Testnet upgrades (#738)
tonylee08 Dec 19, 2025
f4f9484
lockfile updates (#740)
tonylee08 Dec 22, 2025
3dbb7c6
add missing fields to liquidation event + snapshot test (#749)
sb- Dec 23, 2025
d89e4c2
rate limiter update (#739)
tonylee08 Dec 23, 2025
f9f19a3
accumulation for rate limiter (#742)
tonylee08 Dec 23, 2025
a4fe090
improve ewma check in oracle (#743)
tonylee08 Dec 23, 2025
daad5bd
sorting (#741)
tonylee08 Dec 23, 2025
35b7fba
consisten price check (#744)
tonylee08 Dec 23, 2025
64d39ea
fix decimal adj (#745)
tonylee08 Dec 23, 2025
0a1cb37
Unregistration improvements (#746)
tonylee08 Dec 23, 2025
70278de
Fix can place market order (#747)
tonylee08 Dec 23, 2025
2527253
Fix can place limit order (#748)
tonylee08 Dec 23, 2025
d66f3ef
Fix Rounding (#752)
tonylee08 Dec 29, 2025
efc65a4
testnet core 15 (#753)
tonylee08 Dec 29, 2025
0df2691
v8 (#754)
tonylee08 Dec 29, 2025
efec8c5
protocol fees public functions (#755)
tonylee08 Dec 30, 2025
3541773
improve withdrawal (#756)
tonylee08 Dec 30, 2025
3d19a9e
liquidation improvements (#757)
tonylee08 Dec 30, 2025
5e509ec
Add order status endpoint (#759)
sb- Jan 5, 2026
6501067
new packages (#760)
tonylee08 Jan 5, 2026
5e4d238
add latest testnet margin package (#758)
sb- Jan 5, 2026
638872e
LZWBTC/USDC pool (#761)
tonylee08 Jan 5, 2026
d51ec96
lot size (#762)
tonylee08 Jan 5, 2026
1ba8951
Bump core version (#763)
tonylee08 Jan 6, 2026
b2b246c
lzwbtc pool (#766)
tonylee08 Jan 6, 2026
1dcb2fc
alkimi_sui (#767)
tonylee08 Jan 6, 2026
5e82e2d
Upgrade core v6 (#769)
tonylee08 Jan 7, 2026
d3206b7
New move, v6 package (#771)
tonylee08 Jan 8, 2026
c2db089
new version (#772)
tonylee08 Jan 8, 2026
0123465
Module extension (#773)
tonylee08 Jan 9, 2026
9f494d5
mvr margin (#775)
tonylee08 Jan 9, 2026
0e99a25
readme (#776)
tonylee08 Jan 9, 2026
a052961
patch action (#777)
tonylee08 Jan 9, 2026
6c503c4
pool name filter added (#778)
tonylee08 Jan 9, 2026
ae3a780
deps: bump indexer framework (#774)
amnn Jan 12, 2026
bdad9a8
add pool created (db core) (#770)
sb- Jan 12, 2026
87b5423
prometheus metrics for margin pools (#765)
sb- Jan 12, 2026
997e116
Dependency replacement (#779)
tonylee08 Jan 12, 2026
87eeead
Mainnet Packages (#781)
tonylee08 Jan 12, 2026
885178b
Margin prep (#782)
tonylee08 Jan 12, 2026
a9a2453
perf(server): reuse SuiClient across requests (#764)
dongowu Jan 12, 2026
03692d1
add margin package id (#783)
sb- Jan 12, 2026
c8b3f1a
Interest Rates (#784)
tonylee08 Jan 13, 2026
bbcb84c
Deposit counting (#785)
tonylee08 Jan 13, 2026
26f5d52
update packages (#786)
tonylee08 Jan 13, 2026
8238612
Margin setup part 1 (#787)
tonylee08 Jan 13, 2026
a4222e7
update rust + dependencies (#788)
sb- Jan 13, 2026
e95c577
Final margin setup (#789)
tonylee08 Jan 13, 2026
a57d141
bump deps for indexer (#790)
sb- Jan 13, 2026
3b51b79
point deps to testnet (#791)
sb- Jan 15, 2026
81222b3
bump rust version (#792)
sb- Jan 15, 2026
2b9915a
feat(indexer): Add ReferralFeeEvent handler for spot trading referral…
Evan-Kim2028 Jan 15, 2026
893f378
Create Liquidation Vault (#794)
tonylee08 Jan 15, 2026
846e004
net deposits view (#795)
sb- Jan 16, 2026
1b34403
Funding Margin (#796)
tonylee08 Jan 16, 2026
1b728ab
Normalize margin pool metric labels for consistency (#797)
sb- Jan 16, 2026
fb9e782
deepbook margin mainnet handler tracking (#793)
Evan-Kim2028 Jan 16, 2026
31b8c40
bump connection pool size (#798)
sb- Jan 17, 2026
cad56e4
update debian (#799)
sb- Jan 19, 2026
004204b
update pyth tolerance (#800)
tonylee08 Jan 20, 2026
653b545
action (#801)
tonylee08 Jan 20, 2026
fb515c4
add collateral events to indexer server (#802)
sb- Jan 20, 2026
b940746
Update indexer collateral events (#803)
tonylee08 Jan 20, 2026
018b6fc
Funding (#805)
tonylee08 Jan 20, 2026
3a45e59
At/points (#804)
0xaslan Jan 20, 2026
411ba1a
Return 0 points when address not in db (#806)
0xaslan Jan 21, 2026
4043b7d
unused imports (#807)
tonylee08 Jan 21, 2026
7807d44
Fund abyss vaults (#809)
tonylee08 Jan 21, 2026
53189d9
optional param for trades endpoint (#810)
tonylee08 Jan 21, 2026
d84e669
Deposit into Abyss (#811)
tonylee08 Jan 21, 2026
d0014b2
New margin interest rates (#813)
tonylee08 Jan 23, 2026
72f8116
Supply Endpoint (#814)
tonylee08 Jan 26, 2026
46c32ca
Mainnet margin MVR (#815)
tonylee08 Jan 26, 2026
64fe880
Indexer updates (#816)
tonylee08 Jan 26, 2026
2a53c6a
feat: Add client order ids to get_trades indexer response (#817)
tthebst Jan 27, 2026
9971f82
client id fix (#818)
tonylee08 Jan 27, 2026
50888bc
Update pool configs (#819)
tonylee08 Jan 27, 2026
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
53 changes: 53 additions & 0 deletions .github/workflows/claude-code-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Claude Code Review

on:
pull_request:
types: [opened, synchronize]
# Optional: Only run on specific file changes
# paths:
# - "src/**/*.ts"
# - "src/**/*.tsx"
# - "src/**/*.js"
# - "src/**/*.jsx"

jobs:
claude-review:
if: |
github.event.pull_request.user.login == 'external-contributor' ||
github.event.pull_request.user.login == 'new-developer' ||
github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'

runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
issues: read
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Run Claude Code Review
id: claude-review
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
prompt: |
Please review this pull request and provide feedback on:
- Code quality and best practices
- Potential bugs or issues
- Performance considerations
- Security concerns
- Test coverage

Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback.

Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR.

# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
# or https://docs.anthropic.com/en/docs/claude-code/sdk#command-line for available options
claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"'

63 changes: 63 additions & 0 deletions .github/workflows/claude.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Claude Code

on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
issues:
types: [opened, assigned]
pull_request_review:
types: [submitted]

jobs:
claude:
if: |
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
runs-on: ubuntu-latest
permissions:
contents: write # Needed to create commits/PRs
pull-requests: write # Needed to comment on PRs
issues: write # Needed to comment on issues
id-token: write
actions: read # Required for Claude to read CI results on PRs
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
# For PR comments, checkout the PR branch instead of main
ref: ${{ github.event.issue.pull_request && format('refs/pull/{0}/head', github.event.issue.number) || '' }}

- name: Run Claude Code
id: claude
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}

# This is an optional setting that allows Claude to read CI results on PRs
additional_permissions: |
actions: read

# Use review prompt for simple @claude mentions in PR comments, otherwise follow specific instructions
prompt: |
${{ github.event_name == 'issue_comment' && github.event.issue.pull_request && github.event.comment.body == '@claude' &&
format('Please review pull request #{0} and provide feedback on:
- Code quality and best practices
- Potential bugs or issues
- Performance considerations
- Security concerns
- Test coverage

Use the repository''s CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback.

Use `gh pr comment {0}` with your Bash tool to leave your review as a comment on the PR.', github.event.issue.number) || '' }}

# Optional: Add claude_args to customize behavior and configuration
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
# or https://docs.anthropic.com/en/docs/claude-code/sdk#command-line for available options
claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"'

221 changes: 213 additions & 8 deletions .github/workflows/deepbookv3-build-tx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,17 @@ on:
- Enable Version
- Disable Version
- Unregister Pool and Create
- Prep MVR
- Prep Kiosk MVR
- Prep Kiosk MVR Registration
- Package Info Creation
- Register Deepbook with MVR
- Add Stable Coins
- Adjust Tick Size
- Adjust Min Lot Size
- Transfer Funds
- Prep Deepbook MVR
- Margin Setup
- Margin PackageInfo Creation
- Fund Margin Pool
- Fund Abyss Vault
- Fund Liquidation Vault
- Update Interest Rates
sui_tools_image:
description: "image reference of sui_tools"
default: "mysten/sui-tools:mainnet"
Expand All @@ -36,7 +41,7 @@ on:
jobs:
deepbook:
name: deepbook create tx
runs-on: ubuntu-latest
runs-on: macos-latest

steps:
- name: Selected transaction type
Expand All @@ -57,8 +62,8 @@ jobs:

- name: YAML Setup
run: |
sui client --yes new-env --rpc https://fullnode.mainnet.sui.io:443 --alias mainnet
sui client switch --env mainnet
sui client --yes new-env --rpc https://fullnode.mainnet.sui.io:443 --alias mainnet-env
sui client switch --env mainnet-env

- name: NPM BUILD TX Environment
uses: actions/setup-node@v4
Expand Down Expand Up @@ -184,6 +189,206 @@ jobs:
run: |
cd scripts && pnpm install && pnpm ts-node transactions/addStablecoin.ts

- name: Transfer Mvr Kiosk
if: ${{ inputs.transaction_type == 'Transfer Mvr Kiosk' }}
env:
NODE_ENV: production
GAS_OBJECT: ${{ inputs.gas_object_id }}
NETWORK: mainnet
ORIGIN: gh_action
run: |
cd scripts && pnpm install && pnpm ts-node transactions/transferMvrObjectsKiosk.ts

- name: Finish MVR Setup
if: ${{ inputs.transaction_type == 'Finish MVR Setup' }}
env:
NODE_ENV: production
GAS_OBJECT: ${{ inputs.gas_object_id }}
NETWORK: mainnet
ORIGIN: gh_action
run: |
cd scripts && pnpm install && pnpm ts-node transactions/allMvrSetup.ts

- name: MVR Package Reverse Resolution
if: ${{ inputs.transaction_type == 'MVR Package Reverse Resolution' }}
env:
NODE_ENV: production
GAS_OBJECT: ${{ inputs.gas_object_id }}
NETWORK: mainnet
ORIGIN: gh_action
run: |
cd scripts && pnpm install && pnpm ts-node transactions/mvrPackageReverseResolution.ts

- name: Setup Denylist
if: ${{ inputs.transaction_type == 'Setup Denylist' }}
env:
NODE_ENV: production
GAS_OBJECT: ${{ inputs.gas_object_id }}
NETWORK: mainnet
ORIGIN: gh_action
run: |
cd scripts && pnpm install && pnpm ts-node transactions/setupDenylist.ts

- name: MVR Package Metadata
if: ${{ inputs.transaction_type == 'MVR Package Metadata' }}
env:
NODE_ENV: production
GAS_OBJECT: ${{ inputs.gas_object_id }}
NETWORK: mainnet
ORIGIN: gh_action
run: |
cd scripts && pnpm install && pnpm ts-node transactions/mvrPackageMetadata.ts

- name: Adjust Tick Size
if: ${{ inputs.transaction_type == 'Adjust Tick Size' }}
env:
NODE_ENV: production
GAS_OBJECT: ${{ inputs.gas_object_id }}
NETWORK: mainnet
ORIGIN: gh_action
run: |
cd scripts && pnpm install && pnpm ts-node transactions/updatePoolTickSize.ts

- name: Adjust Min Lot Size
if: ${{ inputs.transaction_type == 'Adjust Min Lot Size' }}
env:
NODE_ENV: production
GAS_OBJECT: ${{ inputs.gas_object_id }}
NETWORK: mainnet
ORIGIN: gh_action
run: |
cd scripts && pnpm install && pnpm ts-node transactions/updatePoolMinLotSize.ts

- name: Fix MVR Path
if: ${{ inputs.transaction_type == 'Fix MVR Path' }}
env:
NODE_ENV: production
GAS_OBJECT: ${{ inputs.gas_object_id }}
NETWORK: mainnet
ORIGIN: gh_action
run: |
cd scripts && pnpm install && pnpm ts-node transactions/mvrFix.ts

- name: Setup Walrus Site
if: ${{ inputs.transaction_type == 'Setup Walrus Site' }}
env:
NODE_ENV: production
GAS_OBJECT: ${{ inputs.gas_object_id }}
NETWORK: mainnet
ORIGIN: gh_action
run: |
cd scripts && pnpm install && pnpm ts-node transactions/walrusSitesSetup.ts

- name: Nautilus Setup
if: ${{ inputs.transaction_type == 'Nautilus Setup' }}
env:
NODE_ENV: production
GAS_OBJECT: ${{ inputs.gas_object_id }}
NETWORK: mainnet
ORIGIN: gh_action
run: |
cd scripts && pnpm install && pnpm ts-node transactions/nautilus-setup.ts

- name: Payment Setup
if: ${{ inputs.transaction_type == 'Payment Setup' }}
env:
NODE_ENV: production
GAS_OBJECT: ${{ inputs.gas_object_id }}
NETWORK: mainnet
ORIGIN: gh_action
run: |
cd scripts && pnpm install && pnpm ts-node transactions/paymentSetup.ts

- name: Margin Setup
if: ${{ inputs.transaction_type == 'Margin Setup' }}
env:
NODE_ENV: production
GAS_OBJECT: ${{ inputs.gas_object_id }}
NETWORK: mainnet
ORIGIN: gh_action
run: |
cd scripts && pnpm install && pnpm ts-node transactions/marginSetup.ts

- name: Margin PackageInfo Creation
if: ${{ inputs.transaction_type == 'Margin PackageInfo Creation' }}
env:
NODE_ENV: production
GAS_OBJECT: ${{ inputs.gas_object_id }}
NETWORK: mainnet
ORIGIN: gh_action
run: |
cd scripts && pnpm install && pnpm ts-node transactions/marginPackageInfo.ts

- name: Fund Margin Pool
if: ${{ inputs.transaction_type == 'Fund Margin Pool' }}
env:
NODE_ENV: production
GAS_OBJECT: ${{ inputs.gas_object_id }}
NETWORK: mainnet
ORIGIN: gh_action
run: |
cd scripts && pnpm install && pnpm ts-node transactions/supplyToMarginPool.ts

- name: Fund Abyss Vault
if: ${{ inputs.transaction_type == 'Fund Abyss Vault' }}
env:
NODE_ENV: production
GAS_OBJECT: ${{ inputs.gas_object_id }}
NETWORK: mainnet
ORIGIN: gh_action
run: |
cd scripts && pnpm install && pnpm ts-node transactions/fundAbyssVault.ts

- name: Create Liquidation Vault
if: ${{ inputs.transaction_type == 'Create Liquidation Vault' }}
env:
NODE_ENV: production
GAS_OBJECT: ${{ inputs.gas_object_id }}
NETWORK: mainnet
ORIGIN: gh_action
run: |
cd scripts && pnpm install && pnpm ts-node transactions/createLiquidationVault.ts

- name: Transfer Funds
if: ${{ inputs.transaction_type == 'Transfer Funds' }}
env:
NODE_ENV: production
GAS_OBJECT: ${{ inputs.gas_object_id }}
NETWORK: mainnet
ORIGIN: gh_action
run: |
cd scripts && pnpm install && pnpm ts-node transactions/transferFunds.ts

- name: Fund Liquidation Vault
if: ${{ inputs.transaction_type == 'Fund Liquidation Vault' }}
env:
NODE_ENV: production
GAS_OBJECT: ${{ inputs.gas_object_id }}
NETWORK: mainnet
ORIGIN: gh_action
run: |
cd scripts && pnpm install && pnpm ts-node transactions/fundLiquidationVault.ts

- name: Update Interest Rates
if: ${{ inputs.transaction_type == 'Update Interest Rates' }}
env:
NODE_ENV: production
GAS_OBJECT: ${{ inputs.gas_object_id }}
NETWORK: mainnet
ORIGIN: gh_action
run: |
cd scripts && pnpm install && pnpm ts-node transactions/updateInterestRates.ts

- name: Prep Deepbook MVR
if: ${{ inputs.transaction_type == 'Prep Deepbook MVR' }}
env:
NODE_ENV: production
GAS_OBJECT: ${{ inputs.gas_object_id }}
NETWORK: mainnet
ORIGIN: gh_action
run: |
cd scripts && pnpm install && pnpm ts-node transactions/newDeepbookVersion.ts

- name: Show Transaction Data (To sign)
run: |
cat scripts/tx/tx-data.txt
Expand Down
Loading