@black-market/sdk 0.15.0 → 0.16.0
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.
- package/README.md +10 -8
- package/dist/lifecycle/auto-compound.d.ts +21 -0
- package/dist/lifecycle/auto-compound.d.ts.map +1 -0
- package/dist/lifecycle/auto-compound.js +34 -0
- package/dist/lifecycle/auto-compound.js.map +1 -0
- package/dist/lifecycle/calibration.d.ts +2 -4
- package/dist/lifecycle/calibration.d.ts.map +1 -1
- package/dist/lifecycle/calibration.js +1 -26
- package/dist/lifecycle/calibration.js.map +1 -1
- package/dist/lifecycle/deployments/auto-compound-dynamic-pool-v1-20261028.d.ts +73 -0
- package/dist/lifecycle/deployments/auto-compound-dynamic-pool-v1-20261028.d.ts.map +1 -0
- package/dist/lifecycle/deployments/auto-compound-dynamic-pool-v1-20261028.js +75 -0
- package/dist/lifecycle/deployments/auto-compound-dynamic-pool-v1-20261028.js.map +1 -0
- package/dist/lifecycle/deployments/auto-compound-static-pool-v1-20261028.d.ts +73 -0
- package/dist/lifecycle/deployments/auto-compound-static-pool-v1-20261028.d.ts.map +1 -0
- package/dist/lifecycle/deployments/auto-compound-static-pool-v1-20261028.js +75 -0
- package/dist/lifecycle/deployments/auto-compound-static-pool-v1-20261028.js.map +1 -0
- package/dist/lifecycle/deployments/raeto-dynamic-pool-v1-20261029.d.ts +71 -0
- package/dist/lifecycle/deployments/raeto-dynamic-pool-v1-20261029.d.ts.map +1 -0
- package/dist/lifecycle/deployments/raeto-dynamic-pool-v1-20261029.js +73 -0
- package/dist/lifecycle/deployments/raeto-dynamic-pool-v1-20261029.js.map +1 -0
- package/dist/lifecycle/deployments/raeto-fixed-pool-v1-20261029.d.ts +71 -0
- package/dist/lifecycle/deployments/raeto-fixed-pool-v1-20261029.d.ts.map +1 -0
- package/dist/lifecycle/deployments/raeto-fixed-pool-v1-20261029.js +73 -0
- package/dist/lifecycle/deployments/raeto-fixed-pool-v1-20261029.js.map +1 -0
- package/dist/lifecycle/gas-profile.d.ts +17 -13
- package/dist/lifecycle/gas-profile.d.ts.map +1 -1
- package/dist/lifecycle/gas-profile.js +133 -113
- package/dist/lifecycle/gas-profile.js.map +1 -1
- package/dist/lifecycle/index.d.ts +6 -4
- package/dist/lifecycle/index.d.ts.map +1 -1
- package/dist/lifecycle/index.js +6 -4
- package/dist/lifecycle/index.js.map +1 -1
- package/dist/lifecycle/markets.d.ts +4 -0
- package/dist/lifecycle/markets.d.ts.map +1 -1
- package/dist/lifecycle/markets.js +58 -3
- package/dist/lifecycle/markets.js.map +1 -1
- package/dist/lifecycle/opening-buys.js +3 -3
- package/dist/lifecycle/opening-buys.js.map +1 -1
- package/dist/lifecycle/planner.d.ts +6 -9
- package/dist/lifecycle/planner.d.ts.map +1 -1
- package/dist/lifecycle/planner.js +122 -208
- package/dist/lifecycle/planner.js.map +1 -1
- package/dist/lifecycle/presets.d.ts +9 -3
- package/dist/lifecycle/presets.d.ts.map +1 -1
- package/dist/lifecycle/presets.js +17 -1
- package/dist/lifecycle/presets.js.map +1 -1
- package/dist/lifecycle/raeto-abi.d.ts +175 -0
- package/dist/lifecycle/raeto-abi.d.ts.map +1 -0
- package/dist/lifecycle/raeto-abi.js +224 -0
- package/dist/lifecycle/raeto-abi.js.map +1 -0
- package/dist/lifecycle/raeto.d.ts +21 -0
- package/dist/lifecycle/raeto.d.ts.map +1 -0
- package/dist/lifecycle/raeto.js +59 -0
- package/dist/lifecycle/raeto.js.map +1 -0
- package/dist/lifecycle/rpc.d.ts +3 -13
- package/dist/lifecycle/rpc.d.ts.map +1 -1
- package/dist/lifecycle/rpc.js +11 -37
- package/dist/lifecycle/rpc.js.map +1 -1
- package/dist/lifecycle/snapshot.d.ts.map +1 -1
- package/dist/lifecycle/snapshot.js +1 -2
- package/dist/lifecycle/snapshot.js.map +1 -1
- package/dist/lifecycle/transactions.d.ts +10 -3
- package/dist/lifecycle/transactions.d.ts.map +1 -1
- package/dist/lifecycle/transactions.js +47 -10
- package/dist/lifecycle/transactions.js.map +1 -1
- package/dist/lifecycle/types.d.ts +32 -107
- package/dist/lifecycle/types.d.ts.map +1 -1
- package/dist/lifecycle/types.js +3 -3
- package/dist/lifecycle/types.js.map +1 -1
- package/dist/lifecycle/ufg.d.ts +1 -1
- package/dist/lifecycle/ufg.d.ts.map +1 -1
- package/dist/lifecycle/ufg.js +1 -1
- package/dist/lifecycle/ufg.js.map +1 -1
- package/docs/launch-lifecycle.md +113 -1
- package/docs/lifecycle-gas-profiles.md +141 -24
- package/docs/reference.md +112 -3
- package/examples/.env.example +0 -3
- package/examples/README.md +11 -11
- package/examples/launch-example-support.ts +4 -9
- package/examples/launch-example.ts +12 -28
- package/examples/launch-lifecycle-smoke.ts +10 -22
- package/examples/launch.ts +8 -11
- package/package.json +1 -1
- package/src/lifecycle/auto-compound.ts +38 -0
- package/src/lifecycle/calibration.ts +3 -23
- package/src/lifecycle/deployments/auto-compound-dynamic-pool-v1-20261028.ts +77 -0
- package/src/lifecycle/deployments/auto-compound-static-pool-v1-20261028.ts +77 -0
- package/src/lifecycle/deployments/raeto-dynamic-pool-v1-20261029.ts +74 -0
- package/src/lifecycle/deployments/raeto-fixed-pool-v1-20261029.ts +74 -0
- package/src/lifecycle/gas-profile.ts +125 -104
- package/src/lifecycle/index.ts +6 -4
- package/src/lifecycle/markets.ts +47 -3
- package/src/lifecycle/opening-buys.ts +3 -3
- package/src/lifecycle/planner.ts +116 -191
- package/src/lifecycle/presets.ts +17 -1
- package/src/lifecycle/raeto-abi.ts +223 -0
- package/src/lifecycle/raeto.ts +61 -0
- package/src/lifecycle/rpc.ts +10 -32
- package/src/lifecycle/snapshot.ts +1 -2
- package/src/lifecycle/transactions.ts +46 -9
- package/src/lifecycle/types.ts +38 -87
- package/src/lifecycle/ufg.ts +1 -1
- package/dist/lifecycle/fork.d.ts +0 -15
- package/dist/lifecycle/fork.d.ts.map +0 -1
- package/dist/lifecycle/fork.js +0 -36
- package/dist/lifecycle/fork.js.map +0 -1
- package/dist/lifecycle/simulation.d.ts +0 -17
- package/dist/lifecycle/simulation.d.ts.map +0 -1
- package/dist/lifecycle/simulation.js +0 -605
- package/dist/lifecycle/simulation.js.map +0 -1
- package/src/lifecycle/fork.ts +0 -36
- package/src/lifecycle/simulation.ts +0 -543
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
// Generated from the verified RaetoFeeCollectorV1 ABI by scripts/generate-raeto-presets.mjs.
|
|
2
|
+
// Provenance: test/fixtures/raeto-registry-readback.json, abiProvenance.
|
|
3
|
+
export const raetoFeeCollectorV1Abi = [
|
|
4
|
+
{
|
|
5
|
+
"anonymous": false,
|
|
6
|
+
"inputs": [
|
|
7
|
+
{
|
|
8
|
+
"indexed": true,
|
|
9
|
+
"internalType": "address",
|
|
10
|
+
"name": "launchToken",
|
|
11
|
+
"type": "address"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"indexed": true,
|
|
15
|
+
"internalType": "bytes32",
|
|
16
|
+
"name": "poolId",
|
|
17
|
+
"type": "bytes32"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"indexed": true,
|
|
21
|
+
"internalType": "address",
|
|
22
|
+
"name": "asset",
|
|
23
|
+
"type": "address"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"indexed": false,
|
|
27
|
+
"internalType": "uint256",
|
|
28
|
+
"name": "grossQuoteCollected",
|
|
29
|
+
"type": "uint256"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"indexed": false,
|
|
33
|
+
"internalType": "uint256",
|
|
34
|
+
"name": "raetoAmount",
|
|
35
|
+
"type": "uint256"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"indexed": false,
|
|
39
|
+
"internalType": "uint256",
|
|
40
|
+
"name": "forwardedQuote",
|
|
41
|
+
"type": "uint256"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"indexed": false,
|
|
45
|
+
"internalType": "uint16",
|
|
46
|
+
"name": "shareBps",
|
|
47
|
+
"type": "uint16"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"indexed": false,
|
|
51
|
+
"internalType": "uint256",
|
|
52
|
+
"name": "owedAfter",
|
|
53
|
+
"type": "uint256"
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"name": "RaetoFeesBooked",
|
|
57
|
+
"type": "event"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"anonymous": false,
|
|
61
|
+
"inputs": [
|
|
62
|
+
{
|
|
63
|
+
"indexed": true,
|
|
64
|
+
"internalType": "address",
|
|
65
|
+
"name": "launchToken",
|
|
66
|
+
"type": "address"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"indexed": true,
|
|
70
|
+
"internalType": "bytes32",
|
|
71
|
+
"name": "poolId",
|
|
72
|
+
"type": "bytes32"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"indexed": true,
|
|
76
|
+
"internalType": "address",
|
|
77
|
+
"name": "payout",
|
|
78
|
+
"type": "address"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"indexed": false,
|
|
82
|
+
"internalType": "address",
|
|
83
|
+
"name": "asset",
|
|
84
|
+
"type": "address"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"indexed": false,
|
|
88
|
+
"internalType": "uint256",
|
|
89
|
+
"name": "amount",
|
|
90
|
+
"type": "uint256"
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
"name": "RaetoFeesClaimed",
|
|
94
|
+
"type": "event"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"anonymous": false,
|
|
98
|
+
"inputs": [
|
|
99
|
+
{
|
|
100
|
+
"indexed": true,
|
|
101
|
+
"internalType": "address",
|
|
102
|
+
"name": "launchToken",
|
|
103
|
+
"type": "address"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"indexed": true,
|
|
107
|
+
"internalType": "bytes32",
|
|
108
|
+
"name": "poolId",
|
|
109
|
+
"type": "bytes32"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"indexed": true,
|
|
113
|
+
"internalType": "address",
|
|
114
|
+
"name": "operator",
|
|
115
|
+
"type": "address"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"indexed": false,
|
|
119
|
+
"internalType": "uint16",
|
|
120
|
+
"name": "previousShareBps",
|
|
121
|
+
"type": "uint16"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"indexed": false,
|
|
125
|
+
"internalType": "uint16",
|
|
126
|
+
"name": "newShareBps",
|
|
127
|
+
"type": "uint16"
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"name": "RaetoShareUpdated",
|
|
131
|
+
"type": "event"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"inputs": [
|
|
135
|
+
{
|
|
136
|
+
"internalType": "address",
|
|
137
|
+
"name": "asset",
|
|
138
|
+
"type": "address"
|
|
139
|
+
}
|
|
140
|
+
],
|
|
141
|
+
"name": "claimRaeto",
|
|
142
|
+
"outputs": [
|
|
143
|
+
{
|
|
144
|
+
"internalType": "uint256",
|
|
145
|
+
"name": "amount",
|
|
146
|
+
"type": "uint256"
|
|
147
|
+
}
|
|
148
|
+
],
|
|
149
|
+
"stateMutability": "nonpayable",
|
|
150
|
+
"type": "function"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"inputs": [],
|
|
154
|
+
"name": "launchToken",
|
|
155
|
+
"outputs": [
|
|
156
|
+
{
|
|
157
|
+
"internalType": "address",
|
|
158
|
+
"name": "",
|
|
159
|
+
"type": "address"
|
|
160
|
+
}
|
|
161
|
+
],
|
|
162
|
+
"stateMutability": "view",
|
|
163
|
+
"type": "function"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"inputs": [
|
|
167
|
+
{
|
|
168
|
+
"internalType": "address",
|
|
169
|
+
"name": "asset",
|
|
170
|
+
"type": "address"
|
|
171
|
+
}
|
|
172
|
+
],
|
|
173
|
+
"name": "owed",
|
|
174
|
+
"outputs": [
|
|
175
|
+
{
|
|
176
|
+
"internalType": "uint256",
|
|
177
|
+
"name": "amount",
|
|
178
|
+
"type": "uint256"
|
|
179
|
+
}
|
|
180
|
+
],
|
|
181
|
+
"stateMutability": "view",
|
|
182
|
+
"type": "function"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"inputs": [],
|
|
186
|
+
"name": "quoteAsset",
|
|
187
|
+
"outputs": [
|
|
188
|
+
{
|
|
189
|
+
"internalType": "address",
|
|
190
|
+
"name": "",
|
|
191
|
+
"type": "address"
|
|
192
|
+
}
|
|
193
|
+
],
|
|
194
|
+
"stateMutability": "view",
|
|
195
|
+
"type": "function"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"inputs": [
|
|
199
|
+
{
|
|
200
|
+
"internalType": "uint16",
|
|
201
|
+
"name": "newShareBps",
|
|
202
|
+
"type": "uint16"
|
|
203
|
+
}
|
|
204
|
+
],
|
|
205
|
+
"name": "setShareBps",
|
|
206
|
+
"outputs": [],
|
|
207
|
+
"stateMutability": "nonpayable",
|
|
208
|
+
"type": "function"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"inputs": [],
|
|
212
|
+
"name": "shareBps",
|
|
213
|
+
"outputs": [
|
|
214
|
+
{
|
|
215
|
+
"internalType": "uint16",
|
|
216
|
+
"name": "",
|
|
217
|
+
"type": "uint16"
|
|
218
|
+
}
|
|
219
|
+
],
|
|
220
|
+
"stateMutability": "view",
|
|
221
|
+
"type": "function"
|
|
222
|
+
}
|
|
223
|
+
];
|
|
224
|
+
//# sourceMappingURL=raeto-abi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"raeto-abi.js","sourceRoot":"","sources":["../../src/lifecycle/raeto-abi.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAC7F,yEAAyE;AACzE,MAAM,CAAC,MAAM,sBAAsB,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EAAE,EAAE;gBACV,MAAM,EAAE,QAAQ;aACjB;SACF;QACD,iBAAiB,EAAE,MAAM;QACzB,MAAM,EAAE,UAAU;KACnB;CACO,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type Hex } from "viem";
|
|
2
|
+
import type { LaunchPlanV1 } from "./schema.js";
|
|
3
|
+
export declare const RAETO_FIXED_PROFILE_ID: Hex;
|
|
4
|
+
export declare const RAETO_DYNAMIC_PROFILE_ID: Hex;
|
|
5
|
+
export declare const RAETO_FIXED_ADAPTER_ID: Hex;
|
|
6
|
+
export declare const RAETO_DYNAMIC_ADAPTER_ID: Hex;
|
|
7
|
+
export declare const RAETO_PAYOUT_REGISTRY_ADDRESS = "0xBEC2C0e91612090F82df6743F31CDF18B4386b50";
|
|
8
|
+
/** The deployed collectors accept this menu, not the wider range in later source. */
|
|
9
|
+
export declare const RAETO_SHARE_BPS_OPTIONS: readonly [500, 1000, 2500, 5000, 7500];
|
|
10
|
+
export declare const RAETO_QUOTE_ASSETS: readonly ["0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73", "0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168"];
|
|
11
|
+
export type RaetoLaunchConfigV1 = {
|
|
12
|
+
shareBps: number;
|
|
13
|
+
};
|
|
14
|
+
export declare function isRaetoProfile(profileId: Hex): boolean;
|
|
15
|
+
export declare function validateRaetoLaunchConfig(config: RaetoLaunchConfigV1): void;
|
|
16
|
+
/** Exactly abi.encode(RaetoLaunchConfigV1): one static uint16 word. */
|
|
17
|
+
export declare function encodeRaetoLaunchTail(config: RaetoLaunchConfigV1): Hex;
|
|
18
|
+
export declare function decodeRaetoLaunchTail(encoded: Hex): RaetoLaunchConfigV1;
|
|
19
|
+
/** Raeto uses the normal lifecycle creator/funding route, not the UFG proxy. */
|
|
20
|
+
export declare function validateRaetoLaunchPlan(plan: LaunchPlanV1): void;
|
|
21
|
+
//# sourceMappingURL=raeto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"raeto.d.ts","sourceRoot":"","sources":["../../src/lifecycle/raeto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,GAAG,EAAE,MAAM,MAAM,CAAC;AAErD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,eAAO,MAAM,sBAAsB,EAAE,GAA0E,CAAC;AAChH,eAAO,MAAM,wBAAwB,EAAE,GAA0E,CAAC;AAClH,eAAO,MAAM,sBAAsB,EAAE,GAA0E,CAAC;AAChH,eAAO,MAAM,wBAAwB,EAAE,GAA0E,CAAC;AAClH,eAAO,MAAM,6BAA6B,+CAA+C,CAAC;AAC1F,qFAAqF;AACrF,eAAO,MAAM,uBAAuB,wCAAwD,CAAC;AAC7F,eAAO,MAAM,kBAAkB,uGAGpB,CAAC;AACZ,MAAM,MAAM,mBAAmB,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvD,wBAAgB,cAAc,CAAC,SAAS,EAAE,GAAG,GAAG,OAAO,CAGtD;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,mBAAmB,GAAG,IAAI,CAI3E;AAED,uEAAuE;AACvE,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,mBAAmB,GAAG,GAAG,CAGtE;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,GAAG,GAAG,mBAAmB,CAOvE;AAED,gFAAgF;AAChF,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,CAehE"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { encodeAbiParameters } from "viem";
|
|
2
|
+
import { decodePoolBoundV4LifecycleMarketConfig } from "./markets.js";
|
|
3
|
+
import { LifecyclePlanningError } from "./types.js";
|
|
4
|
+
export const RAETO_FIXED_PROFILE_ID = "0x9161833b162e7ca8160b11c64aedb307561e19a9136fd32f99cd797aab6da3ca";
|
|
5
|
+
export const RAETO_DYNAMIC_PROFILE_ID = "0x08387d00ee4f75f860810cc8fb434087328592c2f39ea3321109e589039f80e1";
|
|
6
|
+
export const RAETO_FIXED_ADAPTER_ID = "0x911d7ecefe56489d329235e3484829717dc00400d4181902f0f2de45f9338615";
|
|
7
|
+
export const RAETO_DYNAMIC_ADAPTER_ID = "0x8ab9c8c9b8fd4c8bbf12b780d9474463fa0fa52e3b450f0d5f68fd067dc1674d";
|
|
8
|
+
export const RAETO_PAYOUT_REGISTRY_ADDRESS = "0xBEC2C0e91612090F82df6743F31CDF18B4386b50";
|
|
9
|
+
/** The deployed collectors accept this menu, not the wider range in later source. */
|
|
10
|
+
export const RAETO_SHARE_BPS_OPTIONS = Object.freeze([500, 1000, 2500, 5000, 7500]);
|
|
11
|
+
export const RAETO_QUOTE_ASSETS = Object.freeze([
|
|
12
|
+
"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73",
|
|
13
|
+
"0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168",
|
|
14
|
+
]);
|
|
15
|
+
export function isRaetoProfile(profileId) {
|
|
16
|
+
const id = profileId.toLowerCase();
|
|
17
|
+
return id === RAETO_FIXED_PROFILE_ID || id === RAETO_DYNAMIC_PROFILE_ID;
|
|
18
|
+
}
|
|
19
|
+
export function validateRaetoLaunchConfig(config) {
|
|
20
|
+
if (!RAETO_SHARE_BPS_OPTIONS.some((share) => share === config.shareBps)) {
|
|
21
|
+
throw new LifecyclePlanningError("INVALID_RAETO_CONFIG", "Raeto shareBps must be one of 500, 1000, 2500, 5000 or 7500");
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
/** Exactly abi.encode(RaetoLaunchConfigV1): one static uint16 word. */
|
|
25
|
+
export function encodeRaetoLaunchTail(config) {
|
|
26
|
+
validateRaetoLaunchConfig(config);
|
|
27
|
+
return encodeAbiParameters([{ type: "uint16" }], [config.shareBps]);
|
|
28
|
+
}
|
|
29
|
+
export function decodeRaetoLaunchTail(encoded) {
|
|
30
|
+
if (!/^0x[0-9a-fA-F]{64}$/.test(encoded))
|
|
31
|
+
throw new LifecyclePlanningError("INVALID_RAETO_CONFIG", "Raeto tail must be exactly one ABI word");
|
|
32
|
+
const share = BigInt(encoded);
|
|
33
|
+
if (share > 65535n)
|
|
34
|
+
throw new LifecyclePlanningError("INVALID_RAETO_CONFIG", "Raeto tail must contain a canonical uint16");
|
|
35
|
+
const config = { shareBps: Number(share) };
|
|
36
|
+
validateRaetoLaunchConfig(config);
|
|
37
|
+
return config;
|
|
38
|
+
}
|
|
39
|
+
/** Raeto uses the normal lifecycle creator/funding route, not the UFG proxy. */
|
|
40
|
+
export function validateRaetoLaunchPlan(plan) {
|
|
41
|
+
try {
|
|
42
|
+
if (plan.markets.length === 0)
|
|
43
|
+
throw new Error("A Raeto plan requires at least one market");
|
|
44
|
+
for (const market of plan.markets) {
|
|
45
|
+
if (!isRaetoProfile(market.profileId) || market.configVersion !== 6 ||
|
|
46
|
+
!RAETO_QUOTE_ASSETS.some((quote) => quote.toLowerCase() === market.quoteAsset.toLowerCase()) ||
|
|
47
|
+
market.adapterId.toLowerCase() !== (market.profileId.toLowerCase() === RAETO_FIXED_PROFILE_ID ? RAETO_FIXED_ADAPTER_ID : RAETO_DYNAMIC_ADAPTER_ID)) {
|
|
48
|
+
throw new Error("Every Raeto market requires its Raeto config6 profile/adapter and a WETH or USDG quote");
|
|
49
|
+
}
|
|
50
|
+
const config = decodePoolBoundV4LifecycleMarketConfig(market.config, 6);
|
|
51
|
+
if (config.profileId.toLowerCase() !== market.profileId.toLowerCase())
|
|
52
|
+
throw new Error("Raeto config profile differs from its market");
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
throw new LifecyclePlanningError("INVALID_RAETO_PLAN", error instanceof Error ? error.message : "Invalid Raeto launch plan");
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=raeto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rae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AAsB,CAAC,CAAC,CAAC,wBAAwB,CAAC,EAAE,CAAC;gBACrJ,MAAM,IAAI,KAAK,CAAC,wFAAwF,CAAC,CAAC;YAC5G,CAAC;YACD,MAAM,MAAM,GAAG,sCAAsC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;YACxE,IAAI,MAAM,CAAC,SAAS,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC,SAAS,CAAC,WAAW,EAAE;gBAAE,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;QACzI,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,sBAAsB,CAAC,oBAAoB,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC;IAC/H,CAAC;AACH,CAAC"}
|
package/dist/lifecycle/rpc.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Abi, type Address, type Hex } from "viem";
|
|
2
2
|
import { type LifecycleBlock, type LifecycleDiagnosticStage, type LifecycleLimitContext, type LifecycleLimitSource, type LifecycleLimits, type LifecycleRpcClient, type LifecycleSessionCache, type LifecycleTransaction, type ResolvedLifecycleLimits } from "./types.js";
|
|
3
3
|
import type { ProfileTopologyV1 } from "./schema.js";
|
|
4
|
-
/** Opt-in pinned read reuse; client-bound identity/
|
|
4
|
+
/** Opt-in pinned read reuse; client-bound identity/deployment facts are separate. */
|
|
5
5
|
export declare function createLifecycleSessionCache(): LifecycleSessionCache;
|
|
6
6
|
/** Internal callers join the same invocation; only explicit static reads opt in to a session. */
|
|
7
7
|
export declare function withLifecycleReadClient<T>(source: LifecycleRpcClient, work: (client: LifecycleRpcClient) => Promise<T>): Promise<T>;
|
|
@@ -21,7 +21,7 @@ export declare function readLifecycleChainId(client: LifecycleRpcClient): Promis
|
|
|
21
21
|
export declare function readLifecycleGasPrice(client: LifecycleRpcClient, block: LifecycleBlock, chainId: bigint): Promise<bigint>;
|
|
22
22
|
/** Only the reviewed immutable factory identity may use an invocation-wide key. */
|
|
23
23
|
export declare function readLifecycleImmutable<T>(client: LifecycleRpcClient, key: string, work: () => Promise<T>): Promise<T>;
|
|
24
|
-
/** Successful deployment
|
|
24
|
+
/** Successful deployment observations live for the caller's session, not one block. */
|
|
25
25
|
export declare function lifecycleSessionRead<T>(client: LifecycleRpcClient, key: string, work: () => Promise<T>): Promise<T>;
|
|
26
26
|
export declare function attestLifecycleMulticall(client: LifecycleRpcClient, block?: LifecycleBlock): Promise<void>;
|
|
27
27
|
/** Installs only SDK-observed wire results from this invocation's aggregate/lens. */
|
|
@@ -40,17 +40,7 @@ export declare function readLifecycleContract<T>(client: LifecycleRpcClient, to:
|
|
|
40
40
|
export declare function readLifecycleStaticContract<T>(client: LifecycleRpcClient, to: Address, abi: Abi, functionName: string, args: readonly unknown[], block: LifecycleBlock, from?: Address): Promise<T>;
|
|
41
41
|
/** A reviewed registry must supply topology; missing selectors never certify a profile. */
|
|
42
42
|
export declare function readLifecycleProfileTopology(client: LifecycleRpcClient, registry: Address, profileId: Hex, block: LifecycleBlock): Promise<ProfileTopologyV1>;
|
|
43
|
-
export declare const nitroArbSys = "0x0000000000000000000000000000000000000064";
|
|
44
43
|
export declare const nitroGasInfo = "0x000000000000000000000000000000000000006c";
|
|
45
|
-
export declare const nitroArbSysAbi: readonly [{
|
|
46
|
-
readonly name: "arbOSVersion";
|
|
47
|
-
readonly type: "function";
|
|
48
|
-
readonly stateMutability: "view";
|
|
49
|
-
readonly inputs: readonly [];
|
|
50
|
-
readonly outputs: readonly [{
|
|
51
|
-
readonly type: "uint256";
|
|
52
|
-
}];
|
|
53
|
-
}];
|
|
54
44
|
export declare const nitroGasInfoAbi: readonly [{
|
|
55
45
|
readonly name: "getPricesInWei";
|
|
56
46
|
readonly type: "function";
|
|
@@ -71,7 +61,7 @@ export declare const nitroGasInfoAbi: readonly [{
|
|
|
71
61
|
}];
|
|
72
62
|
}];
|
|
73
63
|
export type LifecycleNitroPrices = readonly [bigint, bigint, bigint, bigint, bigint, bigint];
|
|
74
|
-
/** Seeded by the planning aggregate
|
|
64
|
+
/** Seeded by the explicitly pinned planning aggregate. */
|
|
75
65
|
export declare function readNitroPrices(client: LifecycleRpcClient, block: LifecycleBlock): Promise<LifecycleNitroPrices>;
|
|
76
66
|
/** EOA legacy/1559 serialization and Nitro's Brotli allocation bound, not a
|
|
77
67
|
* per-transaction oracle quote. Wallet-added access/auth lists and AA wrappers
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc.d.ts","sourceRoot":"","sources":["../../src/lifecycle/rpc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyG,KAAK,GAAG,EAAE,KAAK,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,MAAM,CAAC;AAC/J,OAAO,EAA0B,KAAK,cAAc,EAAmE,KAAK,wBAAwB,EAAE,KAAK,qBAAqB,EAAE,KAAK,oBAAoB,EAAE,KAAK,eAAe,EAAE,KAAK,kBAAkB,EAAE,KAAK,qBAAqB,EAAE,KAAK,oBAAoB,EAAE,KAAK,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAEpW,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAqErD,qFAAqF;AACrF,wBAAgB,2BAA2B,IAAI,qBAAqB,CAEnE;AAyPD,iGAAiG;AACjG,wBAAsB,uBAAuB,CAAC,CAAC,EAAE,MAAM,EAAE,kBAAkB,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAgBzI;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,kBAAkB,GAAG,kBAAkB,CAEpF;AAED,iFAAiF;AACjF,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAIjF;AASD,iFAAiF;AACjF,w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 8;
|
|
19
19
|
const diagnosticRpcMethods = {
|
|
20
20
|
eth_chainId: true, eth_getBlockByNumber: true, eth_getBlockByHash: true, eth_getCode: true,
|
|
21
|
-
eth_getBalance: true, eth_call: true,
|
|
22
|
-
|
|
21
|
+
eth_getBalance: true, eth_call: true, eth_gasPrice: true,
|
|
22
|
+
eth_getTransactionReceipt: true, eth_getTransactionByHash: true,
|
|
23
23
|
};
|
|
24
24
|
/** Private wire observations; callers can inspect the pin or discard it, never install values. */
|
|
25
25
|
class SessionLifecycleCache {
|
|
@@ -57,7 +57,7 @@ class SessionLifecycleCache {
|
|
|
57
57
|
group.chainId = chainId;
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
/** Opt-in pinned read reuse; client-bound identity/
|
|
60
|
+
/** Opt-in pinned read reuse; client-bound identity/deployment facts are separate. */
|
|
61
61
|
export function createLifecycleSessionCache() {
|
|
62
62
|
return new SessionLifecycleCache();
|
|
63
63
|
}
|
|
@@ -419,7 +419,7 @@ export function readLifecycleGasPrice(client, block, chainId) {
|
|
|
419
419
|
export function readLifecycleImmutable(client, key, work) {
|
|
420
420
|
return (client instanceof InvocationLifecycleClient ? client.immutableRead(key, work) : work());
|
|
421
421
|
}
|
|
422
|
-
/** Successful deployment
|
|
422
|
+
/** Successful deployment observations live for the caller's session, not one block. */
|
|
423
423
|
export function lifecycleSessionRead(client, key, work) {
|
|
424
424
|
const source = lifecycleSourceClient(client);
|
|
425
425
|
const owner = source.sessionCache ?? source;
|
|
@@ -545,15 +545,13 @@ export async function readLifecycleProfileTopology(client, registry, profileId,
|
|
|
545
545
|
throw new LifecyclePlanningError("INVALID_RPC_RESPONSE", "Registry returned an unsupported hook topology");
|
|
546
546
|
return { ...topology, hookTopology: topology.hookTopology };
|
|
547
547
|
}
|
|
548
|
-
export const nitroArbSys = "0x0000000000000000000000000000000000000064";
|
|
549
548
|
export const nitroGasInfo = "0x000000000000000000000000000000000000006c";
|
|
550
|
-
export const nitroArbSysAbi = parseAbi(["function arbOSVersion() view returns (uint256)"]);
|
|
551
549
|
export const nitroGasInfoAbi = parseAbi([
|
|
552
550
|
// Transaction ceilings are release preset metadata, not guard-only getter reads.
|
|
553
551
|
"function getPricesInWei() view returns (uint256,uint256,uint256,uint256,uint256,uint256)",
|
|
554
552
|
]);
|
|
555
553
|
const maxUint64 = (1n << 64n) - 1n;
|
|
556
|
-
/** Seeded by the planning aggregate
|
|
554
|
+
/** Seeded by the explicitly pinned planning aggregate. */
|
|
557
555
|
export function readNitroPrices(client, block) {
|
|
558
556
|
return readLifecycleContract(client, nitroGasInfo, nitroGasInfoAbi, "getPricesInWei", [], block, undefined, true, true);
|
|
559
557
|
}
|
|
@@ -570,13 +568,6 @@ export function nitroPosterGasBound(transaction, prices) {
|
|
|
570
568
|
throw new LifecyclePlanningError("NITRO_PRICES_UNAVAILABLE", "Positive poster fees cannot be converted at a zero L2 gas price");
|
|
571
569
|
return { posterGas: 2n * ((feeBound + prices[5] - 1n) / prices[5]), feeBound };
|
|
572
570
|
}
|
|
573
|
-
async function readNitroScalar(context, to, abi, functionName) {
|
|
574
|
-
const data = encodeFunctionData({ abi, functionName });
|
|
575
|
-
const result = rpcHex(await lifecycleIndependentRpc(context.client, [{ to, data }, toHex(context.block.number)], context.block, true), functionName);
|
|
576
|
-
if (result.length !== 66)
|
|
577
|
-
throw new LifecyclePlanningError("INVALID_RPC_RESPONSE", `${functionName} must return exactly one ABI word`);
|
|
578
|
-
return decodeFunctionResult({ abi, functionName, data: result });
|
|
579
|
-
}
|
|
580
571
|
/** Reuse only SDK-owned, pinned observations inside the still-open invocation.
|
|
581
572
|
* Caller-supplied policies remain checked for mutation on every consumption. */
|
|
582
573
|
export function resolveLifecycleLimits(context, source) {
|
|
@@ -608,7 +599,7 @@ async function resolveLifecycleLimitsFresh(context, source) {
|
|
|
608
599
|
const headroomBps = configuration.headroomBps === undefined ? 1500 : configuration.headroomBps;
|
|
609
600
|
if (!Number.isSafeInteger(headroomBps) || headroomBps < 0 || headroomBps > 10000)
|
|
610
601
|
throw new LifecyclePlanningError("INVALID_LIMITS", "Headroom must be between zero and 10000 basis points");
|
|
611
|
-
for (const limit of [context.block.gasLimit, configuration.chainGasLimit, configuration.rpcGasLimit, configuration.accountGasLimit
|
|
602
|
+
for (const limit of [context.block.gasLimit, configuration.chainGasLimit, configuration.rpcGasLimit, configuration.accountGasLimit]) {
|
|
612
603
|
if (limit !== undefined && (typeof limit !== "bigint" || limit <= 0n || limit > maxUint64))
|
|
613
604
|
throw new LifecyclePlanningError("INVALID_LIMITS", "Gas caps must be positive exact uint64 bigint values");
|
|
614
605
|
}
|
|
@@ -624,42 +615,25 @@ async function resolveLifecycleLimitsFresh(context, source) {
|
|
|
624
615
|
throw new LifecyclePlanningError("LIMIT_CONTEXT_MISMATCH", "Supplied execution policy provenance differs from the canonical chain/account/core/block context");
|
|
625
616
|
}
|
|
626
617
|
const protocol = context.chainId === 4663n ? "nitro" : "evm";
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
if (protocol === "nitro") {
|
|
630
|
-
try {
|
|
631
|
-
const rawVersion = await readNitroScalar(context, nitroArbSys, nitroArbSysAbi, "arbOSVersion");
|
|
632
|
-
// ArbSys alone adds 55 to the logical Nitro ArbOS version.
|
|
633
|
-
if (typeof rawVersion !== "bigint" || rawVersion < 105n)
|
|
634
|
-
throw new Error("ArbOS version 50 or newer is required (ArbSys raw version >= 105)");
|
|
635
|
-
arbOSVersion = rawVersion - 55n;
|
|
636
|
-
}
|
|
637
|
-
catch (failure) {
|
|
638
|
-
if (failure instanceof Error && failure.name === "AbortError")
|
|
639
|
-
throw failure;
|
|
640
|
-
throw new LifecyclePlanningError("NITRO_LIMITS_UNAVAILABLE", `Pinned Nitro version could not be established: ${lifecycleFailureReason(failure)}`);
|
|
641
|
-
}
|
|
642
|
-
if (configuration.estimateDataFee !== undefined)
|
|
643
|
-
throw new LifecyclePlanningError("INVALID_LIMITS", "Nitro poster fees are already included in gas; an external data-fee estimator would double-charge them");
|
|
644
|
-
}
|
|
618
|
+
if (protocol === "nitro" && configuration.estimateDataFee !== undefined)
|
|
619
|
+
throw new LifecyclePlanningError("INVALID_LIMITS", "Nitro poster fees are already included in gas; an external data-fee estimator would double-charge them");
|
|
645
620
|
const envelopeCaps = [configuration.chainGasLimit, configuration.rpcGasLimit, configuration.accountGasLimit].filter((limit) => limit !== undefined);
|
|
646
621
|
if (protocol === "evm")
|
|
647
622
|
envelopeCaps.push(context.block.gasLimit);
|
|
648
623
|
const transactionGasCeiling = envelopeCaps.length === 0 ? undefined : envelopeCaps.reduce((minimum, limit) => limit < minimum ? limit : minimum);
|
|
649
624
|
const executionGasCeiling = protocol === "nitro" ? ROBINHOOD_NATIVE_TRANSACTION_GAS_LIMIT : transactionGasCeiling ?? context.block.gasLimit;
|
|
650
625
|
const unknownExecutionConstraints = [
|
|
651
|
-
...(protocol === "evm" && configuration.chainGasLimit === undefined ? ["Independent chain per-transaction
|
|
626
|
+
...(protocol === "evm" && configuration.chainGasLimit === undefined ? ["Independent chain per-transaction cap is unknown; the budget is bounded by the pinned header"] : []),
|
|
652
627
|
...(configuration.rpcGasLimit === undefined ? ["RPC transaction gas-envelope cap is unknown"] : []),
|
|
653
628
|
...(configuration.accountGasLimit === undefined ? ["Current account/wallet transaction gas-envelope cap is unknown"] : []),
|
|
654
629
|
...(configuration.maxCalldataBytes === undefined ? ["Applicable chain/account/RPC calldata byte cap is unknown"] : []),
|
|
655
|
-
...(maxSimulationGas === undefined ? ["RPC aggregate simulation gas cap is unknown"] : []),
|
|
656
630
|
];
|
|
657
631
|
assertCurrent();
|
|
658
632
|
return {
|
|
659
633
|
configuration, assertCurrent,
|
|
660
634
|
limits: Object.freeze({
|
|
661
|
-
protocol, executionGasCeiling, transactionGasCeiling,
|
|
662
|
-
maxCalldataBytes: configuration.maxCalldataBytes,
|
|
635
|
+
protocol, executionGasCeiling, transactionGasCeiling, headroomBps,
|
|
636
|
+
maxCalldataBytes: configuration.maxCalldataBytes,
|
|
663
637
|
blockGasLimit: context.block.gasLimit, chainGasLimit: configuration.chainGasLimit,
|
|
664
638
|
rpcGasLimit: configuration.rpcGasLimit, accountGasLimit: configuration.accountGasLimit,
|
|
665
639
|
unknownExecutionConstraints: Object.freeze(unknownExecutionConstraints),
|