diff --git a/.changeset/empty-dancers-decide.md b/.changeset/empty-dancers-decide.md new file mode 100644 index 0000000..39e9a39 --- /dev/null +++ b/.changeset/empty-dancers-decide.md @@ -0,0 +1,5 @@ +--- +'@traderjoe-xyz/sdk-v2': patch +--- + +update lb hooks lens abi diff --git a/packages/v2/src/abis/json/LBHooksLens.json b/packages/v2/src/abis/json/LBHooksLens.json index 6a3f676..23f561a 100644 --- a/packages/v2/src/abis/json/LBHooksLens.json +++ b/packages/v2/src/abis/json/LBHooksLens.json @@ -32,16 +32,8 @@ "components": [ { "components": [ - { - "internalType": "address", - "name": "hooks", - "type": "address" - }, - { - "internalType": "bool", - "name": "beforeSwap", - "type": "bool" - }, + { "internalType": "address", "name": "hooks", "type": "address" }, + { "internalType": "bool", "name": "beforeSwap", "type": "bool" }, { "internalType": "bool", "name": "afterSwap", "type": "bool" }, { "internalType": "bool", @@ -53,17 +45,9 @@ "name": "afterFlashLoan", "type": "bool" }, - { - "internalType": "bool", - "name": "beforeMint", - "type": "bool" - }, + { "internalType": "bool", "name": "beforeMint", "type": "bool" }, { "internalType": "bool", "name": "afterMint", "type": "bool" }, - { - "internalType": "bool", - "name": "beforeBurn", - "type": "bool" - }, + { "internalType": "bool", "name": "beforeBurn", "type": "bool" }, { "internalType": "bool", "name": "afterBurn", "type": "bool" }, { "internalType": "bool", @@ -80,55 +64,89 @@ "name": "hooksParameters", "type": "tuple" }, - { - "internalType": "enum ILBHooksManager.LBHooksType", - "name": "hooksType", - "type": "uint8" - }, { "components": [ { - "internalType": "address", - "name": "token", - "type": "address" + "internalType": "enum ILBHooksManager.LBHooksType", + "name": "hooksType", + "type": "uint8" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "decimals", + "type": "uint256" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + } + ], + "internalType": "struct LBHooksLens.Token", + "name": "rewardToken", + "type": "tuple" + }, + { "internalType": "uint256", "name": "pid", "type": "uint256" }, + { + "internalType": "uint256", + "name": "moePerSecond", + "type": "uint256" }, { "internalType": "uint256", - "name": "decimals", + "name": "activeId", "type": "uint256" }, - { "internalType": "string", "name": "symbol", "type": "string" } + { + "internalType": "uint256", + "name": "rangeStart", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rangeEnd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pendingRewards", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rewardPerSecond", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastUpdateTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "endTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "remainingRewards", + "type": "uint256" + }, + { "internalType": "bool", "name": "isStarted", "type": "bool" }, + { "internalType": "bool", "name": "isEnded", "type": "bool" } ], - "internalType": "struct LBHooksLens.Token", - "name": "rewardToken", + "internalType": "struct LBHooksLens.Parameters", + "name": "parameters", "type": "tuple" }, - { "internalType": "uint256", "name": "pid", "type": "uint256" }, - { - "internalType": "uint256", - "name": "moePerSecond", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "activeId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "rangeStart", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "rangeEnd", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "pendingRewards", - "type": "uint256" - } + { "internalType": "uint256", "name": "activeId", "type": "uint256" } ], "internalType": "struct LBHooksLens.HooksRewarderData[]", "name": "rewarderData", @@ -138,16 +156,8 @@ "components": [ { "components": [ - { - "internalType": "address", - "name": "hooks", - "type": "address" - }, - { - "internalType": "bool", - "name": "beforeSwap", - "type": "bool" - }, + { "internalType": "address", "name": "hooks", "type": "address" }, + { "internalType": "bool", "name": "beforeSwap", "type": "bool" }, { "internalType": "bool", "name": "afterSwap", "type": "bool" }, { "internalType": "bool", @@ -159,17 +169,9 @@ "name": "afterFlashLoan", "type": "bool" }, - { - "internalType": "bool", - "name": "beforeMint", - "type": "bool" - }, + { "internalType": "bool", "name": "beforeMint", "type": "bool" }, { "internalType": "bool", "name": "afterMint", "type": "bool" }, - { - "internalType": "bool", - "name": "beforeBurn", - "type": "bool" - }, + { "internalType": "bool", "name": "beforeBurn", "type": "bool" }, { "internalType": "bool", "name": "afterBurn", "type": "bool" }, { "internalType": "bool", @@ -186,73 +188,91 @@ "name": "hooksParameters", "type": "tuple" }, - { - "internalType": "enum ILBHooksManager.LBHooksType", - "name": "hooksType", - "type": "uint8" - }, { "components": [ { - "internalType": "address", - "name": "token", - "type": "address" + "internalType": "enum ILBHooksManager.LBHooksType", + "name": "hooksType", + "type": "uint8" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "decimals", + "type": "uint256" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + } + ], + "internalType": "struct LBHooksLens.Token", + "name": "rewardToken", + "type": "tuple" + }, + { "internalType": "uint256", "name": "pid", "type": "uint256" }, + { + "internalType": "uint256", + "name": "moePerSecond", + "type": "uint256" }, { "internalType": "uint256", - "name": "decimals", + "name": "activeId", "type": "uint256" }, - { "internalType": "string", "name": "symbol", "type": "string" } + { + "internalType": "uint256", + "name": "rangeStart", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rangeEnd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pendingRewards", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rewardPerSecond", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastUpdateTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "endTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "remainingRewards", + "type": "uint256" + }, + { "internalType": "bool", "name": "isStarted", "type": "bool" }, + { "internalType": "bool", "name": "isEnded", "type": "bool" } ], - "internalType": "struct LBHooksLens.Token", - "name": "rewardToken", + "internalType": "struct LBHooksLens.Parameters", + "name": "parameters", "type": "tuple" }, - { - "internalType": "uint256", - "name": "rewardPerSecond", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lastUpdateTimestamp", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endTimestamp", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "remainingRewards", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "activeId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "rangeStart", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "rangeEnd", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "pendingRewards", - "type": "uint256" - }, - { "internalType": "bool", "name": "isStarted", "type": "bool" }, - { "internalType": "bool", "name": "isEnded", "type": "bool" } + { "internalType": "uint256", "name": "activeId", "type": "uint256" } ], - "internalType": "struct LBHooksLens.ExtraHooksRewarderData[]", + "internalType": "struct LBHooksLens.HooksRewarderData[]", "name": "extraRewarderData", "type": "tuple[]" } @@ -271,16 +291,8 @@ { "internalType": "address", "name": "hooks", "type": "address" }, { "internalType": "bool", "name": "beforeSwap", "type": "bool" }, { "internalType": "bool", "name": "afterSwap", "type": "bool" }, - { - "internalType": "bool", - "name": "beforeFlashLoan", - "type": "bool" - }, - { - "internalType": "bool", - "name": "afterFlashLoan", - "type": "bool" - }, + { "internalType": "bool", "name": "beforeFlashLoan", "type": "bool" }, + { "internalType": "bool", "name": "afterFlashLoan", "type": "bool" }, { "internalType": "bool", "name": "beforeMint", "type": "bool" }, { "internalType": "bool", "name": "afterMint", "type": "bool" }, { "internalType": "bool", "name": "beforeBurn", "type": "bool" }, @@ -315,16 +327,8 @@ { "internalType": "address", "name": "hooks", "type": "address" }, { "internalType": "bool", "name": "beforeSwap", "type": "bool" }, { "internalType": "bool", "name": "afterSwap", "type": "bool" }, - { - "internalType": "bool", - "name": "beforeFlashLoan", - "type": "bool" - }, - { - "internalType": "bool", - "name": "afterFlashLoan", - "type": "bool" - }, + { "internalType": "bool", "name": "beforeFlashLoan", "type": "bool" }, + { "internalType": "bool", "name": "afterFlashLoan", "type": "bool" }, { "internalType": "bool", "name": "beforeMint", "type": "bool" }, { "internalType": "bool", "name": "afterMint", "type": "bool" }, { "internalType": "bool", "name": "beforeBurn", "type": "bool" }, @@ -360,16 +364,8 @@ "components": [ { "components": [ - { - "internalType": "address", - "name": "hooks", - "type": "address" - }, - { - "internalType": "bool", - "name": "beforeSwap", - "type": "bool" - }, + { "internalType": "address", "name": "hooks", "type": "address" }, + { "internalType": "bool", "name": "beforeSwap", "type": "bool" }, { "internalType": "bool", "name": "afterSwap", "type": "bool" }, { "internalType": "bool", @@ -381,17 +377,9 @@ "name": "afterFlashLoan", "type": "bool" }, - { - "internalType": "bool", - "name": "beforeMint", - "type": "bool" - }, + { "internalType": "bool", "name": "beforeMint", "type": "bool" }, { "internalType": "bool", "name": "afterMint", "type": "bool" }, - { - "internalType": "bool", - "name": "beforeBurn", - "type": "bool" - }, + { "internalType": "bool", "name": "beforeBurn", "type": "bool" }, { "internalType": "bool", "name": "afterBurn", "type": "bool" }, { "internalType": "bool", @@ -408,55 +396,89 @@ "name": "hooksParameters", "type": "tuple" }, - { - "internalType": "enum ILBHooksManager.LBHooksType", - "name": "hooksType", - "type": "uint8" - }, { "components": [ { - "internalType": "address", - "name": "token", - "type": "address" + "internalType": "enum ILBHooksManager.LBHooksType", + "name": "hooksType", + "type": "uint8" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "decimals", + "type": "uint256" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + } + ], + "internalType": "struct LBHooksLens.Token", + "name": "rewardToken", + "type": "tuple" + }, + { "internalType": "uint256", "name": "pid", "type": "uint256" }, + { + "internalType": "uint256", + "name": "moePerSecond", + "type": "uint256" }, { "internalType": "uint256", - "name": "decimals", + "name": "activeId", "type": "uint256" }, - { "internalType": "string", "name": "symbol", "type": "string" } + { + "internalType": "uint256", + "name": "rangeStart", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rangeEnd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pendingRewards", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rewardPerSecond", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastUpdateTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "endTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "remainingRewards", + "type": "uint256" + }, + { "internalType": "bool", "name": "isStarted", "type": "bool" }, + { "internalType": "bool", "name": "isEnded", "type": "bool" } ], - "internalType": "struct LBHooksLens.Token", - "name": "rewardToken", + "internalType": "struct LBHooksLens.Parameters", + "name": "parameters", "type": "tuple" }, - { "internalType": "uint256", "name": "pid", "type": "uint256" }, - { - "internalType": "uint256", - "name": "moePerSecond", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "activeId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "rangeStart", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "rangeEnd", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "pendingRewards", - "type": "uint256" - } + { "internalType": "uint256", "name": "activeId", "type": "uint256" } ], "internalType": "struct LBHooksLens.HooksRewarderData", "name": "rewarderData", @@ -466,16 +488,8 @@ "components": [ { "components": [ - { - "internalType": "address", - "name": "hooks", - "type": "address" - }, - { - "internalType": "bool", - "name": "beforeSwap", - "type": "bool" - }, + { "internalType": "address", "name": "hooks", "type": "address" }, + { "internalType": "bool", "name": "beforeSwap", "type": "bool" }, { "internalType": "bool", "name": "afterSwap", "type": "bool" }, { "internalType": "bool", @@ -487,17 +501,9 @@ "name": "afterFlashLoan", "type": "bool" }, - { - "internalType": "bool", - "name": "beforeMint", - "type": "bool" - }, + { "internalType": "bool", "name": "beforeMint", "type": "bool" }, { "internalType": "bool", "name": "afterMint", "type": "bool" }, - { - "internalType": "bool", - "name": "beforeBurn", - "type": "bool" - }, + { "internalType": "bool", "name": "beforeBurn", "type": "bool" }, { "internalType": "bool", "name": "afterBurn", "type": "bool" }, { "internalType": "bool", @@ -514,6 +520,130 @@ "name": "hooksParameters", "type": "tuple" }, + { + "components": [ + { + "internalType": "enum ILBHooksManager.LBHooksType", + "name": "hooksType", + "type": "uint8" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "decimals", + "type": "uint256" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + } + ], + "internalType": "struct LBHooksLens.Token", + "name": "rewardToken", + "type": "tuple" + }, + { "internalType": "uint256", "name": "pid", "type": "uint256" }, + { + "internalType": "uint256", + "name": "moePerSecond", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "activeId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rangeStart", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rangeEnd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pendingRewards", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rewardPerSecond", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastUpdateTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "endTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "remainingRewards", + "type": "uint256" + }, + { "internalType": "bool", "name": "isStarted", "type": "bool" }, + { "internalType": "bool", "name": "isEnded", "type": "bool" } + ], + "internalType": "struct LBHooksLens.Parameters", + "name": "parameters", + "type": "tuple" + }, + { "internalType": "uint256", "name": "activeId", "type": "uint256" } + ], + "internalType": "struct LBHooksLens.HooksRewarderData", + "name": "extraRewarderData", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "rewarder", "type": "address" } + ], + "name": "getLBHooksType", + "outputs": [ + { + "internalType": "enum ILBHooksManager.LBHooksType", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "pid", "type": "uint256" }], + "name": "getMoePerSecond", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "hooks", "type": "address" }, + { "internalType": "address", "name": "user", "type": "address" }, + { "internalType": "uint256[]", "name": "ids", "type": "uint256[]" } + ], + "name": "getParametersOf", + "outputs": [ + { + "components": [ { "internalType": "enum ILBHooksManager.LBHooksType", "name": "hooksType", @@ -521,11 +651,7 @@ }, { "components": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, + { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "decimals", @@ -537,79 +663,55 @@ "name": "rewardToken", "type": "tuple" }, + { "internalType": "uint256", "name": "pid", "type": "uint256" }, { "internalType": "uint256", - "name": "rewardPerSecond", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lastUpdateTimestamp", + "name": "moePerSecond", "type": "uint256" }, + { "internalType": "uint256", "name": "activeId", "type": "uint256" }, { "internalType": "uint256", - "name": "endTimestamp", + "name": "rangeStart", "type": "uint256" }, + { "internalType": "uint256", "name": "rangeEnd", "type": "uint256" }, { "internalType": "uint256", - "name": "remainingRewards", + "name": "pendingRewards", "type": "uint256" }, { "internalType": "uint256", - "name": "activeId", + "name": "rewardPerSecond", "type": "uint256" }, { "internalType": "uint256", - "name": "rangeStart", + "name": "lastUpdateTimestamp", "type": "uint256" }, { "internalType": "uint256", - "name": "rangeEnd", + "name": "endTimestamp", "type": "uint256" }, { "internalType": "uint256", - "name": "pendingRewards", + "name": "remainingRewards", "type": "uint256" }, { "internalType": "bool", "name": "isStarted", "type": "bool" }, { "internalType": "bool", "name": "isEnded", "type": "bool" } ], - "internalType": "struct LBHooksLens.ExtraHooksRewarderData", - "name": "extraRewarderData", + "internalType": "struct LBHooksLens.Parameters", + "name": "parameters", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { "internalType": "address", "name": "rewarder", "type": "address" } - ], - "name": "getLBHooksType", - "outputs": [ - { - "internalType": "enum ILBHooksManager.LBHooksType", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "pid", "type": "uint256" }], - "name": "getMoePerSecond", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { "internalType": "address", "name": "rewarder", "type": "address" }, @@ -632,11 +734,7 @@ }, { "inputs": [ - { - "internalType": "address", - "name": "extraRewarder", - "type": "address" - } + { "internalType": "address", "name": "extraRewarder", "type": "address" } ], "name": "getRemainingRewards", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], @@ -652,11 +750,7 @@ { "components": [ { "internalType": "address", "name": "token", "type": "address" }, - { - "internalType": "uint256", - "name": "decimals", - "type": "uint256" - }, + { "internalType": "uint256", "name": "decimals", "type": "uint256" }, { "internalType": "string", "name": "symbol", "type": "string" } ], "internalType": "struct LBHooksLens.Token", @@ -681,11 +775,7 @@ }, { "inputs": [ - { - "internalType": "address", - "name": "extraRewarder", - "type": "address" - } + { "internalType": "address", "name": "extraRewarder", "type": "address" } ], "name": "getRewarderParameter", "outputs": [ diff --git a/packages/v2/src/abis/ts/LBHooksLens.ts b/packages/v2/src/abis/ts/LBHooksLens.ts index 2082477..07b5ad3 100644 --- a/packages/v2/src/abis/ts/LBHooksLens.ts +++ b/packages/v2/src/abis/ts/LBHooksLens.ts @@ -1,11 +1,7 @@ export const LBHooksLensABI = [ { inputs: [ - { - internalType: 'address', - name: 'lbHooksManager', - type: 'address' - }, + { internalType: 'address', name: 'lbHooksManager', type: 'address' }, { internalType: 'address', name: 'masterChef', type: 'address' } ], stateMutability: 'nonpayable', @@ -30,38 +26,14 @@ export const LBHooksLensABI = [ components: [ { components: [ - { - internalType: 'address', - name: 'hooks', - type: 'address' - }, - { - internalType: 'bool', - name: 'beforeSwap', - type: 'bool' - }, + { internalType: 'address', name: 'hooks', type: 'address' }, + { internalType: 'bool', name: 'beforeSwap', type: 'bool' }, { internalType: 'bool', name: 'afterSwap', type: 'bool' }, - { - internalType: 'bool', - name: 'beforeFlashLoan', - type: 'bool' - }, - { - internalType: 'bool', - name: 'afterFlashLoan', - type: 'bool' - }, - { - internalType: 'bool', - name: 'beforeMint', - type: 'bool' - }, + { internalType: 'bool', name: 'beforeFlashLoan', type: 'bool' }, + { internalType: 'bool', name: 'afterFlashLoan', type: 'bool' }, + { internalType: 'bool', name: 'beforeMint', type: 'bool' }, { internalType: 'bool', name: 'afterMint', type: 'bool' }, - { - internalType: 'bool', - name: 'beforeBurn', - type: 'bool' - }, + { internalType: 'bool', name: 'beforeBurn', type: 'bool' }, { internalType: 'bool', name: 'afterBurn', type: 'bool' }, { internalType: 'bool', @@ -78,55 +50,69 @@ export const LBHooksLensABI = [ name: 'hooksParameters', type: 'tuple' }, - { - internalType: 'enum ILBHooksManager.LBHooksType', - name: 'hooksType', - type: 'uint8' - }, { components: [ { - internalType: 'address', - name: 'token', - type: 'address' + internalType: 'enum ILBHooksManager.LBHooksType', + name: 'hooksType', + type: 'uint8' }, + { + components: [ + { internalType: 'address', name: 'token', type: 'address' }, + { + internalType: 'uint256', + name: 'decimals', + type: 'uint256' + }, + { internalType: 'string', name: 'symbol', type: 'string' } + ], + internalType: 'struct LBHooksLens.Token', + name: 'rewardToken', + type: 'tuple' + }, + { internalType: 'uint256', name: 'pid', type: 'uint256' }, { internalType: 'uint256', - name: 'decimals', + name: 'moePerSecond', type: 'uint256' }, - { internalType: 'string', name: 'symbol', type: 'string' } + { internalType: 'uint256', name: 'activeId', type: 'uint256' }, + { internalType: 'uint256', name: 'rangeStart', type: 'uint256' }, + { internalType: 'uint256', name: 'rangeEnd', type: 'uint256' }, + { + internalType: 'uint256', + name: 'pendingRewards', + type: 'uint256' + }, + { + internalType: 'uint256', + name: 'rewardPerSecond', + type: 'uint256' + }, + { + internalType: 'uint256', + name: 'lastUpdateTimestamp', + type: 'uint256' + }, + { + internalType: 'uint256', + name: 'endTimestamp', + type: 'uint256' + }, + { + internalType: 'uint256', + name: 'remainingRewards', + type: 'uint256' + }, + { internalType: 'bool', name: 'isStarted', type: 'bool' }, + { internalType: 'bool', name: 'isEnded', type: 'bool' } ], - internalType: 'struct LBHooksLens.Token', - name: 'rewardToken', + internalType: 'struct LBHooksLens.Parameters', + name: 'parameters', type: 'tuple' }, - { internalType: 'uint256', name: 'pid', type: 'uint256' }, - { - internalType: 'uint256', - name: 'moePerSecond', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'activeId', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'rangeStart', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'rangeEnd', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'pendingRewards', - type: 'uint256' - } + { internalType: 'uint256', name: 'activeId', type: 'uint256' } ], internalType: 'struct LBHooksLens.HooksRewarderData[]', name: 'rewarderData', @@ -136,38 +122,14 @@ export const LBHooksLensABI = [ components: [ { components: [ - { - internalType: 'address', - name: 'hooks', - type: 'address' - }, - { - internalType: 'bool', - name: 'beforeSwap', - type: 'bool' - }, + { internalType: 'address', name: 'hooks', type: 'address' }, + { internalType: 'bool', name: 'beforeSwap', type: 'bool' }, { internalType: 'bool', name: 'afterSwap', type: 'bool' }, - { - internalType: 'bool', - name: 'beforeFlashLoan', - type: 'bool' - }, - { - internalType: 'bool', - name: 'afterFlashLoan', - type: 'bool' - }, - { - internalType: 'bool', - name: 'beforeMint', - type: 'bool' - }, + { internalType: 'bool', name: 'beforeFlashLoan', type: 'bool' }, + { internalType: 'bool', name: 'afterFlashLoan', type: 'bool' }, + { internalType: 'bool', name: 'beforeMint', type: 'bool' }, { internalType: 'bool', name: 'afterMint', type: 'bool' }, - { - internalType: 'bool', - name: 'beforeBurn', - type: 'bool' - }, + { internalType: 'bool', name: 'beforeBurn', type: 'bool' }, { internalType: 'bool', name: 'afterBurn', type: 'bool' }, { internalType: 'bool', @@ -184,73 +146,71 @@ export const LBHooksLensABI = [ name: 'hooksParameters', type: 'tuple' }, - { - internalType: 'enum ILBHooksManager.LBHooksType', - name: 'hooksType', - type: 'uint8' - }, { components: [ { - internalType: 'address', - name: 'token', - type: 'address' + internalType: 'enum ILBHooksManager.LBHooksType', + name: 'hooksType', + type: 'uint8' + }, + { + components: [ + { internalType: 'address', name: 'token', type: 'address' }, + { + internalType: 'uint256', + name: 'decimals', + type: 'uint256' + }, + { internalType: 'string', name: 'symbol', type: 'string' } + ], + internalType: 'struct LBHooksLens.Token', + name: 'rewardToken', + type: 'tuple' }, + { internalType: 'uint256', name: 'pid', type: 'uint256' }, { internalType: 'uint256', - name: 'decimals', + name: 'moePerSecond', type: 'uint256' }, - { internalType: 'string', name: 'symbol', type: 'string' } + { internalType: 'uint256', name: 'activeId', type: 'uint256' }, + { internalType: 'uint256', name: 'rangeStart', type: 'uint256' }, + { internalType: 'uint256', name: 'rangeEnd', type: 'uint256' }, + { + internalType: 'uint256', + name: 'pendingRewards', + type: 'uint256' + }, + { + internalType: 'uint256', + name: 'rewardPerSecond', + type: 'uint256' + }, + { + internalType: 'uint256', + name: 'lastUpdateTimestamp', + type: 'uint256' + }, + { + internalType: 'uint256', + name: 'endTimestamp', + type: 'uint256' + }, + { + internalType: 'uint256', + name: 'remainingRewards', + type: 'uint256' + }, + { internalType: 'bool', name: 'isStarted', type: 'bool' }, + { internalType: 'bool', name: 'isEnded', type: 'bool' } ], - internalType: 'struct LBHooksLens.Token', - name: 'rewardToken', + internalType: 'struct LBHooksLens.Parameters', + name: 'parameters', type: 'tuple' }, - { - internalType: 'uint256', - name: 'rewardPerSecond', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'lastUpdateTimestamp', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'endTimestamp', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'remainingRewards', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'activeId', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'rangeStart', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'rangeEnd', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'pendingRewards', - type: 'uint256' - }, - { internalType: 'bool', name: 'isStarted', type: 'bool' }, - { internalType: 'bool', name: 'isEnded', type: 'bool' } + { internalType: 'uint256', name: 'activeId', type: 'uint256' } ], - internalType: 'struct LBHooksLens.ExtraHooksRewarderData[]', + internalType: 'struct LBHooksLens.HooksRewarderData[]', name: 'extraRewarderData', type: 'tuple[]' } @@ -267,16 +227,8 @@ export const LBHooksLensABI = [ { internalType: 'address', name: 'hooks', type: 'address' }, { internalType: 'bool', name: 'beforeSwap', type: 'bool' }, { internalType: 'bool', name: 'afterSwap', type: 'bool' }, - { - internalType: 'bool', - name: 'beforeFlashLoan', - type: 'bool' - }, - { - internalType: 'bool', - name: 'afterFlashLoan', - type: 'bool' - }, + { internalType: 'bool', name: 'beforeFlashLoan', type: 'bool' }, + { internalType: 'bool', name: 'afterFlashLoan', type: 'bool' }, { internalType: 'bool', name: 'beforeMint', type: 'bool' }, { internalType: 'bool', name: 'afterMint', type: 'bool' }, { internalType: 'bool', name: 'beforeBurn', type: 'bool' }, @@ -286,11 +238,7 @@ export const LBHooksLensABI = [ name: 'beforeBatchTransferFrom', type: 'bool' }, - { - internalType: 'bool', - name: 'afterBatchTransferFrom', - type: 'bool' - } + { internalType: 'bool', name: 'afterBatchTransferFrom', type: 'bool' } ], internalType: 'struct Hooks.Parameters', name: '', @@ -309,16 +257,8 @@ export const LBHooksLensABI = [ { internalType: 'address', name: 'hooks', type: 'address' }, { internalType: 'bool', name: 'beforeSwap', type: 'bool' }, { internalType: 'bool', name: 'afterSwap', type: 'bool' }, - { - internalType: 'bool', - name: 'beforeFlashLoan', - type: 'bool' - }, - { - internalType: 'bool', - name: 'afterFlashLoan', - type: 'bool' - }, + { internalType: 'bool', name: 'beforeFlashLoan', type: 'bool' }, + { internalType: 'bool', name: 'afterFlashLoan', type: 'bool' }, { internalType: 'bool', name: 'beforeMint', type: 'bool' }, { internalType: 'bool', name: 'afterMint', type: 'bool' }, { internalType: 'bool', name: 'beforeBurn', type: 'bool' }, @@ -328,11 +268,7 @@ export const LBHooksLensABI = [ name: 'beforeBatchTransferFrom', type: 'bool' }, - { - internalType: 'bool', - name: 'afterBatchTransferFrom', - type: 'bool' - } + { internalType: 'bool', name: 'afterBatchTransferFrom', type: 'bool' } ], internalType: 'struct Hooks.Parameters', name: '', @@ -354,38 +290,14 @@ export const LBHooksLensABI = [ components: [ { components: [ - { - internalType: 'address', - name: 'hooks', - type: 'address' - }, - { - internalType: 'bool', - name: 'beforeSwap', - type: 'bool' - }, + { internalType: 'address', name: 'hooks', type: 'address' }, + { internalType: 'bool', name: 'beforeSwap', type: 'bool' }, { internalType: 'bool', name: 'afterSwap', type: 'bool' }, - { - internalType: 'bool', - name: 'beforeFlashLoan', - type: 'bool' - }, - { - internalType: 'bool', - name: 'afterFlashLoan', - type: 'bool' - }, - { - internalType: 'bool', - name: 'beforeMint', - type: 'bool' - }, + { internalType: 'bool', name: 'beforeFlashLoan', type: 'bool' }, + { internalType: 'bool', name: 'afterFlashLoan', type: 'bool' }, + { internalType: 'bool', name: 'beforeMint', type: 'bool' }, { internalType: 'bool', name: 'afterMint', type: 'bool' }, - { - internalType: 'bool', - name: 'beforeBurn', - type: 'bool' - }, + { internalType: 'bool', name: 'beforeBurn', type: 'bool' }, { internalType: 'bool', name: 'afterBurn', type: 'bool' }, { internalType: 'bool', @@ -402,55 +314,69 @@ export const LBHooksLensABI = [ name: 'hooksParameters', type: 'tuple' }, - { - internalType: 'enum ILBHooksManager.LBHooksType', - name: 'hooksType', - type: 'uint8' - }, { components: [ { - internalType: 'address', - name: 'token', - type: 'address' + internalType: 'enum ILBHooksManager.LBHooksType', + name: 'hooksType', + type: 'uint8' + }, + { + components: [ + { internalType: 'address', name: 'token', type: 'address' }, + { + internalType: 'uint256', + name: 'decimals', + type: 'uint256' + }, + { internalType: 'string', name: 'symbol', type: 'string' } + ], + internalType: 'struct LBHooksLens.Token', + name: 'rewardToken', + type: 'tuple' }, + { internalType: 'uint256', name: 'pid', type: 'uint256' }, { internalType: 'uint256', - name: 'decimals', + name: 'moePerSecond', type: 'uint256' }, - { internalType: 'string', name: 'symbol', type: 'string' } + { internalType: 'uint256', name: 'activeId', type: 'uint256' }, + { internalType: 'uint256', name: 'rangeStart', type: 'uint256' }, + { internalType: 'uint256', name: 'rangeEnd', type: 'uint256' }, + { + internalType: 'uint256', + name: 'pendingRewards', + type: 'uint256' + }, + { + internalType: 'uint256', + name: 'rewardPerSecond', + type: 'uint256' + }, + { + internalType: 'uint256', + name: 'lastUpdateTimestamp', + type: 'uint256' + }, + { + internalType: 'uint256', + name: 'endTimestamp', + type: 'uint256' + }, + { + internalType: 'uint256', + name: 'remainingRewards', + type: 'uint256' + }, + { internalType: 'bool', name: 'isStarted', type: 'bool' }, + { internalType: 'bool', name: 'isEnded', type: 'bool' } ], - internalType: 'struct LBHooksLens.Token', - name: 'rewardToken', + internalType: 'struct LBHooksLens.Parameters', + name: 'parameters', type: 'tuple' }, - { internalType: 'uint256', name: 'pid', type: 'uint256' }, - { - internalType: 'uint256', - name: 'moePerSecond', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'activeId', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'rangeStart', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'rangeEnd', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'pendingRewards', - type: 'uint256' - } + { internalType: 'uint256', name: 'activeId', type: 'uint256' } ], internalType: 'struct LBHooksLens.HooksRewarderData', name: 'rewarderData', @@ -460,38 +386,14 @@ export const LBHooksLensABI = [ components: [ { components: [ - { - internalType: 'address', - name: 'hooks', - type: 'address' - }, - { - internalType: 'bool', - name: 'beforeSwap', - type: 'bool' - }, + { internalType: 'address', name: 'hooks', type: 'address' }, + { internalType: 'bool', name: 'beforeSwap', type: 'bool' }, { internalType: 'bool', name: 'afterSwap', type: 'bool' }, - { - internalType: 'bool', - name: 'beforeFlashLoan', - type: 'bool' - }, - { - internalType: 'bool', - name: 'afterFlashLoan', - type: 'bool' - }, - { - internalType: 'bool', - name: 'beforeMint', - type: 'bool' - }, + { internalType: 'bool', name: 'beforeFlashLoan', type: 'bool' }, + { internalType: 'bool', name: 'afterFlashLoan', type: 'bool' }, + { internalType: 'bool', name: 'beforeMint', type: 'bool' }, { internalType: 'bool', name: 'afterMint', type: 'bool' }, - { - internalType: 'bool', - name: 'beforeBurn', - type: 'bool' - }, + { internalType: 'bool', name: 'beforeBurn', type: 'bool' }, { internalType: 'bool', name: 'afterBurn', type: 'bool' }, { internalType: 'bool', @@ -508,73 +410,71 @@ export const LBHooksLensABI = [ name: 'hooksParameters', type: 'tuple' }, - { - internalType: 'enum ILBHooksManager.LBHooksType', - name: 'hooksType', - type: 'uint8' - }, { components: [ { - internalType: 'address', - name: 'token', - type: 'address' + internalType: 'enum ILBHooksManager.LBHooksType', + name: 'hooksType', + type: 'uint8' + }, + { + components: [ + { internalType: 'address', name: 'token', type: 'address' }, + { + internalType: 'uint256', + name: 'decimals', + type: 'uint256' + }, + { internalType: 'string', name: 'symbol', type: 'string' } + ], + internalType: 'struct LBHooksLens.Token', + name: 'rewardToken', + type: 'tuple' }, + { internalType: 'uint256', name: 'pid', type: 'uint256' }, { internalType: 'uint256', - name: 'decimals', + name: 'moePerSecond', type: 'uint256' }, - { internalType: 'string', name: 'symbol', type: 'string' } + { internalType: 'uint256', name: 'activeId', type: 'uint256' }, + { internalType: 'uint256', name: 'rangeStart', type: 'uint256' }, + { internalType: 'uint256', name: 'rangeEnd', type: 'uint256' }, + { + internalType: 'uint256', + name: 'pendingRewards', + type: 'uint256' + }, + { + internalType: 'uint256', + name: 'rewardPerSecond', + type: 'uint256' + }, + { + internalType: 'uint256', + name: 'lastUpdateTimestamp', + type: 'uint256' + }, + { + internalType: 'uint256', + name: 'endTimestamp', + type: 'uint256' + }, + { + internalType: 'uint256', + name: 'remainingRewards', + type: 'uint256' + }, + { internalType: 'bool', name: 'isStarted', type: 'bool' }, + { internalType: 'bool', name: 'isEnded', type: 'bool' } ], - internalType: 'struct LBHooksLens.Token', - name: 'rewardToken', + internalType: 'struct LBHooksLens.Parameters', + name: 'parameters', type: 'tuple' }, - { - internalType: 'uint256', - name: 'rewardPerSecond', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'lastUpdateTimestamp', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'endTimestamp', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'remainingRewards', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'activeId', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'rangeStart', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'rangeEnd', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'pendingRewards', - type: 'uint256' - }, - { internalType: 'bool', name: 'isStarted', type: 'bool' }, - { internalType: 'bool', name: 'isEnded', type: 'bool' } + { internalType: 'uint256', name: 'activeId', type: 'uint256' } ], - internalType: 'struct LBHooksLens.ExtraHooksRewarderData', + internalType: 'struct LBHooksLens.HooksRewarderData', name: 'extraRewarderData', type: 'tuple' } @@ -602,6 +502,60 @@ export const LBHooksLensABI = [ stateMutability: 'view', type: 'function' }, + { + inputs: [ + { internalType: 'address', name: 'hooks', type: 'address' }, + { internalType: 'address', name: 'user', type: 'address' }, + { internalType: 'uint256[]', name: 'ids', type: 'uint256[]' } + ], + name: 'getParametersOf', + outputs: [ + { + components: [ + { + internalType: 'enum ILBHooksManager.LBHooksType', + name: 'hooksType', + type: 'uint8' + }, + { + components: [ + { internalType: 'address', name: 'token', type: 'address' }, + { internalType: 'uint256', name: 'decimals', type: 'uint256' }, + { internalType: 'string', name: 'symbol', type: 'string' } + ], + internalType: 'struct LBHooksLens.Token', + name: 'rewardToken', + type: 'tuple' + }, + { internalType: 'uint256', name: 'pid', type: 'uint256' }, + { internalType: 'uint256', name: 'moePerSecond', type: 'uint256' }, + { internalType: 'uint256', name: 'activeId', type: 'uint256' }, + { internalType: 'uint256', name: 'rangeStart', type: 'uint256' }, + { internalType: 'uint256', name: 'rangeEnd', type: 'uint256' }, + { internalType: 'uint256', name: 'pendingRewards', type: 'uint256' }, + { internalType: 'uint256', name: 'rewardPerSecond', type: 'uint256' }, + { + internalType: 'uint256', + name: 'lastUpdateTimestamp', + type: 'uint256' + }, + { internalType: 'uint256', name: 'endTimestamp', type: 'uint256' }, + { + internalType: 'uint256', + name: 'remainingRewards', + type: 'uint256' + }, + { internalType: 'bool', name: 'isStarted', type: 'bool' }, + { internalType: 'bool', name: 'isEnded', type: 'bool' } + ], + internalType: 'struct LBHooksLens.Parameters', + name: 'parameters', + type: 'tuple' + } + ], + stateMutability: 'view', + type: 'function' + }, { inputs: [ { internalType: 'address', name: 'rewarder', type: 'address' }, @@ -622,11 +576,7 @@ export const LBHooksLensABI = [ }, { inputs: [ - { - internalType: 'address', - name: 'extraRewarder', - type: 'address' - } + { internalType: 'address', name: 'extraRewarder', type: 'address' } ], name: 'getRemainingRewards', outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], @@ -640,11 +590,7 @@ export const LBHooksLensABI = [ { components: [ { internalType: 'address', name: 'token', type: 'address' }, - { - internalType: 'uint256', - name: 'decimals', - type: 'uint256' - }, + { internalType: 'uint256', name: 'decimals', type: 'uint256' }, { internalType: 'string', name: 'symbol', type: 'string' } ], internalType: 'struct LBHooksLens.Token', @@ -667,11 +613,7 @@ export const LBHooksLensABI = [ }, { inputs: [ - { - internalType: 'address', - name: 'extraRewarder', - type: 'address' - } + { internalType: 'address', name: 'extraRewarder', type: 'address' } ], name: 'getRewarderParameter', outputs: [