@mysten/deepbook-v3 2.7.0 → 2.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/PREDICT.md +15 -10
  3. package/dist/contracts/account/account.d.mts +23 -23
  4. package/dist/contracts/account/account_events.d.mts +20 -20
  5. package/dist/contracts/account/account_registry.d.mts +19 -19
  6. package/dist/contracts/deepbook/account.d.mts +18 -18
  7. package/dist/contracts/deepbook/balances.d.mts +4 -4
  8. package/dist/contracts/deepbook/deep_price.d.mts +3 -3
  9. package/dist/contracts/deepbook/order.d.mts +12 -12
  10. package/dist/contracts/deepbook_predict/admin.d.mts +4 -4
  11. package/dist/contracts/deepbook_predict/admin.d.mts.map +1 -1
  12. package/dist/contracts/deepbook_predict/builder_code.d.mts +11 -11
  13. package/dist/contracts/deepbook_predict/builder_code.d.mts.map +1 -1
  14. package/dist/contracts/deepbook_predict/builder_code_events.d.mts +10 -10
  15. package/dist/contracts/deepbook_predict/config_events.d.mts +80 -80
  16. package/dist/contracts/deepbook_predict/market_lifecycle_cap.d.mts +5 -5
  17. package/dist/contracts/deepbook_predict/market_manager.d.mts +27 -27
  18. package/dist/contracts/deepbook_predict/market_manager.d.mts.map +1 -1
  19. package/dist/contracts/deepbook_predict/order_events.d.mts +50 -50
  20. package/dist/contracts/deepbook_predict/pause_cap.d.mts +5 -5
  21. package/dist/contracts/deepbook_predict/plp.d.mts +74 -74
  22. package/dist/contracts/deepbook_predict/pool_valuation_cap.d.mts +5 -5
  23. package/dist/contracts/deepbook_predict/predict_account.d.mts +14 -14
  24. package/dist/contracts/deepbook_predict/predict_account.d.mts.map +1 -1
  25. package/dist/contracts/deepbook_predict/pricing.d.mts +67 -67
  26. package/dist/contracts/deepbook_predict/pricing.d.mts.map +1 -1
  27. package/dist/contracts/deepbook_predict/range_codec.d.mts +2 -2
  28. package/dist/contracts/deepbook_predict/registry.d.mts +28 -28
  29. package/dist/contracts/deepbook_predict/vault_events.d.mts +131 -131
  30. package/dist/contracts/deepbook_predict_math/lazer_price.d.mts +13 -13
  31. package/dist/contracts/deepbook_predict_math/math.d.mts +14 -14
  32. package/dist/contracts/deepbook_predict_orders/delayed_execution_config.d.mts +30 -30
  33. package/dist/contracts/deepbook_predict_orders/desk.d.mts +28 -28
  34. package/dist/contracts/deepbook_predict_orders/desk.d.mts.map +1 -1
  35. package/dist/contracts/deepbook_predict_orders/order_queue.d.mts +187 -187
  36. package/dist/contracts/deepbook_predict_orders/queue.d.mts +49 -49
  37. package/dist/contracts/deepbook_predict_orders/queue.d.mts.map +1 -1
  38. package/dist/contracts/deepbook_predict_orders/queue_events.d.mts +140 -140
  39. package/dist/contracts/deepbook_sessions/session_config.d.mts +8 -8
  40. package/dist/contracts/deepbook_sessions/session_config.d.mts.map +1 -1
  41. package/dist/contracts/deepbook_sessions/sessions.d.mts +27 -27
  42. package/dist/contracts/deepbook_sessions/sessions.d.mts.map +1 -1
  43. package/dist/deployments/mainnet.mjs +7 -4
  44. package/dist/deployments/mainnet.mjs.map +1 -1
  45. package/dist/deployments/testnet.mjs +5 -4
  46. package/dist/deployments/testnet.mjs.map +1 -1
  47. package/dist/predict/bindings/expiry-market.d.mts +5 -5
  48. package/dist/predict/bindings/expiry-market.d.mts.map +1 -1
  49. package/dist/predict/bindings/protocol-config.d.mts +3 -3
  50. package/dist/predict/config/mainnet.mjs +11 -3
  51. package/dist/predict/config/mainnet.mjs.map +1 -1
  52. package/dist/predict/reads/pricing.d.mts +0 -1
  53. package/dist/predict/reads/pricing.d.mts.map +1 -1
  54. package/dist/predict/reads/queue.d.mts +0 -1
  55. package/dist/predict/reads/queue.d.mts.map +1 -1
  56. package/dist/sessions.mjs.map +1 -1
  57. package/dist/transactions/balanceManager.d.mts +12 -12
  58. package/dist/transactions/deepbook.d.mts +20 -20
  59. package/dist/transactions/deepbookAdmin.d.mts +4 -4
  60. package/dist/transactions/marginAdmin.d.mts +7 -7
  61. package/dist/transactions/marginMaintainer.d.mts +5 -5
  62. package/dist/transactions/marginManager.d.mts +32 -32
  63. package/dist/transactions/marginPool.d.mts +18 -18
  64. package/dist/transactions/marginTPSL.d.mts +10 -10
  65. package/dist/transactions/poolProxy.d.mts +8 -8
  66. package/package.json +5 -5
  67. package/src/deployments/mainnet.ts +7 -2
  68. package/src/deployments/testnet.ts +5 -4
  69. package/src/predict/config/mainnet.ts +16 -7
  70. package/src/sessions.ts +2 -2
@@ -47,7 +47,7 @@ export const TESTNET_ACCOUNT: AccountIds = Object.freeze({
47
47
  * the package root for one id.
48
48
  */
49
49
  export const TESTNET_SESSIONS: SessionsIds = Object.freeze({
50
- sessionsPackageId: '0x25cfc04f97ef75c530872e630c1b3e21845e615a5a68d185291372e196cbd3de',
50
+ sessionsPackageId: '0x3c50acf2d3bf48719ca9dfa2fd538e134d5c778c3502349b6417bb511f3c9889',
51
51
  sessionsPackageIdV1: '0x1908eee49d7a08d74a537d7f23766b363a145517fe0d3e0d85635d1682831ffd',
52
52
  sessionsConfig: '0xc096b97289821b27badfdf758d614bbbfa386f93d3faa409ecc1fcc6075d1186',
53
53
  accountPackageId: '0x1e57d6554b99e4ca68330322c3e5c409ba1b681642726b603bf1be92c1840ca9',
@@ -75,12 +75,13 @@ export const TESTNET_UNITS: DeploymentUnits = Object.freeze({
75
75
  export const TESTNET_PREDICT: PredictIds = Object.freeze({
76
76
  network: 'testnet',
77
77
  packages: Object.freeze({
78
- predict: '0x0654ecbed7c0f2645d9de7cb6cf08e65c2ee05cdbb39a415f17a6bd1cd92e267',
78
+ predict: '0x340a77ce690e683138790592be6c6d02dc56a7e88e2555dc17f8a4967d003816',
79
79
  predictV1: '0x59d71119e990573a738dd3ff9c4c7d28d6893af69c87c1a7f3a2e90e280ce2f4',
80
80
  account: '0x1e57d6554b99e4ca68330322c3e5c409ba1b681642726b603bf1be92c1840ca9',
81
81
  propbook: '0xa83f9d7651de09672a40cea371c387bf954e0f3092947670d71428d4fbc9edd9',
82
- predictOrders: '0xd723ddef890bff70bd492cd384c913b5e7daeb6e8900cb3a5606546ac4f3907f',
83
- predictMath: '0x471592f682a9560b7046ca1bbf240e608bf5b2071ff1a9bd129b8011166a43c5',
82
+ predictOrders: '0x0b1aefb17d4c158ff6e060b1f3677648125fdb0516106e318f9234d07e5a7a0e',
83
+ predictOrdersV1: '0xd723ddef890bff70bd492cd384c913b5e7daeb6e8900cb3a5606546ac4f3907f',
84
+ predictMath: '0x2039bac8c1ec51ce3d7cb366ec36b45fdbbafe1aa2aaea0ed9bef52db40e1562',
84
85
  }),
85
86
  objects: Object.freeze({
86
87
  registry: '0x85cfaa857f9dfca75f6ba624eead063c4a1bc9b701201b8f21e1f9c15833ccc4',
@@ -18,15 +18,24 @@ export const MAINNET_CONFIG: PredictConfig = Object.freeze({
18
18
  // The record widens `network` to `string` so the published types don't pin a literal;
19
19
  // this file is the mainnet config by construction.
20
20
  network: 'mainnet',
21
- // TODO(DBU-887): delayed execution is not recorded on Mainnet yet. Once the Mainnet rollout is
22
- // recorded, `pnpm sync-deployment` fills `packages.predictOrders`, `packages.predictMath` and
23
- // `oracle.pythLazerState`, and this file pins `packages.predictDelayedExecution` (Mainnet v4),
24
- // `objects.orderDesk` and `objects.queueRegistry`, as the Testnet config does. Until then the
25
- // queued-order surface (DBU-885) throws on this network, and only a custom `config` reaches it.
26
- packages: MAINNET_PREDICT.packages,
27
- objects: MAINNET_PREDICT.objects,
21
+ // Delayed execution (DBU-885) is recorded on Mainnet. The generated record carries the package
22
+ // IDs that move with upgrades (Predict, `deepbook_predict_orders`, `deepbook_predict_math`) and
23
+ // the Lazer `State`. The three IDs pinned below are in no publication record and never move:
24
+ // the Predict version that introduced delayed execution (Mainnet v4), which defines its new
25
+ // types and events, and the `OrderDesk` and `QueueRegistry` that `deepbook_predict_orders`'s
26
+ // `init` shared at publish.
27
+ packages: Object.freeze({
28
+ ...MAINNET_PREDICT.packages,
29
+ predictDelayedExecution: '0x98235c5842831c9b5f51dc637cf34c91db2aca5510802eb6ebfec63f5b71a7bb',
30
+ }),
31
+ objects: Object.freeze({
32
+ ...MAINNET_PREDICT.objects,
33
+ orderDesk: '0x87b0a87262aacf58eaff567eed2fb7cb0f9cbc1f5ce33ef79216cd26d13a1b5b',
34
+ queueRegistry: '0x8d4f0c671862f065ac7f2c2cb24abc47cf75ed8fc8e5e52c1d4bdfa53eee164f',
35
+ }),
28
36
  quoteCoinType: MAINNET_PREDICT.quoteCoinType,
29
37
  coinTypes: MAINNET_PREDICT.coinTypes,
30
38
  units: MAINNET_PREDICT.units,
31
39
  underlyings: MAINNET_PREDICT.underlyings,
40
+ oracle: MAINNET_PREDICT.oracle,
32
41
  });
package/src/sessions.ts CHANGED
@@ -504,8 +504,8 @@ export class SessionsContract {
504
504
  // raw Move units. Each returns the new queue record ID (u64). The queue and Predict perform
505
505
  // every check; the caps below are only the ones a session key should never send by accident.
506
506
  //
507
- // They need a config whose `sessionsPackageId` is a Sessions v3 publication. Testnet records
508
- // Sessions v3. TODO(DBU-887): Mainnet still records Sessions v2, which has none of them.
507
+ // They need a config whose `sessionsPackageId` is a Sessions v3 publication, which both
508
+ // network records are. Sessions v1 and v2 have none of them.
509
509
 
510
510
  /**
511
511
  * @description Queue a mint of an exact payout quantity, as `session`. `maxCost` (all-in cap)