Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
280 commits
Select commit Hold shift + click to select a range
9946b9a
[deepbook indexer] - improve env handling to support struct tag for u…
patrickkuo Jun 16, 2025
6debd92
[deepbook indexer] - add snapshot tests (#381)
patrickkuo Jun 16, 2025
5aed913
add metrics to deepbook api (#396)
patrickkuo Jun 17, 2025
71e4ac1
refactor server to add db monitoring metrics (#397)
patrickkuo Jun 17, 2025
a2f0357
enable ci test (#398)
patrickkuo Jun 17, 2025
80f4f2b
update move binding (#395)
patrickkuo Jun 17, 2025
4fe779f
[deepbook reliability] - bugfix + logging (#399)
patrickkuo Jun 18, 2025
15f8a19
[bugfix] - start metrics server (#400)
patrickkuo Jun 18, 2025
3d5533a
walrus sites setup (#404)
tonylee08 Jun 23, 2025
148e43e
enable version (#403)
tonylee08 Jun 26, 2025
66c4d7f
MVR metadata v2 (#407)
tonylee08 Jul 7, 2025
12b0efa
oracle (#408)
tonylee08 Jul 7, 2025
b6f4bcc
math functions public (#409)
tonylee08 Jul 7, 2025
2763810
Margin Pool Skeleton (#410)
0xaslan Jul 9, 2025
9c7e21e
Suins MVR updates (#413)
tonylee08 Jul 14, 2025
d16c00b
Margin pool core code (#411)
tonylee08 Jul 16, 2025
607d69a
Margin Registry (#412)
tonylee08 Jul 16, 2025
d207b70
update pool allowed versions (#418)
tonylee08 Jul 17, 2025
94458cb
Margin Manager (#416)
tonylee08 Jul 17, 2025
f987d01
Margin manager pool proxy module (#419)
tonylee08 Jul 18, 2025
2c721d5
move CI update (#423)
tonylee08 Jul 24, 2025
022a55b
margin registry with deepbook pool (#425)
sb- Jul 24, 2025
a13faa8
Liquidation Logic (#421)
tonylee08 Jul 24, 2025
14a7cd1
Whitelist pool creation (#427)
tonylee08 Jul 28, 2025
f593b32
Enable and Disable Trading (#426)
tonylee08 Jul 28, 2025
d0479fc
IKA pool multisig (#428)
tonylee08 Jul 28, 2025
0de76b6
Interest rate calculation and protocol spread (#430)
tonylee08 Jul 31, 2025
c8b8445
Rewards for margin pool (#429)
sb- Aug 6, 2025
3315034
formatting (#435)
tonylee08 Aug 11, 2025
510f49f
Dynamic taker fee for high gas price txs (#431)
0xaslan Aug 11, 2025
9b16d38
Registry removed from margin trading function (#434)
tonylee08 Aug 11, 2025
2cd2203
Margin manager has a specific deepbook pool (#436)
tonylee08 Aug 11, 2025
722434b
use timestamp from clock, not tx context (#438)
0xaslan Aug 12, 2025
c5db6ab
Quantity out read only fix (#439)
tonylee08 Aug 12, 2025
18fe40e
Track everything with shares 1/n (#441)
0xaslan Aug 13, 2025
639b833
Emission Bug (#445)
tonylee08 Aug 13, 2025
55bc981
update sui deps (#433)
patrickkuo Aug 14, 2025
083ad24
Referral Manager (#447)
0xaslan Aug 14, 2025
92ffe46
Maintainer Cap (#442)
tonylee08 Aug 14, 2025
a81e5ad
Trades endpoint update (#449)
tonylee08 Aug 14, 2025
8b997f2
Cleanup Margin Manager (#448)
tonylee08 Aug 14, 2025
bcf3667
margin pool control (#450)
tonylee08 Aug 15, 2025
9c26dfe
debt amount calculation fix (#451)
0xaslan Aug 15, 2025
0b6a8d3
Custom owner bug fix (#453)
tonylee08 Aug 18, 2025
e96969a
Debt in margin manager, update liquidate (#454)
0xaslan Aug 18, 2025
eed3e06
Manager Functions and Cleanup (#455)
tonylee08 Aug 20, 2025
ba8f57c
Liquidation Logic (#459)
tonylee08 Aug 21, 2025
95afa5e
Add asset_type to endpoint (#463)
sb- Aug 21, 2025
d57ca7a
formatting (#464)
tonylee08 Aug 21, 2025
5f7ae2c
move pool config out of state (#465)
0xaslan Aug 22, 2025
d4bc4fd
Single call liquidation (#468)
tonylee08 Aug 22, 2025
62fc9c6
move interest to its own module (#467)
0xaslan Aug 22, 2025
35926f2
New refactor (#470)
tonylee08 Aug 22, 2025
abac478
remove position info (#471)
0xaslan Aug 22, 2025
8b4e2df
separate debt and assets (#472)
tonylee08 Aug 22, 2025
df8eae3
move reward info into manager info (#473)
0xaslan Aug 22, 2025
1ec46f2
move math into manager info (#474)
0xaslan Aug 22, 2025
05262bc
Make margin pool depend on registry (#475)
0xaslan Aug 25, 2025
fb9f6ac
Update liquidation endpoint (#476)
tonylee08 Aug 25, 2025
4cb93f1
sql name update (#479)
tonylee08 Aug 25, 2025
4e474ac
Cancel out default and pool reward (#477)
tonylee08 Aug 25, 2025
7b6233a
Default logic update (#480)
tonylee08 Aug 26, 2025
43f2c10
Remove reward module (#481)
tonylee08 Aug 26, 2025
b55256d
Duplicate margin pool check (#478)
tonylee08 Aug 26, 2025
c73ccd5
error code (#482)
tonylee08 Aug 26, 2025
8fa5623
Combine Interest and Protocol Config (#483)
0xaslan Aug 26, 2025
de6b871
Version Gating (#485)
tonylee08 Aug 26, 2025
8040ece
remove lending referral (#487)
0xaslan Aug 27, 2025
46699b0
events for registry (#489)
tonylee08 Aug 27, 2025
9e64a30
Margin pool events (#488)
tonylee08 Aug 27, 2025
5d55099
Tests (1/n) (#486)
sb- Aug 27, 2025
1f3bb21
Margin manager events and refactor (#490)
tonylee08 Aug 27, 2025
0aed3c3
Testing Framework (#492)
tonylee08 Aug 27, 2025
5fc7a17
core version constants (#495)
tonylee08 Aug 27, 2025
2323cce
[wip] margin manager test scaffold (#493)
sb- Aug 28, 2025
d35d64c
Margin enabled logic (#497)
tonylee08 Aug 28, 2025
26281b9
cleanup (#499)
tonylee08 Aug 28, 2025
4fde329
WIP margin info refactor (#496)
0xaslan Aug 28, 2025
e42b870
Update Test (#500)
tonylee08 Aug 28, 2025
d8d24ba
Small Cleanup (#501)
tonylee08 Aug 28, 2025
ec244b8
Rename deprecated, config updates (#505)
tonylee08 Sep 2, 2025
4adc5dc
Partial Liquidations (#504)
tonylee08 Sep 2, 2025
e772d53
(2/n) margin manager tests (#503)
sb- Sep 2, 2025
1dde008
fix test lint (#506)
sb- Sep 2, 2025
73e8a06
Implement min borrow (#507)
tonylee08 Sep 3, 2025
8355ac6
Cleanup (#508)
tonylee08 Sep 3, 2025
55206e6
Referral taker fees (#502)
0xaslan Sep 3, 2025
314c839
Pool interest rate tests (#512)
tonylee08 Sep 3, 2025
d483dab
(3/n) protocol config tests (#511)
sb- Sep 3, 2025
262eb55
(4/n) margin manager tests cleanup (#514)
sb- Sep 4, 2025
1864859
Pool proxy tests (#515)
tonylee08 Sep 4, 2025
7bc1444
Manager sharing composability (#517)
tonylee08 Sep 4, 2025
adc72e1
State refactor (#518)
0xaslan Sep 16, 2025
85e1562
return immutable balance_manager (#521)
tonylee08 Sep 16, 2025
4caced5
update event (#523)
tonylee08 Sep 16, 2025
e9fb808
Add Claude Code GitHub Workflow (#522)
sb- Sep 16, 2025
35adc43
(5/n) basic margin pool tests (#524)
sb- Sep 17, 2025
802d92f
Supply referral initial module (#519)
0xaslan Sep 17, 2025
11c39eb
Margin manager tests (#525)
tonylee08 Sep 17, 2025
3af8307
fix manager tests (#527)
tonylee08 Sep 17, 2025
5a1fe55
open api (#529)
tonylee08 Sep 18, 2025
d411166
(6/n) margin pool liquidation tests (#528)
sb- Sep 18, 2025
ae821d3
add claude.md (#530)
sb- Sep 18, 2025
72435dc
SUI/USDC tick size (#533)
tonylee08 Sep 22, 2025
8850b4d
Liquidation Math Tests (#532)
tonylee08 Sep 22, 2025
4d15b56
Add Rust SDK link (#362)
uvd Sep 22, 2025
72e0618
[indexer] - refactoring and minor bugfix (#406)
patrickkuo Sep 22, 2025
de541ad
Risk ratio refactor (#534)
tonylee08 Sep 22, 2025
57be511
div by zero (#536)
0xaslan Sep 22, 2025
112f0a6
referral fees multiple instead of additional bps (#538)
0xaslan Sep 22, 2025
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
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:*)"'

138 changes: 133 additions & 5 deletions .github/workflows/deepbookv3-build-tx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@ 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
sui_tools_image:
description: "image reference of sui_tools"
default: "mysten/sui-tools:mainnet"
Expand Down Expand Up @@ -184,6 +182,136 @@ 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: 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: Show Transaction Data (To sign)
run: |
cat scripts/tx/tx-data.txt
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Deploy DeepBook Services

on:
workflow_dispatch:
push:
branches:
- main
paths:
- crates/**
- docker/**
- Cargo.lock
- Cargo.toml

concurrency:
group: deployment
cancel-in-progress: true

jobs:
deploy-pulumi:
name: Deploy to Testnet
runs-on: ubuntu-latest
permissions:
contents: read
environment: production

steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # [email protected]

- name: Trigger Pulumi Deployment
uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # [email protected]
with:
repository: MystenLabs/sui-operations
token: ${{ secrets.DEPLOY_PULUMI_DISPATCH_TOKEN }}
event-type: pulumi-up
client-payload: |-
{
"project": "apps/deepbook",
"stack": "testnet"
}

- name: View deployment status
run: |
echo "🚀 View the status of the deployment here: https://github.com/MystenLabs/sui-operations/actions/workflows/pulumi-up.yaml"

2 changes: 2 additions & 0 deletions .github/workflows/move-formatter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ jobs:
uses: actions/setup-node@v4
- run: npm i @mysten/prettier-plugin-move
- run: npx prettier-move -c $PWD/../packages/deepbook/**/*.move
- run: npx prettier-move -c $PWD/../packages/deepbook_margin/**/*.move
- run: npx prettier-move -c $PWD/../packages/margin_liquidation/**/*.move
31 changes: 5 additions & 26 deletions .github/workflows/move_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,34 +22,13 @@ jobs:
with:
fetch-depth: 1

- name: Install Sui 1.45.3
- name: Install Homebrew
run: |
echo "Installing Sui 1.45.3..."
mkdir -p $HOME/sui-bin
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo "/home/linuxbrew/.linuxbrew/bin" >> $GITHUB_PATH

SUI_URL="https://github.com/MystenLabs/sui/releases/download/mainnet-v1.45.3/sui-mainnet-v1.45.3-macos-x86_64.tgz"
echo "Downloading Sui from $SUI_URL"

# Use curl with fail flag and check response
HTTP_STATUS=$(curl -o sui.tar.gz -w "%{http_code}" -L $SUI_URL)

if [[ "$HTTP_STATUS" -ne 200 ]]; then
echo "Error: Failed to download Sui. HTTP Status: $HTTP_STATUS"
exit 1
fi

if ! file sui.tar.gz | grep -q "gzip compressed"; then
echo "Error: Downloaded file is not a valid tar.gz archive."
exit 1
fi

tar -xvzf sui.tar.gz -C $HOME/sui-bin
chmod +x $HOME/sui-bin/sui
echo "$HOME/sui-bin" >> $GITHUB_PATH
export PATH="$HOME/sui-bin:$PATH"

# Verify installation
sui --version
- name: Install Sui using Homebrew
run: brew install sui

- name: Run Move tests in all package subdirectories, with exclusions
run: |
Expand Down
Loading