UNPKG

@uniswap/universal-router

Version:

Smart contracts for Universal Router

1 lines 7.07 kB
{"abi":[{"type":"function","name":"createAndInitializePoolIfNecessary","inputs":[{"name":"token0","type":"address","internalType":"address"},{"name":"token1","type":"address","internalType":"address"},{"name":"fee","type":"uint24","internalType":"uint24"},{"name":"sqrtPriceX96","type":"uint160","internalType":"uint160"}],"outputs":[{"name":"pool","type":"address","internalType":"address"}],"stateMutability":"payable"}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"createAndInitializePoolIfNecessary(address,address,uint24,uint160)":"13ead562"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token0\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token1\",\"type\":\"address\"},{\"internalType\":\"uint24\",\"name\":\"fee\",\"type\":\"uint24\"},{\"internalType\":\"uint160\",\"name\":\"sqrtPriceX96\",\"type\":\"uint160\"}],\"name\":\"createAndInitializePoolIfNecessary\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"pool\",\"type\":\"address\"}],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"createAndInitializePoolIfNecessary(address,address,uint24,uint160)\":{\"details\":\"This method can be bundled with others via IMulticall for the first action (e.g. mint) performed against a pool\",\"params\":{\"fee\":\"The fee amount of the v3 pool for the specified token pair\",\"sqrtPriceX96\":\"The initial square root price of the pool as a Q64.96 value\",\"token0\":\"The contract address of token0 of the pool\",\"token1\":\"The contract address of token1 of the pool\"},\"returns\":{\"pool\":\"Returns the pool address based on the pair of tokens and fee, will return the newly created pool address if necessary\"}}},\"title\":\"Creates and initializes V3 Pools\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"createAndInitializePoolIfNecessary(address,address,uint24,uint160)\":{\"notice\":\"Creates a new pool if it does not exist, then initializes if not initialized\"}},\"notice\":\"Provides a method for creating and initializing a pool, if necessary, for bundling with other methods that require the pool to exist.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"lib/v3-periphery/contracts/interfaces/IPoolInitializer.sol\":\"IPoolInitializer\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":44444444},\"remappings\":[\":@ensdomains/=lib/v4-periphery/lib/v4-core/node_modules/@ensdomains/\",\":@openzeppelin/=lib/v4-periphery/lib/v4-core/lib/openzeppelin-contracts/\",\":@openzeppelin/contracts/=lib/v4-periphery/lib/v4-core/lib/openzeppelin-contracts/contracts/\",\":@uniswap/v2-core/=node_modules/@uniswap/v2-core/\",\":@uniswap/v3-core/=node_modules/@uniswap/v3-core/\",\":@uniswap/v3-periphery/=lib/v3-periphery/\",\":@uniswap/v4-core/=lib/v4-periphery/lib/v4-core/\",\":@uniswap/v4-periphery/=lib/v4-periphery/\",\":ds-test/=lib/solmate/lib/ds-test/src/\",\":erc4626-tests/=lib/v4-periphery/lib/v4-core/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-gas-snapshot/=lib/permit2/lib/forge-gas-snapshot/src/\",\":forge-std/=lib/forge-std/src/\",\":hardhat/=lib/v4-periphery/lib/v4-core/node_modules/hardhat/\",\":openzeppelin-contracts/=lib/permit2/lib/openzeppelin-contracts/\",\":permit2/=lib/permit2/\",\":solmate/=lib/solmate/\",\":v3-periphery/=lib/v3-periphery/contracts/\",\":v4-core/=lib/v4-periphery/lib/v4-core/src/\",\":v4-periphery/=lib/v4-periphery/\"],\"viaIR\":true},\"sources\":{\"lib/v3-periphery/contracts/interfaces/IPoolInitializer.sol\":{\"keccak256\":\"0x9d7695e8d94c22cc5fcced602017aabb988de89981ea7bee29ea629d5328a862\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://61b50933026ee1017db2a6273af8cedc3238c95dca58880db0918dbdbb2f064f\",\"dweb:/ipfs/QmUebR26pqG25d18aBELKz8aFFKkmHa8PxntzXTA7o9Ldu\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.26+commit.8a97fa7a"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"token0","type":"address"},{"internalType":"address","name":"token1","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"uint160","name":"sqrtPriceX96","type":"uint160"}],"stateMutability":"payable","type":"function","name":"createAndInitializePoolIfNecessary","outputs":[{"internalType":"address","name":"pool","type":"address"}]}],"devdoc":{"kind":"dev","methods":{"createAndInitializePoolIfNecessary(address,address,uint24,uint160)":{"details":"This method can be bundled with others via IMulticall for the first action (e.g. mint) performed against a pool","params":{"fee":"The fee amount of the v3 pool for the specified token pair","sqrtPriceX96":"The initial square root price of the pool as a Q64.96 value","token0":"The contract address of token0 of the pool","token1":"The contract address of token1 of the pool"},"returns":{"pool":"Returns the pool address based on the pair of tokens and fee, will return the newly created pool address if necessary"}}},"version":1},"userdoc":{"kind":"user","methods":{"createAndInitializePoolIfNecessary(address,address,uint24,uint160)":{"notice":"Creates a new pool if it does not exist, then initializes if not initialized"}},"version":1}},"settings":{"remappings":["@ensdomains/=lib/v4-periphery/lib/v4-core/node_modules/@ensdomains/","@openzeppelin/=lib/v4-periphery/lib/v4-core/lib/openzeppelin-contracts/","@openzeppelin/contracts/=lib/v4-periphery/lib/v4-core/lib/openzeppelin-contracts/contracts/","@uniswap/v2-core/=node_modules/@uniswap/v2-core/","@uniswap/v3-core/=node_modules/@uniswap/v3-core/","@uniswap/v3-periphery/=lib/v3-periphery/","@uniswap/v4-core/=lib/v4-periphery/lib/v4-core/","@uniswap/v4-periphery/=lib/v4-periphery/","ds-test/=lib/solmate/lib/ds-test/src/","erc4626-tests/=lib/v4-periphery/lib/v4-core/lib/openzeppelin-contracts/lib/erc4626-tests/","forge-gas-snapshot/=lib/permit2/lib/forge-gas-snapshot/src/","forge-std/=lib/forge-std/src/","hardhat/=lib/v4-periphery/lib/v4-core/node_modules/hardhat/","openzeppelin-contracts/=lib/permit2/lib/openzeppelin-contracts/","permit2/=lib/permit2/","solmate/=lib/solmate/","v3-periphery/=lib/v3-periphery/contracts/","v4-core/=lib/v4-periphery/lib/v4-core/src/","v4-periphery/=lib/v4-periphery/"],"optimizer":{"enabled":true,"runs":44444444},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"lib/v3-periphery/contracts/interfaces/IPoolInitializer.sol":"IPoolInitializer"},"evmVersion":"cancun","libraries":{},"viaIR":true},"sources":{"lib/v3-periphery/contracts/interfaces/IPoolInitializer.sol":{"keccak256":"0x9d7695e8d94c22cc5fcced602017aabb988de89981ea7bee29ea629d5328a862","urls":["bzz-raw://61b50933026ee1017db2a6273af8cedc3238c95dca58880db0918dbdbb2f064f","dweb:/ipfs/QmUebR26pqG25d18aBELKz8aFFKkmHa8PxntzXTA7o9Ldu"],"license":"GPL-2.0-or-later"}},"version":1},"id":55}