UNPKG

@uniswap/v4-periphery

Version:

🦄 Peripheral smart contracts for interacting with Uniswap v4

1 lines • 12.1 kB
{"abi":[{"type":"function","name":"initializePool","inputs":[{"name":"key","type":"tuple","internalType":"struct PoolKey","components":[{"name":"currency0","type":"address","internalType":"Currency"},{"name":"currency1","type":"address","internalType":"Currency"},{"name":"fee","type":"uint24","internalType":"uint24"},{"name":"tickSpacing","type":"int24","internalType":"int24"},{"name":"hooks","type":"address","internalType":"contract IHooks"}]},{"name":"sqrtPriceX96","type":"uint160","internalType":"uint160"}],"outputs":[{"name":"","type":"int24","internalType":"int24"}],"stateMutability":"payable"}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"initializePool((address,address,uint24,int24,address),uint160)":"f7020405"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"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\":\"initializePool\",\"outputs\":[{\"internalType\":\"int24\",\"name\":\"\",\"type\":\"int24\"}],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"initializePool((address,address,uint24,int24,address),uint160)\":{\"details\":\"If the pool is already initialized, this function will not revert and just return type(int24).max\",\"params\":{\"key\":\"The PoolKey of the pool to initialize\",\"sqrtPriceX96\":\"The initial starting price of the pool, expressed as a sqrtPriceX96\"},\"returns\":{\"_0\":\"The current tick of the pool, or type(int24).max if the pool creation failed, or the pool already existed\"}}},\"title\":\"IPoolInitializer_v4\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"initializePool((address,address,uint24,int24,address),uint160)\":{\"notice\":\"Initialize a Uniswap v4 Pool\"}},\"notice\":\"Interface for the PoolInitializer_v4 contract\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/interfaces/IPoolInitializer_v4.sol\":\"IPoolInitializer_v4\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":30000},\"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/IPoolInitializer_v4.sol\":{\"keccak256\":\"0x2e4feda94650a2642039e0309ffdec480ee050bc40864bf5e1dba42bb4dc9e98\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://964c178b4da8bab9ef898b94bb26d7c17cc44c5cf20485f55dcf5e9c7e1b1d92\",\"dweb:/ipfs/QmVd2c3SYteyr5xZgUS4sDAiZF43dLwVAEKdCfvQbkZpRJ\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.26+commit.8a97fa7a"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"struct PoolKey","name":"key","type":"tuple","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":"uint160","name":"sqrtPriceX96","type":"uint160"}],"stateMutability":"payable","type":"function","name":"initializePool","outputs":[{"internalType":"int24","name":"","type":"int24"}]}],"devdoc":{"kind":"dev","methods":{"initializePool((address,address,uint24,int24,address),uint160)":{"details":"If the pool is already initialized, this function will not revert and just return type(int24).max","params":{"key":"The PoolKey of the pool to initialize","sqrtPriceX96":"The initial starting price of the pool, expressed as a sqrtPriceX96"},"returns":{"_0":"The current tick of the pool, or type(int24).max if the pool creation failed, or the pool already existed"}}},"version":1},"userdoc":{"kind":"user","methods":{"initializePool((address,address,uint24,int24,address),uint160)":{"notice":"Initialize a Uniswap v4 Pool"}},"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":30000},"metadata":{"bytecodeHash":"none"},"compilationTarget":{"src/interfaces/IPoolInitializer_v4.sol":"IPoolInitializer_v4"},"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/IPoolInitializer_v4.sol":{"keccak256":"0x2e4feda94650a2642039e0309ffdec480ee050bc40864bf5e1dba42bb4dc9e98","urls":["bzz-raw://964c178b4da8bab9ef898b94bb26d7c17cc44c5cf20485f55dcf5e9c7e1b1d92","dweb:/ipfs/QmVd2c3SYteyr5xZgUS4sDAiZF43dLwVAEKdCfvQbkZpRJ"],"license":"MIT"}},"version":1},"id":55}