* feat: initial data structure + ABI & buf models * feat: initial modules: identify new pools and events * feat: map liquidity and balance changes, introduce balance delta calculation from liquidity * feat: map tick deltas * chore: undo weird formatting * chore: undo weird formatting * feat: map fee changes and aggregate data to final block structure * feat: reimplement math natively, remove alloy and univ3sdk dependencies * chore: make clippy happy + misc improvements * chore: add rust generated files from buf & ABI * chore: make clippy happy * feat: add all modules to ethereum-uniswap-v4.yaml * chore: update yaml file to skip unnecessary buf paths * fix: update pb mod.rs * fix: fix hex / utf-8 encoding. working version * fix: simplify error handling, rename yaml file to match chain & formatting * fix: fix ChangeType for sqrt_price_x96 on Initialization * fix: make fee a non-static attribute * fix: add balance_owner to univ4 pool * feat: add uniswap-v4 mainnet yaml * fix(uniswap-v4): miscellaneous fixes for UniswapV4 (#147) * fix(uniswap-v4): correctly decode swap event deltas. Deltas are given from a user debt perspective by the event (negative if received by the pool, positive if sent by the pool). In our usecase we need the opposite of this. This commit uses `.neg()` on the amount to apply them correctly. * fix(uniswap-v4): correctly compute token amounts. We were using `get_sqrt_ratio_at_tick` at the current tick to compute the amounts. This was incorrect because it provides the price at the tick boundary, but we might be mid-tick, which could lead to erroneous balances. We now track the current price (updated by `initialization` and `swap` events) and use it when calculating the amounts. * fix(uniswapv4): do not account for fees in swaps. Previously we were adding fees as balances. But they are actually not part of the TVL and we aren't accounting for fees in the position changes (withdrawals). This commit addresses this and remove the fees from the token balances. * refactor: fix pb mod.rs * refactor: bump version and update sepolia config * ci: make clippy happy * refactor: clean unimath tests * refactor: make logic clearer and improve docstrings --------- Co-authored-by: zizou <111426680+flopell@users.noreply.github.com> --------- Co-authored-by: Zizou <111426680+zizou0x@users.noreply.github.com> Co-authored-by: zizou <111426680+flopell@users.noreply.github.com>
1355 lines
26 KiB
JSON
1355 lines
26 KiB
JSON
[
|
|
{
|
|
"inputs": [],
|
|
"name": "AlreadyUnlocked",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "ContractUnlocked",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "currency0",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "currency1",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "CurrenciesOutOfOrderOrEqual",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "CurrencyNotSettled",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "DelegateCallNotAllowed",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "InvalidCaller",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "ManagerLocked",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "MustClearExactPositiveDelta",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "NonzeroNativeValue",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "PoolNotInitialized",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "uint24",
|
|
"name": "fee",
|
|
"type": "uint24"
|
|
}
|
|
],
|
|
"name": "ProtocolFeeTooLarge",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "SwapAmountCannotBeZero",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "int24",
|
|
"name": "tickSpacing",
|
|
"type": "int24"
|
|
}
|
|
],
|
|
"name": "TickSpacingTooLarge",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "int24",
|
|
"name": "tickSpacing",
|
|
"type": "int24"
|
|
}
|
|
],
|
|
"name": "TickSpacingTooSmall",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "UnauthorizedDynamicLPFeeUpdate",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "owner",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "spender",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "uint256",
|
|
"name": "id",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "Approval",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "PoolId",
|
|
"name": "id",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "sender",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "amount0",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "amount1",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "Donate",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "PoolId",
|
|
"name": "id",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "Currency",
|
|
"name": "currency0",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "Currency",
|
|
"name": "currency1",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint24",
|
|
"name": "fee",
|
|
"type": "uint24"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "int24",
|
|
"name": "tickSpacing",
|
|
"type": "int24"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "contract IHooks",
|
|
"name": "hooks",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint160",
|
|
"name": "sqrtPriceX96",
|
|
"type": "uint160"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "int24",
|
|
"name": "tick",
|
|
"type": "int24"
|
|
}
|
|
],
|
|
"name": "Initialize",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "PoolId",
|
|
"name": "id",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "sender",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "int24",
|
|
"name": "tickLower",
|
|
"type": "int24"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "int24",
|
|
"name": "tickUpper",
|
|
"type": "int24"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "int256",
|
|
"name": "liquidityDelta",
|
|
"type": "int256"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "bytes32",
|
|
"name": "salt",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "ModifyLiquidity",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "owner",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "operator",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "bool",
|
|
"name": "approved",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"name": "OperatorSet",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "user",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "newOwner",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "OwnershipTransferred",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "protocolFeeController",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "ProtocolFeeControllerUpdated",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "PoolId",
|
|
"name": "id",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint24",
|
|
"name": "protocolFee",
|
|
"type": "uint24"
|
|
}
|
|
],
|
|
"name": "ProtocolFeeUpdated",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "PoolId",
|
|
"name": "id",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "sender",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "int128",
|
|
"name": "amount0",
|
|
"type": "int128"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "int128",
|
|
"name": "amount1",
|
|
"type": "int128"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint160",
|
|
"name": "sqrtPriceX96",
|
|
"type": "uint160"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint128",
|
|
"name": "liquidity",
|
|
"type": "uint128"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "int24",
|
|
"name": "tick",
|
|
"type": "int24"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint24",
|
|
"name": "fee",
|
|
"type": "uint24"
|
|
}
|
|
],
|
|
"name": "Swap",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": false,
|
|
"internalType": "address",
|
|
"name": "caller",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "from",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "to",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "uint256",
|
|
"name": "id",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "Transfer",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "owner",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "spender",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "id",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "allowance",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "spender",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "id",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "approve",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bool",
|
|
"name": "",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "owner",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "id",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "balanceOf",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "balance",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "from",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "id",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "burn",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "Currency",
|
|
"name": "currency",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "clear",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "recipient",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "Currency",
|
|
"name": "currency",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "collectProtocolFees",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "amountCollected",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "Currency",
|
|
"name": "currency0",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "Currency",
|
|
"name": "currency1",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint24",
|
|
"name": "fee",
|
|
"type": "uint24"
|
|
},
|
|
{
|
|
"internalType": "int24",
|
|
"name": "tickSpacing",
|
|
"type": "int24"
|
|
},
|
|
{
|
|
"internalType": "contract IHooks",
|
|
"name": "hooks",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"internalType": "struct PoolKey",
|
|
"name": "key",
|
|
"type": "tuple"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "amount0",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "amount1",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "bytes",
|
|
"name": "hookData",
|
|
"type": "bytes"
|
|
}
|
|
],
|
|
"name": "donate",
|
|
"outputs": [
|
|
{
|
|
"internalType": "BalanceDelta",
|
|
"name": "delta",
|
|
"type": "int256"
|
|
}
|
|
],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "slot",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "extsload",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "startSlot",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "nSlots",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "extsload",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bytes32[]",
|
|
"name": "",
|
|
"type": "bytes32[]"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "bytes32[]",
|
|
"name": "slots",
|
|
"type": "bytes32[]"
|
|
}
|
|
],
|
|
"name": "extsload",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bytes32[]",
|
|
"name": "",
|
|
"type": "bytes32[]"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "bytes32[]",
|
|
"name": "slots",
|
|
"type": "bytes32[]"
|
|
}
|
|
],
|
|
"name": "exttload",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bytes32[]",
|
|
"name": "",
|
|
"type": "bytes32[]"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "slot",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "exttload",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "Currency",
|
|
"name": "currency0",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "Currency",
|
|
"name": "currency1",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint24",
|
|
"name": "fee",
|
|
"type": "uint24"
|
|
},
|
|
{
|
|
"internalType": "int24",
|
|
"name": "tickSpacing",
|
|
"type": "int24"
|
|
},
|
|
{
|
|
"internalType": "contract IHooks",
|
|
"name": "hooks",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"internalType": "struct PoolKey",
|
|
"name": "key",
|
|
"type": "tuple"
|
|
},
|
|
{
|
|
"internalType": "uint160",
|
|
"name": "sqrtPriceX96",
|
|
"type": "uint160"
|
|
}
|
|
],
|
|
"name": "initialize",
|
|
"outputs": [
|
|
{
|
|
"internalType": "int24",
|
|
"name": "tick",
|
|
"type": "int24"
|
|
}
|
|
],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "owner",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "operator",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "isOperator",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bool",
|
|
"name": "isOperator",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "to",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "id",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "mint",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "Currency",
|
|
"name": "currency0",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "Currency",
|
|
"name": "currency1",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint24",
|
|
"name": "fee",
|
|
"type": "uint24"
|
|
},
|
|
{
|
|
"internalType": "int24",
|
|
"name": "tickSpacing",
|
|
"type": "int24"
|
|
},
|
|
{
|
|
"internalType": "contract IHooks",
|
|
"name": "hooks",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"internalType": "struct PoolKey",
|
|
"name": "key",
|
|
"type": "tuple"
|
|
},
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "int24",
|
|
"name": "tickLower",
|
|
"type": "int24"
|
|
},
|
|
{
|
|
"internalType": "int24",
|
|
"name": "tickUpper",
|
|
"type": "int24"
|
|
},
|
|
{
|
|
"internalType": "int256",
|
|
"name": "liquidityDelta",
|
|
"type": "int256"
|
|
},
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "salt",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"internalType": "struct IPoolManager.ModifyLiquidityParams",
|
|
"name": "params",
|
|
"type": "tuple"
|
|
},
|
|
{
|
|
"internalType": "bytes",
|
|
"name": "hookData",
|
|
"type": "bytes"
|
|
}
|
|
],
|
|
"name": "modifyLiquidity",
|
|
"outputs": [
|
|
{
|
|
"internalType": "BalanceDelta",
|
|
"name": "callerDelta",
|
|
"type": "int256"
|
|
},
|
|
{
|
|
"internalType": "BalanceDelta",
|
|
"name": "feesAccrued",
|
|
"type": "int256"
|
|
}
|
|
],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "owner",
|
|
"outputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "protocolFeeController",
|
|
"outputs": [
|
|
{
|
|
"internalType": "contract IProtocolFeeController",
|
|
"name": "",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "Currency",
|
|
"name": "currency",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "protocolFeesAccrued",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "operator",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "bool",
|
|
"name": "approved",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"name": "setOperator",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bool",
|
|
"name": "",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "Currency",
|
|
"name": "currency0",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "Currency",
|
|
"name": "currency1",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint24",
|
|
"name": "fee",
|
|
"type": "uint24"
|
|
},
|
|
{
|
|
"internalType": "int24",
|
|
"name": "tickSpacing",
|
|
"type": "int24"
|
|
},
|
|
{
|
|
"internalType": "contract IHooks",
|
|
"name": "hooks",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"internalType": "struct PoolKey",
|
|
"name": "key",
|
|
"type": "tuple"
|
|
},
|
|
{
|
|
"internalType": "uint24",
|
|
"name": "newProtocolFee",
|
|
"type": "uint24"
|
|
}
|
|
],
|
|
"name": "setProtocolFee",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "contract IProtocolFeeController",
|
|
"name": "controller",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "setProtocolFeeController",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "settle",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "payable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "recipient",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "settleFor",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "payable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "bytes4",
|
|
"name": "interfaceId",
|
|
"type": "bytes4"
|
|
}
|
|
],
|
|
"name": "supportsInterface",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bool",
|
|
"name": "",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "Currency",
|
|
"name": "currency0",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "Currency",
|
|
"name": "currency1",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint24",
|
|
"name": "fee",
|
|
"type": "uint24"
|
|
},
|
|
{
|
|
"internalType": "int24",
|
|
"name": "tickSpacing",
|
|
"type": "int24"
|
|
},
|
|
{
|
|
"internalType": "contract IHooks",
|
|
"name": "hooks",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"internalType": "struct PoolKey",
|
|
"name": "key",
|
|
"type": "tuple"
|
|
},
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "bool",
|
|
"name": "zeroForOne",
|
|
"type": "bool"
|
|
},
|
|
{
|
|
"internalType": "int256",
|
|
"name": "amountSpecified",
|
|
"type": "int256"
|
|
},
|
|
{
|
|
"internalType": "uint160",
|
|
"name": "sqrtPriceLimitX96",
|
|
"type": "uint160"
|
|
}
|
|
],
|
|
"internalType": "struct IPoolManager.SwapParams",
|
|
"name": "params",
|
|
"type": "tuple"
|
|
},
|
|
{
|
|
"internalType": "bytes",
|
|
"name": "hookData",
|
|
"type": "bytes"
|
|
}
|
|
],
|
|
"name": "swap",
|
|
"outputs": [
|
|
{
|
|
"internalType": "BalanceDelta",
|
|
"name": "swapDelta",
|
|
"type": "int256"
|
|
}
|
|
],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "Currency",
|
|
"name": "currency",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "sync",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "Currency",
|
|
"name": "currency",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "to",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "take",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "receiver",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "id",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "transfer",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bool",
|
|
"name": "",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "sender",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "receiver",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "id",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "transferFrom",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bool",
|
|
"name": "",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "newOwner",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "transferOwnership",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "bytes",
|
|
"name": "data",
|
|
"type": "bytes"
|
|
}
|
|
],
|
|
"name": "unlock",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bytes",
|
|
"name": "result",
|
|
"type": "bytes"
|
|
}
|
|
],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "Currency",
|
|
"name": "currency0",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "Currency",
|
|
"name": "currency1",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint24",
|
|
"name": "fee",
|
|
"type": "uint24"
|
|
},
|
|
{
|
|
"internalType": "int24",
|
|
"name": "tickSpacing",
|
|
"type": "int24"
|
|
},
|
|
{
|
|
"internalType": "contract IHooks",
|
|
"name": "hooks",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"internalType": "struct PoolKey",
|
|
"name": "key",
|
|
"type": "tuple"
|
|
},
|
|
{
|
|
"internalType": "uint24",
|
|
"name": "newDynamicLPFee",
|
|
"type": "uint24"
|
|
}
|
|
],
|
|
"name": "updateDynamicLPFee",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
}
|
|
] |