@reptilianhq/uniswap-sdk 0.9.0 → 0.11.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 +20 -6
- package/RELEASING.md +10 -6
- package/dist/compatibility.d.ts +4 -4
- package/dist/compatibility.d.ts.map +1 -1
- package/dist/compatibility.js +1 -1
- package/dist/compatibility.js.map +1 -1
- package/dist/deployments.d.ts +32 -20
- package/dist/deployments.d.ts.map +1 -1
- package/dist/deployments.js +25 -10
- package/dist/deployments.js.map +1 -1
- package/dist/v4-transactions.d.ts +93 -0
- package/dist/v4-transactions.d.ts.map +1 -1
- package/dist/v4-transactions.js +343 -0
- package/dist/v4-transactions.js.map +1 -1
- package/dist/v4.d.ts +6 -6
- package/dist/v4.d.ts.map +1 -1
- package/dist/v4.js +3 -3
- package/dist/v4.js.map +1 -1
- package/docs/FORK_TESTING.md +40 -1
- package/package.json +3 -3
- package/scripts/verify-v4-deployments.mjs +2 -2
package/README.md
CHANGED
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Reptilian-maintained integration SDK, released independently through GitHub Packages.
|
|
4
4
|
It owns Uniswap protocol mechanics: reviewed deployments, ABI encoding and decoding,
|
|
5
|
-
unsigned v3 transaction material, calldata review, receipt evidence, and v4 observations.
|
|
5
|
+
unsigned v3/v4 transaction material, calldata review, receipt evidence, and v4 observations.
|
|
6
6
|
It never owns keys, authorization policy, transaction submission, persistence, or orchestration.
|
|
7
7
|
|
|
8
8
|
## Capabilities and ownership
|
|
9
9
|
|
|
10
10
|
- `./v4`: full pool identity, Initialize-log normalization, pool state,
|
|
11
11
|
exact-input Quoter simulation, ordered quote batches, initialized tick windows,
|
|
12
|
-
reviewed Arc infrastructure, and unsigned position
|
|
12
|
+
reviewed Arc infrastructure, and unsigned position mint, increase, partial-removal,
|
|
13
|
+
and atomic full-close material with strict review.
|
|
13
14
|
- `./v3`: Robinhood v3 deployment identity, compatibility checks, unsigned
|
|
14
15
|
position transaction builders, strict calldata review, and receipt evidence.
|
|
15
16
|
- `./deployments`, `./compatibility`, `./transactions`, `./receipts`: stable
|
|
@@ -73,9 +74,13 @@ A complete deterministic consumer example is available in
|
|
|
73
74
|
the published package subpaths and demonstrates a pool observation, a partial
|
|
74
75
|
tick result, and branching on `isUniswapSdkError`.
|
|
75
76
|
|
|
76
|
-
Generic v4 reads still require an explicit `reviewedDeployment`.
|
|
77
|
-
`
|
|
78
|
-
|
|
77
|
+
Generic v4 reads still require an explicit `reviewedDeployment`. Hosts select one from
|
|
78
|
+
`uniswapV4Deployments` with `getUniswapV4Deployment(chainId)` or
|
|
79
|
+
`findUniswapV4DeploymentForNetwork(network)` (today only `arcUniswapV4Mainnet`), and must
|
|
80
|
+
run `verifyUniswapV4Compatibility` before relying on its pinned shared Uniswap infrastructure.
|
|
81
|
+
V3 hosts use `uniswapV3Deployments` and `getUniswapV3Deployment(chainId)` the same way.
|
|
82
|
+
Addresses are pinned in this package, not read from `@uniswap/sdk-core`; a unit test fails
|
|
83
|
+
when a pinned address disagrees with the address Uniswap publishes for that chain. This does not authenticate Argus Portal,
|
|
79
84
|
hook, locker, splitter, tracker, or fee semantics. Hosts own endpoint selection,
|
|
80
85
|
finality, capability policy and secret storage. For multicall consumers, use
|
|
81
86
|
`quoteV4WithBatch`, `v4PoolStateCalls`, `decodeV4PoolState`,
|
|
@@ -83,6 +88,14 @@ finality, capability policy and secret storage. For multicall consumers, use
|
|
|
83
88
|
Those helpers preserve the existing host's transport, block and sender context;
|
|
84
89
|
the host must check chain/deployment identity and Quoter multicall compatibility.
|
|
85
90
|
|
|
91
|
+
V4 position management is deliberately position-scoped. The host must first bind
|
|
92
|
+
the owner, token ID, PoolKey, ticks, and current liquidity at one observation block,
|
|
93
|
+
then independently authorize and simulate the returned unsigned transaction. Increase
|
|
94
|
+
material may carry an exact Permit2 batch. Removal material returns both currencies to
|
|
95
|
+
PositionManager's `msgSender()`; a full exit can burn the NFT atomically. These builders
|
|
96
|
+
do not merge positions or imply that a managed strategy position is the launch position,
|
|
97
|
+
even when both positions happen to share the same underlying pool.
|
|
98
|
+
|
|
86
99
|
## Observation and quote guarantees
|
|
87
100
|
|
|
88
101
|
The direct-client RPC operations check chain identity (the `./batch` host owns that check). Pool/tick reads check StateView's
|
|
@@ -148,7 +161,8 @@ IDs, native/ERC-20 direction, dynamic-fee hook data, pointer/chain mismatch,
|
|
|
148
161
|
partial depth, failed versus zero quotes, discovery identity, batched transport
|
|
149
162
|
compatibility, exact reviewed runtime code hashes, and the runnable
|
|
150
163
|
package-subpath consumer example. `npm run test:fork` additionally executes an
|
|
151
|
-
SDK-built and reviewed full
|
|
164
|
+
SDK-built and reviewed Robinhood v3 full close plus an Arc v4 unhooked
|
|
165
|
+
mint/increase/partial-remove/full-close lifecycle against pinned Anvil forks,
|
|
152
166
|
documented in [docs/FORK_TESTING.md](./docs/FORK_TESTING.md).
|
|
153
167
|
|
|
154
168
|
`npm run test:live-compatibility` rechecks the two Robinhood deployments and the Arc v4
|
package/RELEASING.md
CHANGED
|
@@ -58,13 +58,17 @@ Run `npm ci --ignore-scripts` and `npm run check`. Checks include TypeScript,
|
|
|
58
58
|
lint, unit tests, built Node ESM runtime smoke, a runnable consumer example using
|
|
59
59
|
the public package subpaths, publisher checksum and tests,
|
|
60
60
|
packed export lint, and packed ESM/type resolution. The published scope includes
|
|
61
|
-
v4 observations and provider plans plus v3 reviewed deployments, exact runtime
|
|
62
|
-
code hashes, unsigned
|
|
61
|
+
v4 observations and provider plans plus v3/v4 reviewed deployments, exact runtime
|
|
62
|
+
code hashes, unsigned position mint/increase/removal construction, calldata review, compatibility
|
|
63
63
|
checks, pinned receipt evidence, and a self-hash-checked copy of the shared SDK
|
|
64
|
-
conformance rules. Run `npm run test:fork` separately with
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
amounts to match the simulation.
|
|
64
|
+
conformance rules. Run `npm run test:fork` separately with archive-capable
|
|
65
|
+
`SDK_FORK_EIP155_4663_RPC_URL` and `SDK_FORK_EIP155_5042_RPC_URL` endpoints. The
|
|
66
|
+
Robinhood suite simulates and executes the reviewed v3 close path and requires
|
|
67
|
+
receipt amounts to match the simulation. The Arc suite verifies the pinned
|
|
68
|
+
deployment, then executes the SDK-built and independently reviewed unhooked v4
|
|
69
|
+
mint, increase, partial-removal, and atomic-close lifecycle on Anvil using two
|
|
70
|
+
ordinary ERC-20s. It neither broadcasts nor addresses launcher-locked LP. Run
|
|
71
|
+
`npm run test:live-compatibility` before release to
|
|
68
72
|
recheck all three deployment records. Runtime code identity is not source verification or
|
|
69
73
|
custom-hook compatibility. Arc's shared Uniswap deployment is runtime-pinned and its
|
|
70
74
|
official manifest plus retained generated artifacts are reproducible as documented in
|
package/dist/compatibility.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Address, type Hex, type PublicClient } from 'viem';
|
|
2
|
-
import type {
|
|
2
|
+
import type { UniswapV4ContractName, UniswapV4Deployment, UniswapV3ContractName, UniswapV3Deployment } from './deployments.js';
|
|
3
3
|
export interface UniswapV3CompatibilityReport {
|
|
4
4
|
chainId: number;
|
|
5
5
|
abiRevision: string;
|
|
@@ -8,12 +8,12 @@ export interface UniswapV3CompatibilityReport {
|
|
|
8
8
|
positionManagerFactory: Address;
|
|
9
9
|
positionManagerWrappedNative: Address;
|
|
10
10
|
}
|
|
11
|
-
export interface
|
|
11
|
+
export interface UniswapV4CompatibilityReport {
|
|
12
12
|
chainId: number;
|
|
13
13
|
blockNumber: bigint;
|
|
14
14
|
blockHash: Hex;
|
|
15
15
|
contractsWithCode: readonly Address[];
|
|
16
|
-
runtimeCodeHashes: Readonly<Record<
|
|
16
|
+
runtimeCodeHashes: Readonly<Record<UniswapV4ContractName, Hex>>;
|
|
17
17
|
stateViewPoolManager: Address;
|
|
18
18
|
quoterPoolManager: Address;
|
|
19
19
|
positionManagerPoolManager: Address;
|
|
@@ -31,5 +31,5 @@ export declare function verifyUniswapV3Compatibility(client: PublicClient, deplo
|
|
|
31
31
|
* Retained upstream generated initcode is verified separately by
|
|
32
32
|
* verify-v4-retained-artifacts.mjs; that check is not a fresh source compilation.
|
|
33
33
|
*/
|
|
34
|
-
export declare function
|
|
34
|
+
export declare function verifyUniswapV4Compatibility(client: PublicClient, deployment: UniswapV4Deployment): Promise<UniswapV4CompatibilityReport>;
|
|
35
35
|
//# sourceMappingURL=compatibility.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compatibility.d.ts","sourceRoot":"","sources":["../src/compatibility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,OAAO,EAAE,KAAK,GAAG,EAAE,KAAK,YAAY,EAAE,MAAM,MAAM,CAAC;AAGxF,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"compatibility.d.ts","sourceRoot":"","sources":["../src/compatibility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,OAAO,EAAE,KAAK,GAAG,EAAE,KAAK,YAAY,EAAE,MAAM,MAAM,CAAC;AAGxF,OAAO,KAAK,EACV,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,kBAAkB,CAAC;AAG1B,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,SAAS,OAAO,EAAE,CAAC;IACtC,iBAAiB,EAAE,QAAQ,CAAC,MAAM,CAAC,qBAAqB,EAAE,GAAG,CAAC,CAAC,CAAC;IAChE,sBAAsB,EAAE,OAAO,CAAC;IAChC,4BAA4B,EAAE,OAAO,CAAC;CACvC;AAED,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,GAAG,CAAC;IACf,iBAAiB,EAAE,SAAS,OAAO,EAAE,CAAC;IACtC,iBAAiB,EAAE,QAAQ,CAAC,MAAM,CAAC,qBAAqB,EAAE,GAAG,CAAC,CAAC,CAAC;IAChE,oBAAoB,EAAE,OAAO,CAAC;IAC9B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,0BAA0B,EAAE,OAAO,CAAC;IACpC,sBAAsB,EAAE,OAAO,CAAC;IAChC,4BAA4B,EAAE,OAAO,CAAC;IACtC,8BAA8B,EAAE,OAAO,CAAC;IACxC,kCAAkC,EAAE,MAAM,CAAC;CAC5C;AAED;;GAEG;AACH,wBAAsB,4BAA4B,CAChD,MAAM,EAAE,YAAY,EACpB,UAAU,EAAE,mBAAmB,GAC9B,OAAO,CAAC,4BAA4B,CAAC,CAoCvC;AAED;;;;GAIG;AACH,wBAAsB,4BAA4B,CAChD,MAAM,EAAE,YAAY,EACpB,UAAU,EAAE,mBAAmB,GAC9B,OAAO,CAAC,4BAA4B,CAAC,CA+FvC"}
|
package/dist/compatibility.js
CHANGED
|
@@ -49,7 +49,7 @@ export async function verifyUniswapV3Compatibility(client, deployment) {
|
|
|
49
49
|
* Retained upstream generated initcode is verified separately by
|
|
50
50
|
* verify-v4-retained-artifacts.mjs; that check is not a fresh source compilation.
|
|
51
51
|
*/
|
|
52
|
-
export async function
|
|
52
|
+
export async function verifyUniswapV4Compatibility(client, deployment) {
|
|
53
53
|
return rpc(async () => {
|
|
54
54
|
for (const name of ['poolManager', 'stateView', 'quoter']) {
|
|
55
55
|
if (deployment[name].toLowerCase() !== deployment.contracts[name].toLowerCase()) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compatibility.js","sourceRoot":"","sources":["../src/compatibility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAA6C,MAAM,MAAM,CAAC;AACxF,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAOrE,OAAO,EAAE,GAAG,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AAG,IAAI,uBAAuB,MAAM,CAAC,QAAQ,CAAC,SAAS,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE;QACxH,IAAI;QACJ,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC;QAC1B,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;KACvB,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { getAddress, keccak256, type Address, type Hex, type PublicClient } from 'viem';\nimport { v4PositionManagerAbi, v4QuoterAbi, v4StateViewAbi } from './abis.js';\nimport { V3_ABI_REVISION, v3PositionManagerAbi } from './v3-abis.js';\nimport type {\n ArcUniswapV4ContractName,\n ArcUniswapV4Deployment,\n UniswapV3ContractName,\n UniswapV3Deployment,\n} from './deployments.js';\nimport { rpc, UniswapSdkError } from './errors.js';\n\nexport interface UniswapV3CompatibilityReport {\n chainId: number;\n abiRevision: string;\n contractsWithCode: readonly Address[];\n runtimeCodeHashes: Readonly<Record<UniswapV3ContractName, Hex>>;\n positionManagerFactory: Address;\n positionManagerWrappedNative: Address;\n}\n\nexport interface ArcUniswapV4CompatibilityReport {\n chainId: number;\n blockNumber: bigint;\n blockHash: Hex;\n contractsWithCode: readonly Address[];\n runtimeCodeHashes: Readonly<Record<ArcUniswapV4ContractName, Hex>>;\n stateViewPoolManager: Address;\n quoterPoolManager: Address;\n positionManagerPoolManager: Address;\n positionManagerPermit2: Address;\n positionManagerWrappedNative: Address;\n positionManagerTokenDescriptor: Address;\n positionManagerUnsubscribeGasLimit: bigint;\n}\n\n/**\n * Checks chain identity, exact runtime code hashes, and position-manager wiring.\n */\nexport async function verifyUniswapV3Compatibility(\n client: PublicClient,\n deployment: UniswapV3Deployment,\n): Promise<UniswapV3CompatibilityReport> {\n return rpc(async () => {\n if (deployment.abiRevision !== V3_ABI_REVISION) mismatch('deployment.abiRevision', V3_ABI_REVISION, deployment.abiRevision);\n const chainId = await client.getChainId();\n if (chainId !== deployment.chainId) mismatch('chainId', deployment.chainId, chainId);\n\n const contractNames = Object.keys(deployment.contracts) as UniswapV3ContractName[];\n const checked = contractNames.map(name => deployment.contracts[name]);\n const runtimeCodeHashes = {} as Record<UniswapV3ContractName, Hex>;\n for (const name of contractNames) {\n const address = deployment.contracts[name];\n const bytecode = await client.getBytecode({ address });\n if (!bytecode || bytecode === '0x') mismatch(`contracts.${address}`, 'deployed bytecode', bytecode ?? 'undefined');\n const runtimeCodeHash = keccak256(bytecode);\n if (runtimeCodeHash !== deployment.runtimeCodeHashes[name]) {\n mismatch(`runtimeCodeHashes.${name}`, deployment.runtimeCodeHashes[name], runtimeCodeHash);\n }\n runtimeCodeHashes[name] = runtimeCodeHash;\n }\n\n const [factory, wrappedNative] = await Promise.all([\n readAddress(client, deployment.contracts.nonfungiblePositionManager, 'factory'),\n readAddress(client, deployment.contracts.nonfungiblePositionManager, 'WETH9'),\n ]);\n if (factory.toLowerCase() !== deployment.contracts.factory.toLowerCase()) mismatch('positionManager.factory', deployment.contracts.factory, factory);\n if (wrappedNative.toLowerCase() !== deployment.contracts.wrappedNative.toLowerCase()) mismatch('positionManager.WETH9', deployment.contracts.wrappedNative, wrappedNative);\n\n return {\n chainId,\n abiRevision: deployment.abiRevision,\n contractsWithCode: checked,\n runtimeCodeHashes,\n positionManagerFactory: factory,\n positionManagerWrappedNative: wrappedNative,\n };\n });\n}\n\n/**\n * Rechecks the exact Arc block, runtime bytecode, and v4 immutable wiring.\n * Retained upstream generated initcode is verified separately by\n * verify-v4-retained-artifacts.mjs; that check is not a fresh source compilation.\n */\nexport async function verifyArcUniswapV4Compatibility(\n client: PublicClient,\n deployment: ArcUniswapV4Deployment,\n): Promise<ArcUniswapV4CompatibilityReport> {\n return rpc(async () => {\n for (const name of ['poolManager', 'stateView', 'quoter'] as const) {\n if (deployment[name].toLowerCase() !== deployment.contracts[name].toLowerCase()) {\n mismatch(name, deployment.contracts[name], deployment[name]);\n }\n }\n\n const chainId = await client.getChainId();\n if (chainId !== deployment.chainId) mismatch('chainId', deployment.chainId, chainId);\n\n const block = await client.getBlock({ blockNumber: deployment.referenceBlock.number });\n if (block.hash !== deployment.referenceBlock.hash) {\n mismatch('referenceBlock.hash', deployment.referenceBlock.hash, block.hash);\n }\n\n const contractNames = Object.keys(deployment.contracts) as ArcUniswapV4ContractName[];\n const checked = contractNames.map(name => deployment.contracts[name]);\n const runtimeCodeHashes = {} as Record<ArcUniswapV4ContractName, Hex>;\n for (const name of contractNames) {\n const address = deployment.contracts[name];\n const bytecode = await client.getBytecode({ address, blockNumber: deployment.referenceBlock.number });\n if (!bytecode || bytecode === '0x') mismatch(`contracts.${name}`, 'deployed bytecode', bytecode ?? 'undefined');\n const runtimeCodeHash = keccak256(bytecode);\n if (runtimeCodeHash !== deployment.runtimeCodeHashes[name]) {\n mismatch(`runtimeCodeHashes.${name}`, deployment.runtimeCodeHashes[name], runtimeCodeHash);\n }\n runtimeCodeHashes[name] = runtimeCodeHash;\n }\n\n const blockNumber = deployment.referenceBlock.number;\n const [\n stateViewPoolManagerValue,\n quoterPoolManagerValue,\n positionManagerPoolManagerValue,\n positionManagerPermit2Value,\n positionManagerWrappedNativeValue,\n positionManagerTokenDescriptorValue,\n positionManagerUnsubscribeGasLimit,\n ] = await Promise.all([\n client.readContract({ address: deployment.contracts.stateView, abi: v4StateViewAbi, functionName: 'poolManager', blockNumber }),\n client.readContract({ address: deployment.contracts.quoter, abi: v4QuoterAbi, functionName: 'poolManager', blockNumber }),\n client.readContract({ address: deployment.contracts.positionManager, abi: v4PositionManagerAbi, functionName: 'poolManager', blockNumber }),\n client.readContract({ address: deployment.contracts.positionManager, abi: v4PositionManagerAbi, functionName: 'permit2', blockNumber }),\n client.readContract({ address: deployment.contracts.positionManager, abi: v4PositionManagerAbi, functionName: 'WETH9', blockNumber }),\n client.readContract({ address: deployment.contracts.positionManager, abi: v4PositionManagerAbi, functionName: 'tokenDescriptor', blockNumber }),\n client.readContract({ address: deployment.contracts.positionManager, abi: v4PositionManagerAbi, functionName: 'unsubscribeGasLimit', blockNumber }),\n ]);\n\n const stateViewPoolManager = getAddress(stateViewPoolManagerValue);\n const quoterPoolManager = getAddress(quoterPoolManagerValue);\n const positionManagerPoolManager = getAddress(positionManagerPoolManagerValue);\n const positionManagerPermit2 = getAddress(positionManagerPermit2Value);\n const positionManagerWrappedNative = getAddress(positionManagerWrappedNativeValue);\n const positionManagerTokenDescriptor = getAddress(positionManagerTokenDescriptorValue);\n\n for (const [path, actual] of [\n ['stateView.poolManager', stateViewPoolManager],\n ['quoter.poolManager', quoterPoolManager],\n ['positionManager.poolManager', positionManagerPoolManager],\n ] as const) {\n if (actual !== deployment.contracts.poolManager) mismatch(path, deployment.contracts.poolManager, actual);\n }\n if (positionManagerPermit2 !== deployment.contracts.permit2) {\n mismatch('positionManager.permit2', deployment.contracts.permit2, positionManagerPermit2);\n }\n if (positionManagerWrappedNative !== deployment.positionManagerWiring.wrappedNative) {\n mismatch('positionManager.WETH9', deployment.positionManagerWiring.wrappedNative, positionManagerWrappedNative);\n }\n if (positionManagerTokenDescriptor !== deployment.positionManagerWiring.tokenDescriptor) {\n mismatch('positionManager.tokenDescriptor', deployment.positionManagerWiring.tokenDescriptor, positionManagerTokenDescriptor);\n }\n if (positionManagerUnsubscribeGasLimit !== deployment.positionManagerWiring.unsubscribeGasLimit) {\n mismatch(\n 'positionManager.unsubscribeGasLimit',\n deployment.positionManagerWiring.unsubscribeGasLimit,\n positionManagerUnsubscribeGasLimit,\n );\n }\n\n return {\n chainId,\n blockNumber,\n blockHash: block.hash,\n contractsWithCode: checked,\n runtimeCodeHashes,\n stateViewPoolManager,\n quoterPoolManager,\n positionManagerPoolManager,\n positionManagerPermit2,\n positionManagerWrappedNative,\n positionManagerTokenDescriptor,\n positionManagerUnsubscribeGasLimit,\n };\n });\n}\n\nasync function readAddress(client: PublicClient, address: Address, functionName: 'factory' | 'WETH9'): Promise<Address> {\n const value = await client.readContract({ address, abi: v3PositionManagerAbi, functionName });\n return getAddress(value);\n}\n\nfunction mismatch(path: string, expected: unknown, actual: unknown): never {\n throw new UniswapSdkError('DEPLOYMENT_MISMATCH', `${path} mismatch: expected ${String(expected)}, got ${String(actual)}`, {\n path,\n expected: String(expected),\n actual: String(actual),\n });\n}\n"]}
|
|
1
|
+
{"version":3,"file":"compatibility.js","sourceRoot":"","sources":["../src/compatibility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAA6C,MAAM,MAAM,CAAC;AACxF,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAOrE,OAAO,EAAE,GAAG,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AA0BnD;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,4BAA4B,CAChD,MAAoB,EACpB,UAA+B;IAE/B,OAAO,GAAG,CAAC,KAAK,IAAI,EAAE;QACpB,IAAI,UAAU,CAAC,WAAW,KAAK,eAAe;YAAE,QAAQ,CAAC,wBAAwB,EAAE,eAAe,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC;QAC5H,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,UAAU,EAAE,CAAC;QAC1C,IAAI,OAAO,KAAK,UAAU,CAAC,OAAO;YAAE,QAAQ,CAAC,SAAS,EAAE,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAErF,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAA4B,CAAC;QACnF,MAAM,OAAO,GAAG,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;QACtE,MAAM,iBAAiB,GAAG,EAAwC,CAAC;QACnE,KAAK,MAAM,IAAI,IAAI,aAAa,EAAE,CAAC;YACjC,MAAM,OAAO,GAAG,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YA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;YAC5B,8BAA8B;YAC9B,kCAAkC;SACnC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAED,KAAK,UAAU,WAAW,CAAC,MAAoB,EAAE,OAAgB,EAAE,YAAiC;IAClG,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,oBAAoB,EAAE,YAAY,EAAE,CAAC,CAAC;IAC9F,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC;AAC3B,CAAC;AAED,SAAS,QAAQ,CAAC,IAAY,EAAE,QAAiB,EAAE,MAAe;IAChE,MAAM,IAAI,eAAe,CAAC,qBAAqB,EAAE,GAAG,IAAI,uBAAuB,MAAM,CAAC,QAAQ,CAAC,SAAS,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE;QACxH,IAAI;QACJ,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC;QAC1B,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;KACvB,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { getAddress, keccak256, type Address, type Hex, type PublicClient } from 'viem';\nimport { v4PositionManagerAbi, v4QuoterAbi, v4StateViewAbi } from './abis.js';\nimport { V3_ABI_REVISION, v3PositionManagerAbi } from './v3-abis.js';\nimport type {\n UniswapV4ContractName,\n UniswapV4Deployment,\n UniswapV3ContractName,\n UniswapV3Deployment,\n} from './deployments.js';\nimport { rpc, UniswapSdkError } from './errors.js';\n\nexport interface UniswapV3CompatibilityReport {\n chainId: number;\n abiRevision: string;\n contractsWithCode: readonly Address[];\n runtimeCodeHashes: Readonly<Record<UniswapV3ContractName, Hex>>;\n positionManagerFactory: Address;\n positionManagerWrappedNative: Address;\n}\n\nexport interface UniswapV4CompatibilityReport {\n chainId: number;\n blockNumber: bigint;\n blockHash: Hex;\n contractsWithCode: readonly Address[];\n runtimeCodeHashes: Readonly<Record<UniswapV4ContractName, Hex>>;\n stateViewPoolManager: Address;\n quoterPoolManager: Address;\n positionManagerPoolManager: Address;\n positionManagerPermit2: Address;\n positionManagerWrappedNative: Address;\n positionManagerTokenDescriptor: Address;\n positionManagerUnsubscribeGasLimit: bigint;\n}\n\n/**\n * Checks chain identity, exact runtime code hashes, and position-manager wiring.\n */\nexport async function verifyUniswapV3Compatibility(\n client: PublicClient,\n deployment: UniswapV3Deployment,\n): Promise<UniswapV3CompatibilityReport> {\n return rpc(async () => {\n if (deployment.abiRevision !== V3_ABI_REVISION) mismatch('deployment.abiRevision', V3_ABI_REVISION, deployment.abiRevision);\n const chainId = await client.getChainId();\n if (chainId !== deployment.chainId) mismatch('chainId', deployment.chainId, chainId);\n\n const contractNames = Object.keys(deployment.contracts) as UniswapV3ContractName[];\n const checked = contractNames.map(name => deployment.contracts[name]);\n const runtimeCodeHashes = {} as Record<UniswapV3ContractName, Hex>;\n for (const name of contractNames) {\n const address = deployment.contracts[name];\n const bytecode = await client.getBytecode({ address });\n if (!bytecode || bytecode === '0x') mismatch(`contracts.${address}`, 'deployed bytecode', bytecode ?? 'undefined');\n const runtimeCodeHash = keccak256(bytecode);\n if (runtimeCodeHash !== deployment.runtimeCodeHashes[name]) {\n mismatch(`runtimeCodeHashes.${name}`, deployment.runtimeCodeHashes[name], runtimeCodeHash);\n }\n runtimeCodeHashes[name] = runtimeCodeHash;\n }\n\n const [factory, wrappedNative] = await Promise.all([\n readAddress(client, deployment.contracts.nonfungiblePositionManager, 'factory'),\n readAddress(client, deployment.contracts.nonfungiblePositionManager, 'WETH9'),\n ]);\n if (factory.toLowerCase() !== deployment.contracts.factory.toLowerCase()) mismatch('positionManager.factory', deployment.contracts.factory, factory);\n if (wrappedNative.toLowerCase() !== deployment.contracts.wrappedNative.toLowerCase()) mismatch('positionManager.WETH9', deployment.contracts.wrappedNative, wrappedNative);\n\n return {\n chainId,\n abiRevision: deployment.abiRevision,\n contractsWithCode: checked,\n runtimeCodeHashes,\n positionManagerFactory: factory,\n positionManagerWrappedNative: wrappedNative,\n };\n });\n}\n\n/**\n * Rechecks the exact Arc block, runtime bytecode, and v4 immutable wiring.\n * Retained upstream generated initcode is verified separately by\n * verify-v4-retained-artifacts.mjs; that check is not a fresh source compilation.\n */\nexport async function verifyUniswapV4Compatibility(\n client: PublicClient,\n deployment: UniswapV4Deployment,\n): Promise<UniswapV4CompatibilityReport> {\n return rpc(async () => {\n for (const name of ['poolManager', 'stateView', 'quoter'] as const) {\n if (deployment[name].toLowerCase() !== deployment.contracts[name].toLowerCase()) {\n mismatch(name, deployment.contracts[name], deployment[name]);\n }\n }\n\n const chainId = await client.getChainId();\n if (chainId !== deployment.chainId) mismatch('chainId', deployment.chainId, chainId);\n\n const block = await client.getBlock({ blockNumber: deployment.referenceBlock.number });\n if (block.hash !== deployment.referenceBlock.hash) {\n mismatch('referenceBlock.hash', deployment.referenceBlock.hash, block.hash);\n }\n\n const contractNames = Object.keys(deployment.contracts) as UniswapV4ContractName[];\n const checked = contractNames.map(name => deployment.contracts[name]);\n const runtimeCodeHashes = {} as Record<UniswapV4ContractName, Hex>;\n for (const name of contractNames) {\n const address = deployment.contracts[name];\n const bytecode = await client.getBytecode({ address, blockNumber: deployment.referenceBlock.number });\n if (!bytecode || bytecode === '0x') mismatch(`contracts.${name}`, 'deployed bytecode', bytecode ?? 'undefined');\n const runtimeCodeHash = keccak256(bytecode);\n if (runtimeCodeHash !== deployment.runtimeCodeHashes[name]) {\n mismatch(`runtimeCodeHashes.${name}`, deployment.runtimeCodeHashes[name], runtimeCodeHash);\n }\n runtimeCodeHashes[name] = runtimeCodeHash;\n }\n\n const blockNumber = deployment.referenceBlock.number;\n const [\n stateViewPoolManagerValue,\n quoterPoolManagerValue,\n positionManagerPoolManagerValue,\n positionManagerPermit2Value,\n positionManagerWrappedNativeValue,\n positionManagerTokenDescriptorValue,\n positionManagerUnsubscribeGasLimit,\n ] = await Promise.all([\n client.readContract({ address: deployment.contracts.stateView, abi: v4StateViewAbi, functionName: 'poolManager', blockNumber }),\n client.readContract({ address: deployment.contracts.quoter, abi: v4QuoterAbi, functionName: 'poolManager', blockNumber }),\n client.readContract({ address: deployment.contracts.positionManager, abi: v4PositionManagerAbi, functionName: 'poolManager', blockNumber }),\n client.readContract({ address: deployment.contracts.positionManager, abi: v4PositionManagerAbi, functionName: 'permit2', blockNumber }),\n client.readContract({ address: deployment.contracts.positionManager, abi: v4PositionManagerAbi, functionName: 'WETH9', blockNumber }),\n client.readContract({ address: deployment.contracts.positionManager, abi: v4PositionManagerAbi, functionName: 'tokenDescriptor', blockNumber }),\n client.readContract({ address: deployment.contracts.positionManager, abi: v4PositionManagerAbi, functionName: 'unsubscribeGasLimit', blockNumber }),\n ]);\n\n const stateViewPoolManager = getAddress(stateViewPoolManagerValue);\n const quoterPoolManager = getAddress(quoterPoolManagerValue);\n const positionManagerPoolManager = getAddress(positionManagerPoolManagerValue);\n const positionManagerPermit2 = getAddress(positionManagerPermit2Value);\n const positionManagerWrappedNative = getAddress(positionManagerWrappedNativeValue);\n const positionManagerTokenDescriptor = getAddress(positionManagerTokenDescriptorValue);\n\n for (const [path, actual] of [\n ['stateView.poolManager', stateViewPoolManager],\n ['quoter.poolManager', quoterPoolManager],\n ['positionManager.poolManager', positionManagerPoolManager],\n ] as const) {\n if (actual !== deployment.contracts.poolManager) mismatch(path, deployment.contracts.poolManager, actual);\n }\n if (positionManagerPermit2 !== deployment.contracts.permit2) {\n mismatch('positionManager.permit2', deployment.contracts.permit2, positionManagerPermit2);\n }\n if (positionManagerWrappedNative !== deployment.positionManagerWiring.wrappedNative) {\n mismatch('positionManager.WETH9', deployment.positionManagerWiring.wrappedNative, positionManagerWrappedNative);\n }\n if (positionManagerTokenDescriptor !== deployment.positionManagerWiring.tokenDescriptor) {\n mismatch('positionManager.tokenDescriptor', deployment.positionManagerWiring.tokenDescriptor, positionManagerTokenDescriptor);\n }\n if (positionManagerUnsubscribeGasLimit !== deployment.positionManagerWiring.unsubscribeGasLimit) {\n mismatch(\n 'positionManager.unsubscribeGasLimit',\n deployment.positionManagerWiring.unsubscribeGasLimit,\n positionManagerUnsubscribeGasLimit,\n );\n }\n\n return {\n chainId,\n blockNumber,\n blockHash: block.hash,\n contractsWithCode: checked,\n runtimeCodeHashes,\n stateViewPoolManager,\n quoterPoolManager,\n positionManagerPoolManager,\n positionManagerPermit2,\n positionManagerWrappedNative,\n positionManagerTokenDescriptor,\n positionManagerUnsubscribeGasLimit,\n };\n });\n}\n\nasync function readAddress(client: PublicClient, address: Address, functionName: 'factory' | 'WETH9'): Promise<Address> {\n const value = await client.readContract({ address, abi: v3PositionManagerAbi, functionName });\n return getAddress(value);\n}\n\nfunction mismatch(path: string, expected: unknown, actual: unknown): never {\n throw new UniswapSdkError('DEPLOYMENT_MISMATCH', `${path} mismatch: expected ${String(expected)}, got ${String(actual)}`, {\n path,\n expected: String(expected),\n actual: String(actual),\n });\n}\n"]}
|
package/dist/deployments.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { type Address, type Hex } from 'viem';
|
|
2
2
|
import type { V4Deployment } from './pool.js';
|
|
3
|
-
export type
|
|
3
|
+
export type UniswapV3DeploymentId = 'robinhood-mainnet-v3' | 'robinhood-testnet-v3';
|
|
4
|
+
export type UniswapV3Network = 'robinhood-chain-mainnet' | 'robinhood-chain-testnet';
|
|
5
|
+
export type UniswapV3ChainId = 4_663 | 46_630;
|
|
4
6
|
export interface UniswapV3Contracts {
|
|
5
7
|
factory: Address;
|
|
6
8
|
nonfungiblePositionManager: Address;
|
|
@@ -12,9 +14,9 @@ export interface UniswapV3Contracts {
|
|
|
12
14
|
export type UniswapV3ContractName = keyof UniswapV3Contracts;
|
|
13
15
|
export type UniswapV3RuntimeCodeHashes = Readonly<Record<UniswapV3ContractName, Hex>>;
|
|
14
16
|
export interface UniswapV3Deployment {
|
|
15
|
-
id:
|
|
16
|
-
chainId:
|
|
17
|
-
network:
|
|
17
|
+
id: UniswapV3DeploymentId;
|
|
18
|
+
chainId: UniswapV3ChainId;
|
|
19
|
+
network: UniswapV3Network;
|
|
18
20
|
abiRevision: string;
|
|
19
21
|
provenance: 'official' | 'reviewed-testnet';
|
|
20
22
|
explorerVerification: 'official' | 'partial';
|
|
@@ -22,8 +24,10 @@ export interface UniswapV3Deployment {
|
|
|
22
24
|
contracts: UniswapV3Contracts;
|
|
23
25
|
runtimeCodeHashes: UniswapV3RuntimeCodeHashes;
|
|
24
26
|
}
|
|
25
|
-
export type
|
|
26
|
-
export
|
|
27
|
+
export type UniswapV4DeploymentId = 'arc-mainnet-v4';
|
|
28
|
+
export type UniswapV4Network = 'arc-mainnet';
|
|
29
|
+
export type UniswapV4ChainId = 5_042;
|
|
30
|
+
export interface UniswapV4Contracts {
|
|
27
31
|
poolManager: Address;
|
|
28
32
|
stateView: Address;
|
|
29
33
|
positionManager: Address;
|
|
@@ -31,10 +35,10 @@ export interface ArcUniswapV4Contracts {
|
|
|
31
35
|
universalRouter: Address;
|
|
32
36
|
permit2: Address;
|
|
33
37
|
}
|
|
34
|
-
export type
|
|
35
|
-
export type
|
|
36
|
-
export type
|
|
37
|
-
export interface
|
|
38
|
+
export type UniswapV4ContractName = keyof UniswapV4Contracts;
|
|
39
|
+
export type UniswapV4RuntimeCodeHashes = Readonly<Record<UniswapV4ContractName, Hex>>;
|
|
40
|
+
export type UniswapV4ArtifactBackedContractName = Exclude<UniswapV4ContractName, 'permit2'>;
|
|
41
|
+
export interface UniswapV4RetainedArtifact {
|
|
38
42
|
repository: 'https://github.com/Uniswap/contracts';
|
|
39
43
|
sourceCommit: string;
|
|
40
44
|
sourcePackageCommit: string;
|
|
@@ -45,18 +49,18 @@ export interface ArcUniswapV4RetainedArtifact {
|
|
|
45
49
|
deploymentManifestInputHash: Hex;
|
|
46
50
|
proxy: false;
|
|
47
51
|
}
|
|
48
|
-
export interface
|
|
49
|
-
id:
|
|
50
|
-
chainId:
|
|
51
|
-
network:
|
|
52
|
+
export interface UniswapV4Deployment extends V4Deployment {
|
|
53
|
+
id: UniswapV4DeploymentId;
|
|
54
|
+
chainId: UniswapV4ChainId;
|
|
55
|
+
network: UniswapV4Network;
|
|
52
56
|
reviewedAt: string;
|
|
53
57
|
referenceBlock: Readonly<{
|
|
54
58
|
number: bigint;
|
|
55
59
|
hash: Hex;
|
|
56
60
|
}>;
|
|
57
|
-
contracts: Readonly<
|
|
58
|
-
runtimeCodeHashes:
|
|
59
|
-
retainedArtifacts: Readonly<Record<
|
|
61
|
+
contracts: Readonly<UniswapV4Contracts>;
|
|
62
|
+
runtimeCodeHashes: UniswapV4RuntimeCodeHashes;
|
|
63
|
+
retainedArtifacts: Readonly<Record<UniswapV4ArtifactBackedContractName, UniswapV4RetainedArtifact>>;
|
|
60
64
|
positionManagerWiring: Readonly<{
|
|
61
65
|
wrappedNative: Address;
|
|
62
66
|
tokenDescriptor: Address;
|
|
@@ -72,7 +76,15 @@ export declare const robinhoodUniswapV3Testnet: UniswapV3Deployment;
|
|
|
72
76
|
* This proves only the shared Uniswap contracts. Argus Portal, hook, locker,
|
|
73
77
|
* splitter, and tracker compatibility remains the launcher adapter's gate.
|
|
74
78
|
*/
|
|
75
|
-
export declare const arcUniswapV4Mainnet:
|
|
76
|
-
|
|
77
|
-
export declare
|
|
79
|
+
export declare const arcUniswapV4Mainnet: UniswapV4Deployment;
|
|
80
|
+
/** Every reviewed Uniswap v3 deployment. Addresses are pinned here, not read from upstream. */
|
|
81
|
+
export declare const uniswapV3Deployments: readonly UniswapV3Deployment[];
|
|
82
|
+
/** Every reviewed Uniswap v4 deployment. Addresses are pinned here, not read from upstream. */
|
|
83
|
+
export declare const uniswapV4Deployments: readonly UniswapV4Deployment[];
|
|
84
|
+
export declare function getUniswapV3Deployment(chainId: number): UniswapV3Deployment;
|
|
85
|
+
export declare function getUniswapV4Deployment(chainId: number): UniswapV4Deployment;
|
|
86
|
+
/** The reviewed v3 deployment for a network key, or undefined when the network has none. */
|
|
87
|
+
export declare function findUniswapV3DeploymentForNetwork(network: string): UniswapV3Deployment | undefined;
|
|
88
|
+
/** The reviewed v4 deployment for a network key, or undefined when the network has none. */
|
|
89
|
+
export declare function findUniswapV4DeploymentForNetwork(network: string): UniswapV4Deployment | undefined;
|
|
78
90
|
//# sourceMappingURL=deployments.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployments.d.ts","sourceRoot":"","sources":["../src/deployments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,MAAM,CAAC;AAG1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"deployments.d.ts","sourceRoot":"","sources":["../src/deployments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,MAAM,CAAC;AAG1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C,MAAM,MAAM,qBAAqB,GAAG,sBAAsB,GAAG,sBAAsB,CAAC;AACpF,MAAM,MAAM,gBAAgB,GAAG,yBAAyB,GAAG,yBAAyB,CAAC;AACrF,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,MAAM,CAAC;AAE9C,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,0BAA0B,EAAE,OAAO,CAAC;IACpC,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,MAAM,qBAAqB,GAAG,MAAM,kBAAkB,CAAC;AAC7D,MAAM,MAAM,0BAA0B,GAAG,QAAQ,CAAC,MAAM,CAAC,qBAAqB,EAAE,GAAG,CAAC,CAAC,CAAC;AAEtF,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,qBAAqB,CAAC;IAC1B,OAAO,EAAE,gBAAgB,CAAC;IAC1B,OAAO,EAAE,gBAAgB,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 export const arcUniswapV4Mainnet = deepFreeze({
|
|
|
159
159
|
'The retained v4 Quoter is official infrastructure; hook-aware Argus execution must simulate the exact router call and sender rather than assuming Quoter equivalence.',
|
|
160
160
|
],
|
|
161
161
|
});
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
162
|
+
/** Every reviewed Uniswap v3 deployment. Addresses are pinned here, not read from upstream. */
|
|
163
|
+
export const uniswapV3Deployments = Object.freeze([
|
|
164
|
+
robinhoodUniswapV3Mainnet,
|
|
165
|
+
robinhoodUniswapV3Testnet,
|
|
166
|
+
]);
|
|
167
|
+
/** Every reviewed Uniswap v4 deployment. Addresses are pinned here, not read from upstream. */
|
|
168
|
+
export const uniswapV4Deployments = Object.freeze([arcUniswapV4Mainnet]);
|
|
169
|
+
export function getUniswapV3Deployment(chainId) {
|
|
170
|
+
const deployment = uniswapV3Deployments.find(candidate => candidate.chainId === chainId);
|
|
171
|
+
if (!deployment)
|
|
172
|
+
throw new UniswapSdkError('CHAIN_MISMATCH', `No reviewed Uniswap v3 deployment for chain ID ${chainId}`);
|
|
173
|
+
return deployment;
|
|
168
174
|
}
|
|
169
|
-
export function
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
175
|
+
export function getUniswapV4Deployment(chainId) {
|
|
176
|
+
const deployment = uniswapV4Deployments.find(candidate => candidate.chainId === chainId);
|
|
177
|
+
if (!deployment)
|
|
178
|
+
throw new UniswapSdkError('CHAIN_MISMATCH', `No reviewed Uniswap v4 deployment for chain ID ${chainId}`);
|
|
179
|
+
return deployment;
|
|
180
|
+
}
|
|
181
|
+
/** The reviewed v3 deployment for a network key, or undefined when the network has none. */
|
|
182
|
+
export function findUniswapV3DeploymentForNetwork(network) {
|
|
183
|
+
return uniswapV3Deployments.find(candidate => candidate.network === network);
|
|
184
|
+
}
|
|
185
|
+
/** The reviewed v4 deployment for a network key, or undefined when the network has none. */
|
|
186
|
+
export function findUniswapV4DeploymentForNetwork(network) {
|
|
187
|
+
return uniswapV4Deployments.find(candidate => candidate.network === network);
|
|
173
188
|
}
|
|
174
189
|
function deepFreeze(value) {
|
|
175
190
|
if (value !== null && typeof value === 'object' && !Object.isFrozen(value)) {
|
package/dist/deployments.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployments.js","sourceRoot":"","sources":["../src/deployments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA0B,MAAM,MAAM,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAyE9C,MAAM,UAAU,GAAG,UAAU,CAAC,4CAA4C,CAAC,CAAC;AAE5E,MAAM,CAAC,MAAM,yBAAyB,GAAwB,UAAU,CAAC;IACvE,EAAE,EAAE,sBAAsB;IAC1B,OAAO,EAAE,KAAK;IACd,OAAO,EAAE,yBAAyB;IAClC,WAAW,EAAE,eAAe;IAC5B,UAAU,EAAE,UAAU;IACtB,oBAAoB,EAAE,UAAU;IAChC,UAAU,EAAE,YAAY;IACxB,SAAS,EAAE;QACT,OAAO,EAAE,UAAU,CAAC,4CAA4C,CAAC;QACjE,0BAA0B,EAAE,UAAU,CAAC,4CAA4C,CAAC;QACpF,QAAQ,EAAE,UAAU,CAAC,4CAA4C,CAAC;QAClE,YAAY,EAAE,UAAU,CAAC,4CAA4C,CAAC;QACtE,aAAa,EAAE,UAAU,CAAC,4CAA4C,CAAC;QACvE,UAAU;KACX;IACD,iBAAiB,EAAE;QACjB,OAAO,EAAE,oEAAoE;QAC7E,0BAA0B,EAAE,oEAAoE;QAChG,QAAQ,EAAE,oEAAoE;QAC9E,YAAY,EAAE,oEAAoE;QAClF,aAAa,EAAE,oEAAoE;QACnF,UAAU,EAAE,oEAAoE;KACjF;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,yBAAyB,GAAwB,UAAU,CAAC;IACvE,EA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B,EAAE,uCAAuC,OAAO,EAAE,CAAC,CAAC;AAChG,CAAC;AAED,SAAS,UAAU,CAAI,KAAQ;IAC7B,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QAC3E,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC,KAAgC,CAAC;YAAE,UAAU,CAAC,KAAK,CAAC,CAAC;QACvF,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import { getAddress, type Address, type Hex } from 'viem';\nimport { V3_ABI_REVISION } from './v3-abis.js';\nimport { UniswapSdkError } from './errors.js';\nimport type { V4Deployment } from './pool.js';\n\nexport type RobinhoodUniswapV3DeploymentId = 'robinhood-mainnet-v3' | 'robinhood-testnet-v3';\n\nexport interface UniswapV3Contracts {\n factory: Address;\n nonfungiblePositionManager: Address;\n quoterV2: Address;\n swapRouter02: Address;\n wrappedNative: Address;\n multicall3: Address;\n}\n\nexport type UniswapV3ContractName = keyof UniswapV3Contracts;\nexport type UniswapV3RuntimeCodeHashes = Readonly<Record<UniswapV3ContractName, Hex>>;\n\nexport interface UniswapV3Deployment {\n id: RobinhoodUniswapV3DeploymentId;\n chainId: number;\n network: 'robinhood-chain-mainnet' | 'robinhood-chain-testnet';\n abiRevision: string;\n provenance: 'official' | 'reviewed-testnet';\n explorerVerification: 'official' | 'partial';\n reviewedAt: string;\n contracts: UniswapV3Contracts;\n runtimeCodeHashes: UniswapV3RuntimeCodeHashes;\n}\n\nexport type ArcUniswapV4DeploymentId = 'arc-mainnet-v4';\n\nexport interface ArcUniswapV4Contracts {\n poolManager: Address;\n stateView: Address;\n positionManager: Address;\n quoter: Address;\n universalRouter: Address;\n permit2: Address;\n}\n\nexport type ArcUniswapV4ContractName = keyof ArcUniswapV4Contracts;\nexport type ArcUniswapV4RuntimeCodeHashes = Readonly<Record<ArcUniswapV4ContractName, Hex>>;\nexport type ArcUniswapV4ArtifactBackedContractName = Exclude<ArcUniswapV4ContractName, 'permit2'>;\n\nexport interface ArcUniswapV4RetainedArtifact {\n repository: 'https://github.com/Uniswap/contracts';\n sourceCommit: string;\n sourcePackageCommit: string;\n deployerArtifactPath: string;\n sourceContractPath: string;\n deploymentTransaction: Hex;\n generatedInitcodeHash: Hex;\n deploymentManifestInputHash: Hex;\n proxy: false;\n}\n\nexport interface ArcUniswapV4Deployment extends V4Deployment {\n id: ArcUniswapV4DeploymentId;\n chainId: 5_042;\n network: 'arc-mainnet';\n reviewedAt: string;\n referenceBlock: Readonly<{ number: bigint; hash: Hex }>;\n contracts: Readonly<ArcUniswapV4Contracts>;\n runtimeCodeHashes: ArcUniswapV4RuntimeCodeHashes;\n retainedArtifacts: Readonly<Record<ArcUniswapV4ArtifactBackedContractName, ArcUniswapV4RetainedArtifact>>;\n positionManagerWiring: Readonly<{\n wrappedNative: Address;\n tokenDescriptor: Address;\n unsubscribeGasLimit: bigint;\n }>;\n limitations: readonly string[];\n}\n\nconst multicall3 = getAddress('0xca11bde05977b3631167028862be2a173976ca11');\n\nexport const robinhoodUniswapV3Mainnet: UniswapV3Deployment = deepFreeze({\n id: 'robinhood-mainnet-v3',\n chainId: 4_663,\n network: 'robinhood-chain-mainnet',\n abiRevision: V3_ABI_REVISION,\n provenance: 'official',\n explorerVerification: 'official',\n reviewedAt: '2026-09-11',\n contracts: {\n factory: getAddress('0x1f7d7550B1b028f7571E69A784071F0205FD2EfA'),\n nonfungiblePositionManager: getAddress('0x73991a25C818Bf1f1128dEAaB1492D45638DE0D3'),\n quoterV2: getAddress('0x33e885ed0ec9bf04ecfb19341582aadcb4c8a9e7'),\n swapRouter02: getAddress('0xcaf681a66d020601342297493863e78c959e5cb2'),\n wrappedNative: getAddress('0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73'),\n multicall3,\n },\n runtimeCodeHashes: {\n factory: '0xec72b1abd1f2faee020cfea9c646bd8994f9fb389054f6e574f103a895091739',\n nonfungiblePositionManager: '0x0a493d1af3d0f25fed8efa205244ebee14114267a08647fc38c515c7cd6ead4f',\n quoterV2: '0x3db0868d945e9304c9bc6a8b2181948109ea617647142f3c4083e14393496a28',\n swapRouter02: '0x6f36c378e272c6324c48f045182bcb54bd8ad654cf9ebd42e8893d52c4cb25dc',\n wrappedNative: '0x5706be52f64875fee65a2cec0d80e47a23d8793cbe85d214b48445e2d05f5353',\n multicall3: '0xd5c15df687b16f2ff992fc8d767b4216323184a2bbc6ee2f9c398c318e770891',\n },\n});\n\nexport const robinhoodUniswapV3Testnet: UniswapV3Deployment = deepFreeze({\n id: 'robinhood-testnet-v3',\n chainId: 46_630,\n network: 'robinhood-chain-testnet',\n abiRevision: V3_ABI_REVISION,\n provenance: 'reviewed-testnet',\n explorerVerification: 'partial',\n reviewedAt: '2026-09-11',\n contracts: {\n factory: getAddress('0xdf9e3D6ffaC4513dD7b053212bbECcbCD15ec932'),\n nonfungiblePositionManager: getAddress('0xFFe6CFc4f759b65f9B62c9D05A9E21a78cE93e12'),\n quoterV2: getAddress('0xDDcBe4989C8171F721c5e683C9C6339B59718213'),\n swapRouter02: getAddress('0xb79cB26e90EBBD9bC02c75267c9a86dBa1AFedB7'),\n wrappedNative: getAddress('0x7943e237c7F95DA44E0301572D358911207852Fa'),\n multicall3,\n },\n runtimeCodeHashes: {\n factory: '0x75c5bbc7989daa85188d9e4c9f989271d8bcb2abad3d47e6e47d3c0c5bff02c2',\n nonfungiblePositionManager: '0xe40cd590528ac8b67b428579035fe391e502c38271623777692c50834688e9d5',\n quoterV2: '0x724c4956e1c61fd13285a92685337df60254bc67f775e7268da2fc5cc79d5343',\n swapRouter02: '0xdce781dc17d5f98e3ea0b72d88639a5995ccbba6e11bc01f2057a9409dc8c724',\n wrappedNative: '0x5706be52f64875fee65a2cec0d80e47a23d8793cbe85d214b48445e2d05f5353',\n multicall3: '0xd5c15df687b16f2ff992fc8d767b4216323184a2bbc6ee2f9c398c318e770891',\n },\n});\n\nconst uniswapContractsRepository = 'https://github.com/Uniswap/contracts' as const;\nconst arcV4SourceCommit = '534603a5bc10d41d57a1c9c34417d472f0dbc0d3';\nconst arcUniversalRouterSourceCommit = '02fd1760fa7c05096833c03e01a4143f963c350e';\nconst arcV4Contracts: ArcUniswapV4Contracts = {\n poolManager: getAddress('0x8366a39CC670B4001A1121B8F6A443A643e40951'),\n stateView: getAddress('0xF3334192D15450CdD385c8B70e03f9A6bD9E673b'),\n positionManager: getAddress('0x6049c9a0e26405C0985f9E3685C87d0aE917f82B'),\n quoter: getAddress('0x8dc178efb8111bb0973dd9d722ebeff267c98f94'),\n universalRouter: getAddress('0x4fcA4a51Ab4F23A7447b3284fBd7D73289A89Fb1'),\n permit2: getAddress('0x000000000022D473030F116dDEE9F6B43aC78BA3'),\n};\n\n/**\n * Official Uniswap v4 infrastructure used by the reviewed Argus Arc flow.\n *\n * This proves only the shared Uniswap contracts. Argus Portal, hook, locker,\n * splitter, and tracker compatibility remains the launcher adapter's gate.\n */\nexport const arcUniswapV4Mainnet: ArcUniswapV4Deployment = deepFreeze({\n id: 'arc-mainnet-v4',\n chainId: 5_042,\n network: 'arc-mainnet',\n poolManager: arcV4Contracts.poolManager,\n stateView: arcV4Contracts.stateView,\n quoter: arcV4Contracts.quoter,\n reviewedAt: '2026-09-27',\n referenceBlock: {\n number: 20_889_496n,\n hash: '0xf3fd31df5afb9d37a216dda53ac751a6a6c08a9c7e96ce4c07fb0df18d40810b',\n },\n contracts: arcV4Contracts,\n runtimeCodeHashes: {\n poolManager: '0xbd3881180b547f5fe817545743cfb4343e96b1bc6640dcd70c106b0066e95626',\n stateView: '0x7d9c591e0956fd89d98feb4ffcfe8bf1f7a62bd485edd979fa21d104b49878a6',\n positionManager: '0x5904204586f0290499c357cfcb99489cdc13740b3cd3f26c735f7ef7f2cff1c5',\n quoter: '0xd707b1da8cb165e5ea35a3b4450d971eb562ec171e23492aa117036b78a868f6',\n universalRouter: '0x7f949fe75d3483670e17a9ab398a3dc71f285026bba755b48fffd1e42aefad71',\n permit2: '0x05a793d6bdba8b8715c8f4cef0725ec3a961f567d33ebb2d360f541f19f70c8f',\n },\n retainedArtifacts: {\n poolManager: {\n repository: uniswapContractsRepository,\n sourceCommit: arcV4SourceCommit,\n sourcePackageCommit: '46c6834698c48bc4a463a86d8420f4eb1d7f3b75',\n deployerArtifactPath: 'src/briefcase/deployers/v4-core/PoolManagerDeployer.sol',\n sourceContractPath: 'src/pkgs/v4-core/src/PoolManager.sol',\n deploymentTransaction: '0x2a3f2686d0dfc0e8bea88ec2dd006d0cb788410a5d24a946c8d638a32868341e',\n generatedInitcodeHash: '0x1debe8d2bf707a0cea57ce3cdf7b399d61515897a5698b37050d2d5df0a95b2c',\n deploymentManifestInputHash: '0x3bdcc016bd6b2f8a19e20bdfa136abbf66ffa7904f42dafa1f5c399e9758544c',\n proxy: false,\n },\n stateView: {\n repository: uniswapContractsRepository,\n sourceCommit: arcV4SourceCommit,\n sourcePackageCommit: '9dafaaecc1e2e1e824eda9d941085f96517d827b',\n deployerArtifactPath: 'src/briefcase/deployers/v4-periphery/StateViewDeployer.sol',\n sourceContractPath: 'src/pkgs/v4-periphery/src/lens/StateView.sol',\n deploymentTransaction: '0xc98e1282cf14d5e63f1f8040403d476b92a5dca03bc838ba0b28bf9cfd42bd2f',\n generatedInitcodeHash: '0xd1a3b7780b831fbddf3407643b70cd7fc1af1140b0e41ad5f10ff74aac004a82',\n deploymentManifestInputHash: '0x0e2e13349f8e16c9ea97b0167f2747efd891690c087723e0a920356d274593d3',\n proxy: false,\n },\n positionManager: {\n repository: uniswapContractsRepository,\n sourceCommit: arcV4SourceCommit,\n sourcePackageCommit: '9dafaaecc1e2e1e824eda9d941085f96517d827b',\n deployerArtifactPath: 'src/briefcase/deployers/v4-periphery/PositionManagerDeployer.sol',\n sourceContractPath: 'src/pkgs/v4-periphery/src/PositionManager.sol',\n deploymentTransaction: '0xf3abd73072ecc78cbaa6b23de7c2fb56e69edce1dddefa069155198295b2abd2',\n generatedInitcodeHash: '0x991742c2de2496144a6f8dce18252393a7d50116b8a3ab320100061d8b6dcca6',\n deploymentManifestInputHash: '0xb86b0eed6fd57117c2096f57f07f3e2b4644f2c379e1604cab08790aaa9c40bd',\n proxy: false,\n },\n quoter: {\n repository: uniswapContractsRepository,\n sourceCommit: arcV4SourceCommit,\n sourcePackageCommit: '9dafaaecc1e2e1e824eda9d941085f96517d827b',\n deployerArtifactPath: 'src/briefcase/deployers/v4-periphery/V4QuoterDeployer.sol',\n sourceContractPath: 'src/pkgs/v4-periphery/src/lens/V4Quoter.sol',\n deploymentTransaction: '0xb8d7a967c1be562fc9de8f5284a110e631f0fea17eef552852fec6ef67e4844a',\n generatedInitcodeHash: '0xd915642b6f3b5375c0096fd70eb15cc0676651fa7d588accd1c6002936bb19c2',\n deploymentManifestInputHash: '0xdb731ce141d9e731a17e60e47d1c0582c9c8684bf76430794d47d1d71fac6260',\n proxy: false,\n },\n universalRouter: {\n repository: uniswapContractsRepository,\n sourceCommit: arcUniversalRouterSourceCommit,\n sourcePackageCommit: '999d561c3ad58fb5cab91b602911f3c75591a9c7',\n deployerArtifactPath: 'src/briefcase/deployers/universal-router/UniversalRouterDeployer.sol',\n sourceContractPath: 'src/pkgs/universal-router/contracts/UniversalRouter.sol',\n deploymentTransaction: '0xf07bb4c6eaccb5b7e128625b0c4fc6bc79f727f9b647a6e81a886bde905345b8',\n generatedInitcodeHash: '0x8f564cfb262952d7d24e1750426672ccf3a72ca9268e2ec6d97cf846eaae179c',\n deploymentManifestInputHash: '0xe388b0b5ed9c81077f8fcd9a1724fb35b2c5792380dddd3a19fd02f5bc037f77',\n proxy: false,\n },\n },\n positionManagerWiring: {\n wrappedNative: getAddress('0x8bcEaA40B9AcdfAedF85AdF4FF01F5Ad6517937f'),\n tokenDescriptor: getAddress('0x516b8a945700D6bBfDeDaa6dcFc4586bA60B8707'),\n unsubscribeGasLimit: 300_000n,\n },\n limitations: [\n 'The retained upstream generated initcode and pinned Arc runtime are verified separately because constructor immutables change deployed runtime bytes; this is not a fresh source compilation.',\n 'The canonical Permit2 predeploy has an exact runtime pin but is not claimed as an Arc deployment produced by the retained Uniswap/contracts manifest.',\n 'Argus Portal, hook, locker, splitter, tracker, fee, custody, and locked-principal semantics are not established by this shared deployment.',\n 'The retained v4 Quoter is official infrastructure; hook-aware Argus execution must simulate the exact router call and sender rather than assuming Quoter equivalence.',\n ],\n});\n\nexport function getRobinhoodUniswapV3Deployment(chainId: number): UniswapV3Deployment {\n if (chainId === robinhoodUniswapV3Mainnet.chainId) return robinhoodUniswapV3Mainnet;\n if (chainId === robinhoodUniswapV3Testnet.chainId) return robinhoodUniswapV3Testnet;\n throw new UniswapSdkError('CHAIN_MISMATCH', `Unsupported Robinhood Uniswap v3 chain ID ${chainId}`);\n}\n\nexport function getArcUniswapV4Deployment(chainId: number): ArcUniswapV4Deployment {\n if (chainId === arcUniswapV4Mainnet.chainId) return arcUniswapV4Mainnet;\n throw new UniswapSdkError('CHAIN_MISMATCH', `Unsupported Arc Uniswap v4 chain ID ${chainId}`);\n}\n\nfunction deepFreeze<T>(value: T): T {\n if (value !== null && typeof value === 'object' && !Object.isFrozen(value)) {\n for (const child of Object.values(value as Record<string, unknown>)) deepFreeze(child);\n Object.freeze(value);\n }\n return value;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"deployments.js","sourceRoot":"","sources":["../src/deployments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA0B,MAAM,MAAM,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AA6E9C,MAAM,UAAU,GAAG,UAAU,CAAC,4CAA4C,CAAC,CAAC;AAE5E,MAAM,CAAC,MAAM,yBAAyB,GAAwB,UAAU,CAAC;IACvE,EAAE,EAAE,sBAAsB;IAC1B,OA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AAC;AAC/E,CAAC;AAED,4FAA4F;AAC5F,MAAM,UAAU,iCAAiC,CAAC,OAAe;IAC/D,OAAO,oBAAoB,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,OAAO,KAAK,OAAO,CAAC,CAAC;AAC/E,CAAC;AAED,SAAS,UAAU,CAAI,KAAQ;IAC7B,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QAC3E,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC,KAAgC,CAAC;YAAE,UAAU,CAAC,KAAK,CAAC,CAAC;QACvF,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import { getAddress, type Address, type Hex } from 'viem';\nimport { V3_ABI_REVISION } from './v3-abis.js';\nimport { UniswapSdkError } from './errors.js';\nimport type { V4Deployment } from './pool.js';\n\nexport type UniswapV3DeploymentId = 'robinhood-mainnet-v3' | 'robinhood-testnet-v3';\nexport type UniswapV3Network = 'robinhood-chain-mainnet' | 'robinhood-chain-testnet';\nexport type UniswapV3ChainId = 4_663 | 46_630;\n\nexport interface UniswapV3Contracts {\n factory: Address;\n nonfungiblePositionManager: Address;\n quoterV2: Address;\n swapRouter02: Address;\n wrappedNative: Address;\n multicall3: Address;\n}\n\nexport type UniswapV3ContractName = keyof UniswapV3Contracts;\nexport type UniswapV3RuntimeCodeHashes = Readonly<Record<UniswapV3ContractName, Hex>>;\n\nexport interface UniswapV3Deployment {\n id: UniswapV3DeploymentId;\n chainId: UniswapV3ChainId;\n network: UniswapV3Network;\n abiRevision: string;\n provenance: 'official' | 'reviewed-testnet';\n explorerVerification: 'official' | 'partial';\n reviewedAt: string;\n contracts: UniswapV3Contracts;\n runtimeCodeHashes: UniswapV3RuntimeCodeHashes;\n}\n\nexport type UniswapV4DeploymentId = 'arc-mainnet-v4';\nexport type UniswapV4Network = 'arc-mainnet';\nexport type UniswapV4ChainId = 5_042;\n\nexport interface UniswapV4Contracts {\n poolManager: Address;\n stateView: Address;\n positionManager: Address;\n quoter: Address;\n universalRouter: Address;\n permit2: Address;\n}\n\nexport type UniswapV4ContractName = keyof UniswapV4Contracts;\nexport type UniswapV4RuntimeCodeHashes = Readonly<Record<UniswapV4ContractName, Hex>>;\nexport type UniswapV4ArtifactBackedContractName = Exclude<UniswapV4ContractName, 'permit2'>;\n\nexport interface UniswapV4RetainedArtifact {\n repository: 'https://github.com/Uniswap/contracts';\n sourceCommit: string;\n sourcePackageCommit: string;\n deployerArtifactPath: string;\n sourceContractPath: string;\n deploymentTransaction: Hex;\n generatedInitcodeHash: Hex;\n deploymentManifestInputHash: Hex;\n proxy: false;\n}\n\nexport interface UniswapV4Deployment extends V4Deployment {\n id: UniswapV4DeploymentId;\n chainId: UniswapV4ChainId;\n network: UniswapV4Network;\n reviewedAt: string;\n referenceBlock: Readonly<{ number: bigint; hash: Hex }>;\n contracts: Readonly<UniswapV4Contracts>;\n runtimeCodeHashes: UniswapV4RuntimeCodeHashes;\n retainedArtifacts: Readonly<Record<UniswapV4ArtifactBackedContractName, UniswapV4RetainedArtifact>>;\n positionManagerWiring: Readonly<{\n wrappedNative: Address;\n tokenDescriptor: Address;\n unsubscribeGasLimit: bigint;\n }>;\n limitations: readonly string[];\n}\n\nconst multicall3 = getAddress('0xca11bde05977b3631167028862be2a173976ca11');\n\nexport const robinhoodUniswapV3Mainnet: UniswapV3Deployment = deepFreeze({\n id: 'robinhood-mainnet-v3',\n chainId: 4_663,\n network: 'robinhood-chain-mainnet',\n abiRevision: V3_ABI_REVISION,\n provenance: 'official',\n explorerVerification: 'official',\n reviewedAt: '2026-09-11',\n contracts: {\n factory: getAddress('0x1f7d7550B1b028f7571E69A784071F0205FD2EfA'),\n nonfungiblePositionManager: getAddress('0x73991a25C818Bf1f1128dEAaB1492D45638DE0D3'),\n quoterV2: getAddress('0x33e885ed0ec9bf04ecfb19341582aadcb4c8a9e7'),\n swapRouter02: getAddress('0xcaf681a66d020601342297493863e78c959e5cb2'),\n wrappedNative: getAddress('0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73'),\n multicall3,\n },\n runtimeCodeHashes: {\n factory: '0xec72b1abd1f2faee020cfea9c646bd8994f9fb389054f6e574f103a895091739',\n nonfungiblePositionManager: '0x0a493d1af3d0f25fed8efa205244ebee14114267a08647fc38c515c7cd6ead4f',\n quoterV2: '0x3db0868d945e9304c9bc6a8b2181948109ea617647142f3c4083e14393496a28',\n swapRouter02: '0x6f36c378e272c6324c48f045182bcb54bd8ad654cf9ebd42e8893d52c4cb25dc',\n wrappedNative: '0x5706be52f64875fee65a2cec0d80e47a23d8793cbe85d214b48445e2d05f5353',\n multicall3: '0xd5c15df687b16f2ff992fc8d767b4216323184a2bbc6ee2f9c398c318e770891',\n },\n});\n\nexport const robinhoodUniswapV3Testnet: UniswapV3Deployment = deepFreeze({\n id: 'robinhood-testnet-v3',\n chainId: 46_630,\n network: 'robinhood-chain-testnet',\n abiRevision: V3_ABI_REVISION,\n provenance: 'reviewed-testnet',\n explorerVerification: 'partial',\n reviewedAt: '2026-09-11',\n contracts: {\n factory: getAddress('0xdf9e3D6ffaC4513dD7b053212bbECcbCD15ec932'),\n nonfungiblePositionManager: getAddress('0xFFe6CFc4f759b65f9B62c9D05A9E21a78cE93e12'),\n quoterV2: getAddress('0xDDcBe4989C8171F721c5e683C9C6339B59718213'),\n swapRouter02: getAddress('0xb79cB26e90EBBD9bC02c75267c9a86dBa1AFedB7'),\n wrappedNative: getAddress('0x7943e237c7F95DA44E0301572D358911207852Fa'),\n multicall3,\n },\n runtimeCodeHashes: {\n factory: '0x75c5bbc7989daa85188d9e4c9f989271d8bcb2abad3d47e6e47d3c0c5bff02c2',\n nonfungiblePositionManager: '0xe40cd590528ac8b67b428579035fe391e502c38271623777692c50834688e9d5',\n quoterV2: '0x724c4956e1c61fd13285a92685337df60254bc67f775e7268da2fc5cc79d5343',\n swapRouter02: '0xdce781dc17d5f98e3ea0b72d88639a5995ccbba6e11bc01f2057a9409dc8c724',\n wrappedNative: '0x5706be52f64875fee65a2cec0d80e47a23d8793cbe85d214b48445e2d05f5353',\n multicall3: '0xd5c15df687b16f2ff992fc8d767b4216323184a2bbc6ee2f9c398c318e770891',\n },\n});\n\nconst uniswapContractsRepository = 'https://github.com/Uniswap/contracts' as const;\nconst arcV4SourceCommit = '534603a5bc10d41d57a1c9c34417d472f0dbc0d3';\nconst arcUniversalRouterSourceCommit = '02fd1760fa7c05096833c03e01a4143f963c350e';\nconst arcV4Contracts: UniswapV4Contracts = {\n poolManager: getAddress('0x8366a39CC670B4001A1121B8F6A443A643e40951'),\n stateView: getAddress('0xF3334192D15450CdD385c8B70e03f9A6bD9E673b'),\n positionManager: getAddress('0x6049c9a0e26405C0985f9E3685C87d0aE917f82B'),\n quoter: getAddress('0x8dc178efb8111bb0973dd9d722ebeff267c98f94'),\n universalRouter: getAddress('0x4fcA4a51Ab4F23A7447b3284fBd7D73289A89Fb1'),\n permit2: getAddress('0x000000000022D473030F116dDEE9F6B43aC78BA3'),\n};\n\n/**\n * Official Uniswap v4 infrastructure used by the reviewed Argus Arc flow.\n *\n * This proves only the shared Uniswap contracts. Argus Portal, hook, locker,\n * splitter, and tracker compatibility remains the launcher adapter's gate.\n */\nexport const arcUniswapV4Mainnet: UniswapV4Deployment = deepFreeze({\n id: 'arc-mainnet-v4',\n chainId: 5_042,\n network: 'arc-mainnet',\n poolManager: arcV4Contracts.poolManager,\n stateView: arcV4Contracts.stateView,\n quoter: arcV4Contracts.quoter,\n reviewedAt: '2026-09-27',\n referenceBlock: {\n number: 20_889_496n,\n hash: '0xf3fd31df5afb9d37a216dda53ac751a6a6c08a9c7e96ce4c07fb0df18d40810b',\n },\n contracts: arcV4Contracts,\n runtimeCodeHashes: {\n poolManager: '0xbd3881180b547f5fe817545743cfb4343e96b1bc6640dcd70c106b0066e95626',\n stateView: '0x7d9c591e0956fd89d98feb4ffcfe8bf1f7a62bd485edd979fa21d104b49878a6',\n positionManager: '0x5904204586f0290499c357cfcb99489cdc13740b3cd3f26c735f7ef7f2cff1c5',\n quoter: '0xd707b1da8cb165e5ea35a3b4450d971eb562ec171e23492aa117036b78a868f6',\n universalRouter: '0x7f949fe75d3483670e17a9ab398a3dc71f285026bba755b48fffd1e42aefad71',\n permit2: '0x05a793d6bdba8b8715c8f4cef0725ec3a961f567d33ebb2d360f541f19f70c8f',\n },\n retainedArtifacts: {\n poolManager: {\n repository: uniswapContractsRepository,\n sourceCommit: arcV4SourceCommit,\n sourcePackageCommit: '46c6834698c48bc4a463a86d8420f4eb1d7f3b75',\n deployerArtifactPath: 'src/briefcase/deployers/v4-core/PoolManagerDeployer.sol',\n sourceContractPath: 'src/pkgs/v4-core/src/PoolManager.sol',\n deploymentTransaction: '0x2a3f2686d0dfc0e8bea88ec2dd006d0cb788410a5d24a946c8d638a32868341e',\n generatedInitcodeHash: '0x1debe8d2bf707a0cea57ce3cdf7b399d61515897a5698b37050d2d5df0a95b2c',\n deploymentManifestInputHash: '0x3bdcc016bd6b2f8a19e20bdfa136abbf66ffa7904f42dafa1f5c399e9758544c',\n proxy: false,\n },\n stateView: {\n repository: uniswapContractsRepository,\n sourceCommit: arcV4SourceCommit,\n sourcePackageCommit: '9dafaaecc1e2e1e824eda9d941085f96517d827b',\n deployerArtifactPath: 'src/briefcase/deployers/v4-periphery/StateViewDeployer.sol',\n sourceContractPath: 'src/pkgs/v4-periphery/src/lens/StateView.sol',\n deploymentTransaction: '0xc98e1282cf14d5e63f1f8040403d476b92a5dca03bc838ba0b28bf9cfd42bd2f',\n generatedInitcodeHash: '0xd1a3b7780b831fbddf3407643b70cd7fc1af1140b0e41ad5f10ff74aac004a82',\n deploymentManifestInputHash: '0x0e2e13349f8e16c9ea97b0167f2747efd891690c087723e0a920356d274593d3',\n proxy: false,\n },\n positionManager: {\n repository: uniswapContractsRepository,\n sourceCommit: arcV4SourceCommit,\n sourcePackageCommit: '9dafaaecc1e2e1e824eda9d941085f96517d827b',\n deployerArtifactPath: 'src/briefcase/deployers/v4-periphery/PositionManagerDeployer.sol',\n sourceContractPath: 'src/pkgs/v4-periphery/src/PositionManager.sol',\n deploymentTransaction: '0xf3abd73072ecc78cbaa6b23de7c2fb56e69edce1dddefa069155198295b2abd2',\n generatedInitcodeHash: '0x991742c2de2496144a6f8dce18252393a7d50116b8a3ab320100061d8b6dcca6',\n deploymentManifestInputHash: '0xb86b0eed6fd57117c2096f57f07f3e2b4644f2c379e1604cab08790aaa9c40bd',\n proxy: false,\n },\n quoter: {\n repository: uniswapContractsRepository,\n sourceCommit: arcV4SourceCommit,\n sourcePackageCommit: '9dafaaecc1e2e1e824eda9d941085f96517d827b',\n deployerArtifactPath: 'src/briefcase/deployers/v4-periphery/V4QuoterDeployer.sol',\n sourceContractPath: 'src/pkgs/v4-periphery/src/lens/V4Quoter.sol',\n deploymentTransaction: '0xb8d7a967c1be562fc9de8f5284a110e631f0fea17eef552852fec6ef67e4844a',\n generatedInitcodeHash: '0xd915642b6f3b5375c0096fd70eb15cc0676651fa7d588accd1c6002936bb19c2',\n deploymentManifestInputHash: '0xdb731ce141d9e731a17e60e47d1c0582c9c8684bf76430794d47d1d71fac6260',\n proxy: false,\n },\n universalRouter: {\n repository: uniswapContractsRepository,\n sourceCommit: arcUniversalRouterSourceCommit,\n sourcePackageCommit: '999d561c3ad58fb5cab91b602911f3c75591a9c7',\n deployerArtifactPath: 'src/briefcase/deployers/universal-router/UniversalRouterDeployer.sol',\n sourceContractPath: 'src/pkgs/universal-router/contracts/UniversalRouter.sol',\n deploymentTransaction: '0xf07bb4c6eaccb5b7e128625b0c4fc6bc79f727f9b647a6e81a886bde905345b8',\n generatedInitcodeHash: '0x8f564cfb262952d7d24e1750426672ccf3a72ca9268e2ec6d97cf846eaae179c',\n deploymentManifestInputHash: '0xe388b0b5ed9c81077f8fcd9a1724fb35b2c5792380dddd3a19fd02f5bc037f77',\n proxy: false,\n },\n },\n positionManagerWiring: {\n wrappedNative: getAddress('0x8bcEaA40B9AcdfAedF85AdF4FF01F5Ad6517937f'),\n tokenDescriptor: getAddress('0x516b8a945700D6bBfDeDaa6dcFc4586bA60B8707'),\n unsubscribeGasLimit: 300_000n,\n },\n limitations: [\n 'The retained upstream generated initcode and pinned Arc runtime are verified separately because constructor immutables change deployed runtime bytes; this is not a fresh source compilation.',\n 'The canonical Permit2 predeploy has an exact runtime pin but is not claimed as an Arc deployment produced by the retained Uniswap/contracts manifest.',\n 'Argus Portal, hook, locker, splitter, tracker, fee, custody, and locked-principal semantics are not established by this shared deployment.',\n 'The retained v4 Quoter is official infrastructure; hook-aware Argus execution must simulate the exact router call and sender rather than assuming Quoter equivalence.',\n ],\n});\n\n/** Every reviewed Uniswap v3 deployment. Addresses are pinned here, not read from upstream. */\nexport const uniswapV3Deployments: readonly UniswapV3Deployment[] = Object.freeze([\n robinhoodUniswapV3Mainnet,\n robinhoodUniswapV3Testnet,\n]);\n\n/** Every reviewed Uniswap v4 deployment. Addresses are pinned here, not read from upstream. */\nexport const uniswapV4Deployments: readonly UniswapV4Deployment[] = Object.freeze([arcUniswapV4Mainnet]);\n\nexport function getUniswapV3Deployment(chainId: number): UniswapV3Deployment {\n const deployment = uniswapV3Deployments.find(candidate => candidate.chainId === chainId);\n if (!deployment) throw new UniswapSdkError('CHAIN_MISMATCH', `No reviewed Uniswap v3 deployment for chain ID ${chainId}`);\n return deployment;\n}\n\nexport function getUniswapV4Deployment(chainId: number): UniswapV4Deployment {\n const deployment = uniswapV4Deployments.find(candidate => candidate.chainId === chainId);\n if (!deployment) throw new UniswapSdkError('CHAIN_MISMATCH', `No reviewed Uniswap v4 deployment for chain ID ${chainId}`);\n return deployment;\n}\n\n/** The reviewed v3 deployment for a network key, or undefined when the network has none. */\nexport function findUniswapV3DeploymentForNetwork(network: string): UniswapV3Deployment | undefined {\n return uniswapV3Deployments.find(candidate => candidate.network === network);\n}\n\n/** The reviewed v4 deployment for a network key, or undefined when the network has none. */\nexport function findUniswapV4DeploymentForNetwork(network: string): UniswapV4Deployment | undefined {\n return uniswapV4Deployments.find(candidate => candidate.network === network);\n}\n\nfunction deepFreeze<T>(value: T): T {\n if (value !== null && typeof value === 'object' && !Object.isFrozen(value)) {\n for (const child of Object.values(value as Record<string, unknown>)) deepFreeze(child);\n Object.freeze(value);\n }\n return value;\n}\n"]}
|
|
@@ -42,6 +42,40 @@ export type V4MintPositionParams = {
|
|
|
42
42
|
*/
|
|
43
43
|
modelledHookPermissions?: readonly (keyof V4HookPermissions)[];
|
|
44
44
|
};
|
|
45
|
+
export type V4RemovePositionParams = {
|
|
46
|
+
positionManager: Address;
|
|
47
|
+
pool: V4PoolState;
|
|
48
|
+
tokenId: bigint;
|
|
49
|
+
tickLower: number;
|
|
50
|
+
tickUpper: number;
|
|
51
|
+
/** Current on-chain position liquidity at the reviewed observation block. */
|
|
52
|
+
liquidity: bigint;
|
|
53
|
+
/** Exact liquidity units to remove. */
|
|
54
|
+
liquidityToRemove: bigint;
|
|
55
|
+
/** Burns the position NFT after removing all liquidity. */
|
|
56
|
+
burnToken?: boolean;
|
|
57
|
+
/** Integer basis points, 0-10000. */
|
|
58
|
+
slippageToleranceBps: number;
|
|
59
|
+
deadlineSeconds: bigint;
|
|
60
|
+
/** Passed to the hook's callbacks verbatim; this SDK does not construct it. */
|
|
61
|
+
hookData?: Hex;
|
|
62
|
+
/** Permission flags reviewed for a nonzero pool hook. */
|
|
63
|
+
modelledHookPermissions?: readonly (keyof V4HookPermissions)[];
|
|
64
|
+
};
|
|
65
|
+
export type V4IncreasePositionParams = {
|
|
66
|
+
positionManager: Address;
|
|
67
|
+
pool: V4PoolState;
|
|
68
|
+
tokenId: bigint;
|
|
69
|
+
tickLower: number;
|
|
70
|
+
tickUpper: number;
|
|
71
|
+
/** Exact liquidity units to add to the existing position. */
|
|
72
|
+
liquidityToAdd: bigint;
|
|
73
|
+
slippageToleranceBps: number;
|
|
74
|
+
deadlineSeconds: bigint;
|
|
75
|
+
hookData?: Hex;
|
|
76
|
+
batchPermit?: V4BatchPermit;
|
|
77
|
+
modelledHookPermissions?: readonly (keyof V4HookPermissions)[];
|
|
78
|
+
};
|
|
45
79
|
export type V4BatchPermitDetail = {
|
|
46
80
|
token: Address;
|
|
47
81
|
amount: bigint;
|
|
@@ -75,6 +109,16 @@ export type V4BatchPermit = {
|
|
|
75
109
|
* assumed benign.
|
|
76
110
|
*/
|
|
77
111
|
export declare function buildV4MintPositionTransaction(input: V4MintPositionParams): V4TransactionMaterial;
|
|
112
|
+
/**
|
|
113
|
+
* Builds unsigned calldata that removes exact liquidity units from one V4 position and
|
|
114
|
+
* returns both currencies to PositionManager's `msgSender()`. Full exits may atomically
|
|
115
|
+
* burn the NFT. The caller must independently bind the token ID to the supplied PoolKey,
|
|
116
|
+
* ticks, liquidity and owner at the same observation block; V4 removal calldata contains
|
|
117
|
+
* a token ID rather than the complete PoolKey.
|
|
118
|
+
*/
|
|
119
|
+
export declare function buildV4RemovePositionTransaction(input: V4RemovePositionParams): V4TransactionMaterial;
|
|
120
|
+
/** Builds unsigned calldata that increases one existing V4 position. */
|
|
121
|
+
export declare function buildV4IncreasePositionTransaction(input: V4IncreasePositionParams): V4TransactionMaterial;
|
|
78
122
|
export type V4PoolKeyMaterial = {
|
|
79
123
|
currency0: Address;
|
|
80
124
|
currency1: Address;
|
|
@@ -127,6 +171,55 @@ export type V4ExpectedMint = V4PoolKeyMaterial & {
|
|
|
127
171
|
*/
|
|
128
172
|
modelledHookPermissions?: readonly (keyof V4HookPermissions)[];
|
|
129
173
|
};
|
|
174
|
+
export type V4ExpectedRemoval = V4PoolKeyMaterial & {
|
|
175
|
+
tokenId: bigint;
|
|
176
|
+
/** Exact liquidity units reviewed for removal. Required for partial exits. */
|
|
177
|
+
liquidityToRemove: bigint;
|
|
178
|
+
burnToken: boolean;
|
|
179
|
+
modelledHookPermissions?: readonly (keyof V4HookPermissions)[];
|
|
180
|
+
};
|
|
181
|
+
export type V4ExpectedIncrease = V4PoolKeyMaterial & {
|
|
182
|
+
tokenId: bigint;
|
|
183
|
+
batchPermit?: {
|
|
184
|
+
owner: Address;
|
|
185
|
+
spender: Address;
|
|
186
|
+
sigDeadline: bigint;
|
|
187
|
+
details: readonly V4BatchPermitDetail[];
|
|
188
|
+
};
|
|
189
|
+
modelledHookPermissions?: readonly (keyof V4HookPermissions)[];
|
|
190
|
+
};
|
|
191
|
+
export type V4IncreaseActionParams = {
|
|
192
|
+
tokenId: bigint;
|
|
193
|
+
liquidityAdded: bigint;
|
|
194
|
+
amount0Max: bigint;
|
|
195
|
+
amount1Max: bigint;
|
|
196
|
+
hookData: Hex;
|
|
197
|
+
currency0: Address;
|
|
198
|
+
currency1: Address;
|
|
199
|
+
deadline: bigint;
|
|
200
|
+
batchPermitOwner?: Address;
|
|
201
|
+
};
|
|
202
|
+
/** Reviews the exact increase/settlement shape emitted by the corresponding builder. */
|
|
203
|
+
export declare function reviewV4IncreasePositionCalldata(data: Hex, expected: V4ExpectedIncrease): V4IncreaseActionParams;
|
|
204
|
+
export type V4RemoveActionParams = {
|
|
205
|
+
tokenId: bigint;
|
|
206
|
+
liquidityRemoved: bigint;
|
|
207
|
+
amount0Min: bigint;
|
|
208
|
+
amount1Min: bigint;
|
|
209
|
+
hookData: Hex;
|
|
210
|
+
currency0: Address;
|
|
211
|
+
currency1: Address;
|
|
212
|
+
recipient: Address;
|
|
213
|
+
deadline: bigint;
|
|
214
|
+
burned: boolean;
|
|
215
|
+
};
|
|
216
|
+
/**
|
|
217
|
+
* Reviews the exact removal shape emitted by `buildV4RemovePositionTransaction`:
|
|
218
|
+
* one DECREASE_LIQUIDITY or BURN_POSITION action followed by TAKE_PAIR to
|
|
219
|
+
* PositionManager's `msgSender()` sentinel. Pool identity beyond the currency pair
|
|
220
|
+
* must be independently proven by a same-block token-ID position read.
|
|
221
|
+
*/
|
|
222
|
+
export declare function reviewV4RemovePositionCalldata(data: Hex, expected: V4ExpectedRemoval): V4RemoveActionParams;
|
|
130
223
|
/**
|
|
131
224
|
* Decodes and verifies calldata built by `buildV4MintPositionTransaction`: a
|
|
132
225
|
* `modifyLiquidities` call — optionally wrapped in a `multicall` alongside pool
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v4-transactions.d.ts","sourceRoot":"","sources":["../src/v4-transactions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAA4E,KAAK,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,MAAM,CAAC;AAKxH,OAAO,EAA+B,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEjF,MAAM,MAAM,qBAAqB,GAAG;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,GAAG,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9E,oGAAoG;AACpG,MAAM,MAAM,WAAW,GAAG;IACxB,SAAS,EAAE,QAAQ,CAAC;IACpB,SAAS,EAAE,QAAQ,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,OAAO,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,eAAe,EAAE,OAAO,CAAC;IACzB,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,mDAAmD;IACnD,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,qCAAqC;IACrC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,eAAe,EAAE,MAAM,CAAC;IACxB,+EAA+E;IAC/E,QAA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