open-dex/contracts/interfaces/artifacts/IV3Migrator_metadata.json
2024-08-24 12:08:46 +03:00

451 lines
13 KiB
JSON

{
"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"
},
{
"inputs": [
{
"components": [
{
"internalType": "address",
"name": "pair",
"type": "address"
},
{
"internalType": "uint256",
"name": "liquidityToMigrate",
"type": "uint256"
},
{
"internalType": "uint8",
"name": "percentageToMigrate",
"type": "uint8"
},
{
"internalType": "address",
"name": "token0",
"type": "address"
},
{
"internalType": "address",
"name": "token1",
"type": "address"
},
{
"internalType": "uint24",
"name": "fee",
"type": "uint24"
},
{
"internalType": "int24",
"name": "tickLower",
"type": "int24"
},
{
"internalType": "int24",
"name": "tickUpper",
"type": "int24"
},
{
"internalType": "uint256",
"name": "amount0Min",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount1Min",
"type": "uint256"
},
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"internalType": "uint256",
"name": "deadline",
"type": "uint256"
},
{
"internalType": "bool",
"name": "refundAsETH",
"type": "bool"
}
],
"internalType": "struct IV3Migrator.MigrateParams",
"name": "params",
"type": "tuple"
}
],
"name": "migrate",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes[]",
"name": "data",
"type": "bytes[]"
}
],
"name": "multicall",
"outputs": [
{
"internalType": "bytes[]",
"name": "results",
"type": "bytes[]"
}
],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "deadline",
"type": "uint256"
},
{
"internalType": "uint8",
"name": "v",
"type": "uint8"
},
{
"internalType": "bytes32",
"name": "r",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "s",
"type": "bytes32"
}
],
"name": "selfPermit",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "uint256",
"name": "nonce",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "expiry",
"type": "uint256"
},
{
"internalType": "uint8",
"name": "v",
"type": "uint8"
},
{
"internalType": "bytes32",
"name": "r",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "s",
"type": "bytes32"
}
],
"name": "selfPermitAllowed",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "uint256",
"name": "nonce",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "expiry",
"type": "uint256"
},
{
"internalType": "uint8",
"name": "v",
"type": "uint8"
},
{
"internalType": "bytes32",
"name": "r",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "s",
"type": "bytes32"
}
],
"name": "selfPermitAllowedIfNecessary",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "deadline",
"type": "uint256"
},
{
"internalType": "uint8",
"name": "v",
"type": "uint8"
},
{
"internalType": "bytes32",
"name": "r",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "s",
"type": "bytes32"
}
],
"name": "selfPermitIfNecessary",
"outputs": [],
"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"
}
},
"migrate((address,uint256,uint8,address,address,uint24,int24,int24,uint256,uint256,address,uint256,bool))": {
"details": "Slippage protection is enforced via `amount{0,1}Min`, which should be a discount of the expected values of the maximum amount of v3 liquidity that the v2 liquidity can get. For the special case of migrating to an out-of-range position, `amount{0,1}Min` may be set to 0, enforcing that the position remains out of range",
"params": {
"params": "The params necessary to migrate v2 liquidity, encoded as `MigrateParams` in calldata"
}
},
"multicall(bytes[])": {
"details": "The `msg.value` should not be trusted for any method callable from multicall.",
"params": {
"data": "The encoded function data for each of the calls to make to this contract"
},
"returns": {
"results": "The results from each of the calls passed in via data"
}
},
"selfPermit(address,uint256,uint256,uint8,bytes32,bytes32)": {
"details": "The `owner` is always msg.sender and the `spender` is always address(this).",
"params": {
"deadline": "A timestamp, the current blocktime must be less than or equal to this timestamp",
"r": "Must produce valid secp256k1 signature from the holder along with `v` and `s`",
"s": "Must produce valid secp256k1 signature from the holder along with `r` and `v`",
"token": "The address of the token spent",
"v": "Must produce valid secp256k1 signature from the holder along with `r` and `s`",
"value": "The amount that can be spent of token"
}
},
"selfPermitAllowed(address,uint256,uint256,uint8,bytes32,bytes32)": {
"details": "The `owner` is always msg.sender and the `spender` is always address(this)",
"params": {
"expiry": "The timestamp at which the permit is no longer valid",
"nonce": "The current nonce of the owner",
"r": "Must produce valid secp256k1 signature from the holder along with `v` and `s`",
"s": "Must produce valid secp256k1 signature from the holder along with `r` and `v`",
"token": "The address of the token spent",
"v": "Must produce valid secp256k1 signature from the holder along with `r` and `s`"
}
},
"selfPermitAllowedIfNecessary(address,uint256,uint256,uint8,bytes32,bytes32)": {
"details": "The `owner` is always msg.sender and the `spender` is always address(this) Can be used instead of #selfPermitAllowed to prevent calls from failing due to a frontrun of a call to #selfPermitAllowed.",
"params": {
"expiry": "The timestamp at which the permit is no longer valid",
"nonce": "The current nonce of the owner",
"r": "Must produce valid secp256k1 signature from the holder along with `v` and `s`",
"s": "Must produce valid secp256k1 signature from the holder along with `r` and `v`",
"token": "The address of the token spent",
"v": "Must produce valid secp256k1 signature from the holder along with `r` and `s`"
}
},
"selfPermitIfNecessary(address,uint256,uint256,uint8,bytes32,bytes32)": {
"details": "The `owner` is always msg.sender and the `spender` is always address(this). Can be used instead of #selfPermit to prevent calls from failing due to a frontrun of a call to #selfPermit",
"params": {
"deadline": "A timestamp, the current blocktime must be less than or equal to this timestamp",
"r": "Must produce valid secp256k1 signature from the holder along with `v` and `s`",
"s": "Must produce valid secp256k1 signature from the holder along with `r` and `v`",
"token": "The address of the token spent",
"v": "Must produce valid secp256k1 signature from the holder along with `r` and `s`",
"value": "The amount that can be spent of token"
}
}
},
"title": "V3 Migrator",
"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"
},
"migrate((address,uint256,uint8,address,address,uint24,int24,int24,uint256,uint256,address,uint256,bool))": {
"notice": "Migrates liquidity to v3 by burning v2 liquidity and minting a new position for v3"
},
"multicall(bytes[])": {
"notice": "Call multiple functions in the current contract and return the data from all of them if they all succeed"
},
"selfPermit(address,uint256,uint256,uint8,bytes32,bytes32)": {
"notice": "Permits this contract to spend a given token from `msg.sender`"
},
"selfPermitAllowed(address,uint256,uint256,uint8,bytes32,bytes32)": {
"notice": "Permits this contract to spend the sender's tokens for permit signatures that have the `allowed` parameter"
},
"selfPermitAllowedIfNecessary(address,uint256,uint256,uint8,bytes32,bytes32)": {
"notice": "Permits this contract to spend the sender's tokens for permit signatures that have the `allowed` parameter"
},
"selfPermitIfNecessary(address,uint256,uint256,uint8,bytes32,bytes32)": {
"notice": "Permits this contract to spend a given token from `msg.sender`"
}
},
"notice": "Enables migration of liqudity from Uniswap v2-compatible pairs into Uniswap v3 pools",
"version": 1
}
},
"settings": {
"compilationTarget": {
"contracts/interfaces/IV3Migrator.sol": "IV3Migrator"
},
"evmVersion": "cancun",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
},
"sources": {
"contracts/interfaces/IMulticall.sol": {
"keccak256": "0x76aeef8a8cd237f1bd8fb67f21e1734ba5c294b522c1932ce336f72fe41e5355",
"license": "GPL-2.0-or-later",
"urls": [
"bzz-raw://0b577b8f8e1b2767f218d0a1d78f7cc4d7b24ccd01ed7422a7129f9ae465edff",
"dweb:/ipfs/QmVUzqSeAXf9Urwc1tseh1sW3pNz6z36vEYYYAGTNAnDWf"
]
},
"contracts/interfaces/IPoolInitializer.sol": {
"keccak256": "0x8229e43304f2c2412aaca27ea314ee78f3bcaca31124017b3bc4729c383594f1",
"license": "GPL-2.0-or-later",
"urls": [
"bzz-raw://3beed69fd04dd1ad59e9c083914ca47fd1f3c0bf53e50a62c772597a25191d78",
"dweb:/ipfs/QmZ7vuCn86Gg6kopXVw5hBRPemcqtWykke8zUskZArq8aP"
]
},
"contracts/interfaces/ISelfPermit.sol": {
"keccak256": "0xb442ad31c8fef5c47ebb82b3b3f906d0a5dbca8eb26db90b287a4825bf53d595",
"license": "GPL-2.0-or-later",
"urls": [
"bzz-raw://6e36e6e894083ad07e2ba62977a06db0874b8ed1f6eac705f4c9d89a410f54ea",
"dweb:/ipfs/QmWLWTuKrcCzxZeedLpUG3c8jjFLs5gLmvt35Ysp2uc9c6"
]
},
"contracts/interfaces/IV3Migrator.sol": {
"keccak256": "0xcc9095af5736016d4aa775ef7ab99306c8262954a59b9829a073455c2c61c236",
"license": "GPL-2.0-or-later",
"urls": [
"bzz-raw://812d269fc93db8ec94d8bb7297bb4f04faf90ab90ded0364c930db20860bd1c4",
"dweb:/ipfs/Qme9ZDXEdRF6hdNwWUYbqshgDDEKr2wd3wbCDnwq1Rm4ud"
]
}
},
"version": 1
}