@uniswap/v4-periphery
Version:
🦄 Peripheral smart contracts for interacting with Uniswap v4
1 lines • 16.7 kB
JSON
{"abi":[{"type":"function","name":"notifyBurn","inputs":[{"name":"tokenId","type":"uint256","internalType":"uint256"},{"name":"owner","type":"address","internalType":"address"},{"name":"info","type":"uint256","internalType":"PositionInfo"},{"name":"liquidity","type":"uint256","internalType":"uint256"},{"name":"feesAccrued","type":"int256","internalType":"BalanceDelta"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"notifyModifyLiquidity","inputs":[{"name":"tokenId","type":"uint256","internalType":"uint256"},{"name":"liquidityChange","type":"int256","internalType":"int256"},{"name":"feesAccrued","type":"int256","internalType":"BalanceDelta"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"notifySubscribe","inputs":[{"name":"tokenId","type":"uint256","internalType":"uint256"},{"name":"data","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"notifyUnsubscribe","inputs":[{"name":"tokenId","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"notifyBurn(uint256,address,uint256,uint256,int256)":"b1a9116f","notifyModifyLiquidity(uint256,int256,int256)":"d8865c27","notifySubscribe(uint256,bytes)":"8d57f6b2","notifyUnsubscribe(uint256)":"af45dd14"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"PositionInfo\",\"name\":\"info\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"BalanceDelta\",\"name\":\"feesAccrued\",\"type\":\"int256\"}],\"name\":\"notifyBurn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"int256\",\"name\":\"liquidityChange\",\"type\":\"int256\"},{\"internalType\":\"BalanceDelta\",\"name\":\"feesAccrued\",\"type\":\"int256\"}],\"name\":\"notifyModifyLiquidity\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"notifySubscribe\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"notifyUnsubscribe\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"notifyBurn(uint256,address,uint256,uint256,int256)\":{\"params\":{\"feesAccrued\":\"the fees accrued by the position if liquidity was decreased\",\"info\":\"information about the position\",\"liquidity\":\"the amount of liquidity decreased in the position, may be 0\",\"owner\":\"the current owner of the tokenId\",\"tokenId\":\"the token ID of the position\"}},\"notifyModifyLiquidity(uint256,int256,int256)\":{\"details\":\"Note that feesAccrued can be artificially inflated by a malicious user Pools with a single liquidity position can inflate feeGrowthGlobal (and consequently feesAccrued) by donating to themselves; atomically donating and collecting fees within the same unlockCallback may further inflate feeGrowthGlobal/feesAccrued\",\"params\":{\"feesAccrued\":\"the fees to be collected from the position as a result of the modifyLiquidity call\",\"liquidityChange\":\"the change in liquidity on the underlying position\",\"tokenId\":\"the token ID of the position\"}},\"notifySubscribe(uint256,bytes)\":{\"params\":{\"data\":\"additional data passed in by the caller\",\"tokenId\":\"the token ID of the position\"}},\"notifyUnsubscribe(uint256)\":{\"details\":\"This call's gas is capped at `unsubscribeGasLimit` (set at deployment)Because of EIP-150, solidity may only allocate 63/64 of gasleft()\",\"params\":{\"tokenId\":\"the token ID of the position\"}}},\"title\":\"ISubscriber\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"notifyBurn(uint256,address,uint256,uint256,int256)\":{\"notice\":\"Called when a position is burned\"},\"notifyModifyLiquidity(uint256,int256,int256)\":{\"notice\":\"Called when a position modifies its liquidity or collects fees\"},\"notifySubscribe(uint256,bytes)\":{\"notice\":\"Called when a position subscribes to this subscriber contract\"},\"notifyUnsubscribe(uint256)\":{\"notice\":\"Called when a position unsubscribes from the subscriber\"}},\"notice\":\"Interface that a Subscriber contract should implement to receive updates from the v4 position manager\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/interfaces/ISubscriber.sol\":\"ISubscriber\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":44444444},\"remappings\":[\":@ensdomains/=lib/v4-core/node_modules/@ensdomains/\",\":@openzeppelin/=lib/v4-core/lib/openzeppelin-contracts/\",\":@uniswap/v4-core/=lib/v4-core/\",\":ds-test/=lib/v4-core/lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/v4-core/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-gas-snapshot/=lib/permit2/lib/forge-gas-snapshot/src/\",\":forge-std/=lib/v4-core/lib/forge-std/src/\",\":hardhat/=lib/v4-core/node_modules/hardhat/\",\":openzeppelin-contracts/=lib/v4-core/lib/openzeppelin-contracts/\",\":permit2/=lib/permit2/\",\":solmate/=lib/v4-core/lib/solmate/\",\":v4-core/=lib/v4-core/src/\"],\"viaIR\":true},\"sources\":{\"lib/v4-core/src/interfaces/IHooks.sol\":{\"keccak256\":\"0xc131ffa2d04c10a012fe715fe2c115811526b7ea34285cf0a04ce7ce8320da8d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://3b212358897db5d99c21244d88f97b2e788527552cb430629b472a8cc6289aec\",\"dweb:/ipfs/QmQtwV4dDe2RYk2ErLpaAX7U82jWh1L6Lw2HRuKDvBi84G\"]},\"lib/v4-core/src/interfaces/external/IERC20Minimal.sol\":{\"keccak256\":\"0xeccadf1bf69ba2eb51f2fe4fa511bc7bb05bbd6b9f9a3cb8e5d83d9582613e0f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://118757369892687b99ef46ce28d6861f62c098285bd7687a4f17f7e44e5f81de\",\"dweb:/ipfs/QmUxqbYqQtcEwwFbb9e6BBMePEaSgN8C45v6RKubD4ib8d\"]},\"lib/v4-core/src/libraries/CustomRevert.sol\":{\"keccak256\":\"0x111ed3031b6990c80a93ae35dde6b6ac0b7e6af471388fdd7461e91edda9b7de\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c9ea883c98d6ae1829160d0977bb5195761cfd5bc81692d0a941f45717f594cd\",\"dweb:/ipfs/QmZPwxzaeMNv536wzrAMrMswu7vMHuqPVpjcqL3YvCMoxt\"]},\"lib/v4-core/src/libraries/SafeCast.sol\":{\"keccak256\":\"0x42c4a24f996a14d358be397b71f7ec9d7daf666aaec78002c63315a6ee67aa86\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c3db86e2ba3679105fc32edec656c70282e1fede6cab11217702443f6c26fa59\",\"dweb:/ipfs/QmX4yaaSPdKQzYNRsezjTvZKsubzS8JRTEGFD3fPpTTCcj\"]},\"lib/v4-core/src/types/BalanceDelta.sol\":{\"keccak256\":\"0xa719c8fe51e0a9524280178f19f6851bcc3b3b60e73618f3d60905d35ae5569f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7436928dc9de35c6c7c5c636cb51adaf295cfd590da83b19a004ae33cbec9ef9\",\"dweb:/ipfs/QmRJ9yZkUpzk4433GX3LgVVL8jwpbSYSUwXcucKisf3v4H\"]},\"lib/v4-core/src/types/BeforeSwapDelta.sol\":{\"keccak256\":\"0x2a774312d91285313d569da1a718c909655da5432310417692097a1d4dc83a78\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a2c7a0379955cff9c17ab9e61f95e42909aa5947c22740f86ce940d09856f782\",\"dweb:/ipfs/QmaAuo8UBYXsGrVuKh8iRoAAdqwtg1jDq515cW1ZRP5m9K\"]},\"lib/v4-core/src/types/Currency.sol\":{\"keccak256\":\"0x4a0b84b282577ff6f8acf13ec9f4d32dbb9348748b49611d00e68bee96609c93\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://45f9d62ab3d51b52957279e353853ba1547c3182c9a1e3d1846ada4a90263b01\",\"dweb:/ipfs/QmS8NG84ccQS1yXVD8cv3eKX7J1UKxuJhbUfHTQR2opKF5\"]},\"lib/v4-core/src/types/PoolId.sol\":{\"keccak256\":\"0x308311916ea0f5c2fd878b6a2751eb223d170a69e33f601fae56dfe3c5d392af\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://669c2cd7ac17690b5d8831e0bda72822376c3a04b36afed6d31df4d75fe60918\",\"dweb:/ipfs/QmT6EpkxqU8VF3WsgrZ66F3s1cCQRffR95z1HDYZz7ph6y\"]},\"lib/v4-core/src/types/PoolKey.sol\":{\"keccak256\":\"0xf89856e0580d7a4856d3187a76858377ccee9d59702d230c338d84388221b786\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6f3118fa189025695c37fdf0bdd1190f085ad097484d3c88cf4c56d1db65f639\",\"dweb:/ipfs/QmamXpgtB8GV1CaFLvqefPWSoikLDhMk1yU4heBnVzU8gi\"]},\"lib/v4-core/src/types/PoolOperation.sol\":{\"keccak256\":\"0x7a1a107fc1f2208abb2c9364c8c54e56e98dca27673e9441bed2b949b6382162\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4ad2470383bc5595d5af17840c64971f457adac68895a4db41ba5c71a4478e07\",\"dweb:/ipfs/QmdwKhBHDZFuqXrR2BfDBD9r7rB2ULGQBznsajRTkTmL4c\"]},\"src/interfaces/ISubscriber.sol\":{\"keccak256\":\"0x34ceadec4a63019680e543fe73197f198a55c825d86e18f327840354760b57e7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://31734feafe1fe162a0702ddf862fcc3bd97505931afb3c685033c0185d898051\",\"dweb:/ipfs/QmQEANYVyaXTNzXKcjUVfPhLU71Bix5vxQH75BpPWMkWgw\"]},\"src/libraries/PositionInfoLibrary.sol\":{\"keccak256\":\"0xc5ddf96bd088bc87ea50a20f907fc932fb28397a42682a301b268a11b7f34078\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7dfeb4dc747537240f8167243e8066b6f5f08057386fb8bda93f82973fc18ad6\",\"dweb:/ipfs/Qmby9DAAaHj8hjsMUnqY3vjqCHKGAKrT5EULMmeGcjbbGx\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.26+commit.8a97fa7a"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"PositionInfo","name":"info","type":"uint256"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"BalanceDelta","name":"feesAccrued","type":"int256"}],"stateMutability":"nonpayable","type":"function","name":"notifyBurn"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"int256","name":"liquidityChange","type":"int256"},{"internalType":"BalanceDelta","name":"feesAccrued","type":"int256"}],"stateMutability":"nonpayable","type":"function","name":"notifyModifyLiquidity"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"stateMutability":"nonpayable","type":"function","name":"notifySubscribe"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"notifyUnsubscribe"}],"devdoc":{"kind":"dev","methods":{"notifyBurn(uint256,address,uint256,uint256,int256)":{"params":{"feesAccrued":"the fees accrued by the position if liquidity was decreased","info":"information about the position","liquidity":"the amount of liquidity decreased in the position, may be 0","owner":"the current owner of the tokenId","tokenId":"the token ID of the position"}},"notifyModifyLiquidity(uint256,int256,int256)":{"details":"Note that feesAccrued can be artificially inflated by a malicious user Pools with a single liquidity position can inflate feeGrowthGlobal (and consequently feesAccrued) by donating to themselves; atomically donating and collecting fees within the same unlockCallback may further inflate feeGrowthGlobal/feesAccrued","params":{"feesAccrued":"the fees to be collected from the position as a result of the modifyLiquidity call","liquidityChange":"the change in liquidity on the underlying position","tokenId":"the token ID of the position"}},"notifySubscribe(uint256,bytes)":{"params":{"data":"additional data passed in by the caller","tokenId":"the token ID of the position"}},"notifyUnsubscribe(uint256)":{"details":"This call's gas is capped at `unsubscribeGasLimit` (set at deployment)Because of EIP-150, solidity may only allocate 63/64 of gasleft()","params":{"tokenId":"the token ID of the position"}}},"version":1},"userdoc":{"kind":"user","methods":{"notifyBurn(uint256,address,uint256,uint256,int256)":{"notice":"Called when a position is burned"},"notifyModifyLiquidity(uint256,int256,int256)":{"notice":"Called when a position modifies its liquidity or collects fees"},"notifySubscribe(uint256,bytes)":{"notice":"Called when a position subscribes to this subscriber contract"},"notifyUnsubscribe(uint256)":{"notice":"Called when a position unsubscribes from the subscriber"}},"version":1}},"settings":{"remappings":["@ensdomains/=lib/v4-core/node_modules/@ensdomains/","@openzeppelin/=lib/v4-core/lib/openzeppelin-contracts/","@uniswap/v4-core/=lib/v4-core/","ds-test/=lib/v4-core/lib/forge-std/lib/ds-test/src/","erc4626-tests/=lib/v4-core/lib/openzeppelin-contracts/lib/erc4626-tests/","forge-gas-snapshot/=lib/permit2/lib/forge-gas-snapshot/src/","forge-std/=lib/v4-core/lib/forge-std/src/","hardhat/=lib/v4-core/node_modules/hardhat/","openzeppelin-contracts/=lib/v4-core/lib/openzeppelin-contracts/","permit2/=lib/permit2/","solmate/=lib/v4-core/lib/solmate/","v4-core/=lib/v4-core/src/"],"optimizer":{"enabled":true,"runs":44444444},"metadata":{"bytecodeHash":"none"},"compilationTarget":{"src/interfaces/ISubscriber.sol":"ISubscriber"},"evmVersion":"cancun","libraries":{},"viaIR":true},"sources":{"lib/v4-core/src/interfaces/IHooks.sol":{"keccak256":"0xc131ffa2d04c10a012fe715fe2c115811526b7ea34285cf0a04ce7ce8320da8d","urls":["bzz-raw://3b212358897db5d99c21244d88f97b2e788527552cb430629b472a8cc6289aec","dweb:/ipfs/QmQtwV4dDe2RYk2ErLpaAX7U82jWh1L6Lw2HRuKDvBi84G"],"license":"MIT"},"lib/v4-core/src/interfaces/external/IERC20Minimal.sol":{"keccak256":"0xeccadf1bf69ba2eb51f2fe4fa511bc7bb05bbd6b9f9a3cb8e5d83d9582613e0f","urls":["bzz-raw://118757369892687b99ef46ce28d6861f62c098285bd7687a4f17f7e44e5f81de","dweb:/ipfs/QmUxqbYqQtcEwwFbb9e6BBMePEaSgN8C45v6RKubD4ib8d"],"license":"MIT"},"lib/v4-core/src/libraries/CustomRevert.sol":{"keccak256":"0x111ed3031b6990c80a93ae35dde6b6ac0b7e6af471388fdd7461e91edda9b7de","urls":["bzz-raw://c9ea883c98d6ae1829160d0977bb5195761cfd5bc81692d0a941f45717f594cd","dweb:/ipfs/QmZPwxzaeMNv536wzrAMrMswu7vMHuqPVpjcqL3YvCMoxt"],"license":"MIT"},"lib/v4-core/src/libraries/SafeCast.sol":{"keccak256":"0x42c4a24f996a14d358be397b71f7ec9d7daf666aaec78002c63315a6ee67aa86","urls":["bzz-raw://c3db86e2ba3679105fc32edec656c70282e1fede6cab11217702443f6c26fa59","dweb:/ipfs/QmX4yaaSPdKQzYNRsezjTvZKsubzS8JRTEGFD3fPpTTCcj"],"license":"MIT"},"lib/v4-core/src/types/BalanceDelta.sol":{"keccak256":"0xa719c8fe51e0a9524280178f19f6851bcc3b3b60e73618f3d60905d35ae5569f","urls":["bzz-raw://7436928dc9de35c6c7c5c636cb51adaf295cfd590da83b19a004ae33cbec9ef9","dweb:/ipfs/QmRJ9yZkUpzk4433GX3LgVVL8jwpbSYSUwXcucKisf3v4H"],"license":"MIT"},"lib/v4-core/src/types/BeforeSwapDelta.sol":{"keccak256":"0x2a774312d91285313d569da1a718c909655da5432310417692097a1d4dc83a78","urls":["bzz-raw://a2c7a0379955cff9c17ab9e61f95e42909aa5947c22740f86ce940d09856f782","dweb:/ipfs/QmaAuo8UBYXsGrVuKh8iRoAAdqwtg1jDq515cW1ZRP5m9K"],"license":"MIT"},"lib/v4-core/src/types/Currency.sol":{"keccak256":"0x4a0b84b282577ff6f8acf13ec9f4d32dbb9348748b49611d00e68bee96609c93","urls":["bzz-raw://45f9d62ab3d51b52957279e353853ba1547c3182c9a1e3d1846ada4a90263b01","dweb:/ipfs/QmS8NG84ccQS1yXVD8cv3eKX7J1UKxuJhbUfHTQR2opKF5"],"license":"MIT"},"lib/v4-core/src/types/PoolId.sol":{"keccak256":"0x308311916ea0f5c2fd878b6a2751eb223d170a69e33f601fae56dfe3c5d392af","urls":["bzz-raw://669c2cd7ac17690b5d8831e0bda72822376c3a04b36afed6d31df4d75fe60918","dweb:/ipfs/QmT6EpkxqU8VF3WsgrZ66F3s1cCQRffR95z1HDYZz7ph6y"],"license":"MIT"},"lib/v4-core/src/types/PoolKey.sol":{"keccak256":"0xf89856e0580d7a4856d3187a76858377ccee9d59702d230c338d84388221b786","urls":["bzz-raw://6f3118fa189025695c37fdf0bdd1190f085ad097484d3c88cf4c56d1db65f639","dweb:/ipfs/QmamXpgtB8GV1CaFLvqefPWSoikLDhMk1yU4heBnVzU8gi"],"license":"MIT"},"lib/v4-core/src/types/PoolOperation.sol":{"keccak256":"0x7a1a107fc1f2208abb2c9364c8c54e56e98dca27673e9441bed2b949b6382162","urls":["bzz-raw://4ad2470383bc5595d5af17840c64971f457adac68895a4db41ba5c71a4478e07","dweb:/ipfs/QmdwKhBHDZFuqXrR2BfDBD9r7rB2ULGQBznsajRTkTmL4c"],"license":"MIT"},"src/interfaces/ISubscriber.sol":{"keccak256":"0x34ceadec4a63019680e543fe73197f198a55c825d86e18f327840354760b57e7","urls":["bzz-raw://31734feafe1fe162a0702ddf862fcc3bd97505931afb3c685033c0185d898051","dweb:/ipfs/QmQEANYVyaXTNzXKcjUVfPhLU71Bix5vxQH75BpPWMkWgw"],"license":"MIT"},"src/libraries/PositionInfoLibrary.sol":{"keccak256":"0xc5ddf96bd088bc87ea50a20f907fc932fb28397a42682a301b268a11b7f34078","urls":["bzz-raw://7dfeb4dc747537240f8167243e8066b6f5f08057386fb8bda93f82973fc18ad6","dweb:/ipfs/Qmby9DAAaHj8hjsMUnqY3vjqCHKGAKrT5EULMmeGcjbbGx"],"license":"MIT"}},"version":1},"id":58}