diff --git a/package-lock.json b/package-lock.json
index 391b021..3d6f2c7 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "dao-v2-ui",
- "version": "0.3.1",
+ "version": "0.4.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "dao-v2-ui",
- "version": "0.3.1",
+ "version": "0.4.0",
"hasInstallScript": true,
"dependencies": {
"@rainbow-me/rainbowkit": "^0.12.8",
diff --git a/package.json b/package.json
index 3185053..6500a08 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "dao-v2-ui",
- "version": "0.3.1",
+ "version": "0.4.0",
"private": true,
"homepage": ".",
"dependencies": {
diff --git a/src/components/complex/CreateProposalModal/index.jsx b/src/components/complex/CreateProposalModal/index.jsx
index fc8e7be..cc5df3a 100644
--- a/src/components/complex/CreateProposalModal/index.jsx
+++ b/src/components/complex/CreateProposalModal/index.jsx
@@ -22,6 +22,7 @@ import Select from '../../base/Select'
import AssetSelection from '../AssetSelection'
import ChainSelection from '../ChainSelection'
import { FaEye, FaEyeSlash } from 'react-icons/fa'
+import MerklDistributionFormula from '../MerklDistributionFormula'
const UseScriptText = styled(Text)`
font-size: 13px;
@@ -101,6 +102,12 @@ const CreateProposalModal = ({ show, onClose }) => {
)
+ case 'MerklDistributionFormula':
+ return (
+
+
+
+ )
case 'AssetSelection':
return
case 'Input':
diff --git a/src/components/complex/MerklDistributionFormula/index.jsx b/src/components/complex/MerklDistributionFormula/index.jsx
new file mode 100644
index 0000000..eae0a34
--- /dev/null
+++ b/src/components/complex/MerklDistributionFormula/index.jsx
@@ -0,0 +1,27 @@
+import Text from '../../base/Text'
+import Input from '../../base/Input'
+import { Col, Row } from 'react-bootstrap'
+
+const MerklDistributionFormula = (props) => {
+ return (
+
+ Distribution Formula:
+
+
+ % PNT
+
+
+
+ % wETH
+
+
+
+ % Fees
+
+
+
+
+ )
+}
+
+export default MerklDistributionFormula
diff --git a/src/settings/index.js b/src/settings/index.js
index 5aa88c1..82b264a 100644
--- a/src/settings/index.js
+++ b/src/settings/index.js
@@ -23,7 +23,8 @@ const settings = {
registrationManager: '0x906B067e392e2c5f9E4f101f36C0b8CdA4885EBf',
feesManager: '0xDf951d2061b12922BFbF22cb17B17f3b39183570',
pNetworkAssociationGnosisSafeAddress: '0xf1f6568a76559d85cF68E6597fA587544184dD46',
- pNetworkV2EthereumVaultAddess: '0xe396757ec7e6ac7c8e5abe7285dde47b98f22db8'
+ pNetworkV2EthereumVaultAddess: '0xe396757ec7e6ac7c8e5abe7285dde47b98f22db8',
+ merklDistributionCreatorAddress: '0x8BB4C975Ff3c250e0ceEA271728547f3802B36Fd'
},
stakingManager: {
minStakeDays: 7,
@@ -35,6 +36,7 @@ const settings = {
estimatedSentinelRunningCost: 150
},
explorer: 'https://etherscan.io',
+ zeroAddress: '0x0000000000000000000000000000000000000000',
assets: [
{
address: '0xf4ea6b892853413bd9d9f1a5d3a620a0ba39c5b2',
diff --git a/src/utils/__tests__/createMerklInflation.test.js b/src/utils/__tests__/createMerklInflation.test.js
new file mode 100644
index 0000000..49dfa30
--- /dev/null
+++ b/src/utils/__tests__/createMerklInflation.test.js
@@ -0,0 +1,47 @@
+import { readContract } from '@wagmi/core'
+import { BigNumber } from 'ethers'
+
+import { getVotePresets } from '../vote-presets'
+import { encodeCallScript } from '../voting-scripts'
+
+jest.mock('@wagmi/core', () => ({
+ readContract: jest.fn()
+}))
+
+describe('createMerklInflation', () => {
+ test('Should match the generated script', async () => {
+ readContract.mockReturnValueOnce(BigNumber.from(19939)).mockReturnValueOnce(BigNumber.from(3324))
+ const now = jest.spyOn(Date, 'now').mockReturnValue(1706263938885)
+ const presets = getVotePresets({
+ presetParams: { 0: '0x35fa1ac87b9bc3baf1ca6f0ce5f8aa560c63336b', 1: '300000', 2: '3' },
+ setPresetParams: () => null,
+ provider: () => null
+ })
+ const preset = presets['createMerklIncentive']
+ const actions = await preset.prepare()
+ const script = encodeCallScript(actions)
+
+ const expectedScript =
+ '0x00000001f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b2000000443352d49b000000000000000000000000dd92eb1478d3189707ab7f4a5ace3a615cdd0476000000000000000000000000000000000000000000003f870857a3e0e3800000dd92eb1478d3189707ab7f4a5ace3a615cdd047600000064beabacc8000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b20000000000000000000000002211bfd97b1c02ae8ac305d206e9780ba7d8bff4000000000000000000000000000000000000000000003f870857a3e0e3800000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b200000044095ea7b30000000000000000000000008bb4c975ff3c250e0ceea271728547f3802b36fd000000000000000000000000000000000000000000003f870857a3e0e38000008bb4c975ff3c250e0ceea271728547f3802b36fd00000284b9d81abc00000000000000000000000000000000000000000000000000000000000000208f64e5520227fad5882d70fe4c16eeb6977ed4a82c26b6cd786e9e9dfd9d06fe00000000000000000000000035fa1ac87b9bc3baf1ca6f0ce5f8aa560c63336b000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b2000000000000000000000000000000000000000000003f870857a3e0e380000000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001194000000000000000000000000000000000000000000000000000000000000119400000000000000000000000000000000000000000000000000000000000003e80000000000000000000000000000000000000000000000000000000065ba2a1300000000000000000000000000000000000000000000000000000000000007e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000208f64e5520227fad5882d70fe4c16eeb6977ed4a82c26b6cd786e9e9dfd9d06fe'
+
+ expect(script).toStrictEqual(expectedScript)
+ })
+
+ test('Should match the generated script with custom distribution formula', async () => {
+ readContract.mockReturnValueOnce(BigNumber.from(19939)).mockReturnValueOnce(BigNumber.from(3324))
+ const now = jest.spyOn(Date, 'now').mockReturnValue(1706263938885)
+ const presets = getVotePresets({
+ presetParams: { 0: '0x35fa1ac87b9bc3baf1ca6f0ce5f8aa560c63336b', 1: '300000', 2: '3', 3: '65', 4: '15', 5: '20' },
+ setPresetParams: () => null,
+ provider: () => null
+ })
+ const preset = presets['createMerklIncentive']
+ const actions = await preset.prepare()
+ const script = encodeCallScript(actions)
+
+ const expectedScript =
+ '0x00000001f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b2000000443352d49b000000000000000000000000dd92eb1478d3189707ab7f4a5ace3a615cdd0476000000000000000000000000000000000000000000003f870857a3e0e3800000dd92eb1478d3189707ab7f4a5ace3a615cdd047600000064beabacc8000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b20000000000000000000000002211bfd97b1c02ae8ac305d206e9780ba7d8bff4000000000000000000000000000000000000000000003f870857a3e0e3800000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b200000044095ea7b30000000000000000000000008bb4c975ff3c250e0ceea271728547f3802b36fd000000000000000000000000000000000000000000003f870857a3e0e38000008bb4c975ff3c250e0ceea271728547f3802b36fd00000284b9d81abc00000000000000000000000000000000000000000000000000000000000000208f64e5520227fad5882d70fe4c16eeb6977ed4a82c26b6cd786e9e9dfd9d06fe00000000000000000000000035fa1ac87b9bc3baf1ca6f0ce5f8aa560c63336b000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b2000000000000000000000000000000000000000000003f870857a3e0e380000000000000000000000000000000000000000000000000000000000000000001e00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000196400000000000000000000000000000000000000000000000000000000000005dc00000000000000000000000000000000000000000000000000000000000007d00000000000000000000000000000000000000000000000000000000065ba2a1300000000000000000000000000000000000000000000000000000000000007e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000208f64e5520227fad5882d70fe4c16eeb6977ed4a82c26b6cd786e9e9dfd9d06fe'
+
+ expect(script).toStrictEqual(expectedScript)
+ })
+})
diff --git a/src/utils/__tests__/withdrawInflation.test.js b/src/utils/__tests__/withdrawInflation.test.js
index 0683156..69e7963 100644
--- a/src/utils/__tests__/withdrawInflation.test.js
+++ b/src/utils/__tests__/withdrawInflation.test.js
@@ -1,46 +1,7 @@
-import { ethers } from 'ethers'
-
import { getVotePresets } from '../vote-presets'
import { encodeCallScript } from '../voting-scripts'
-import { ethPNTContract, pNetworkV2Vault, vaultContract } from '../presets/utils'
-import BigNumber from 'bignumber.js'
-
-const DAO_V1_VOTING_ADDRESS = '0x2211bFD97b1c02aE8Ac305d206e9780ba7D8BfF4'
-const DAO_V1_TREASURY_ADDRESS = '0xDd92eb1478D3189707aB7F4a5aCE3a615cdD0476'
-const ETHPNT_ADDRESS = '0xf4ea6b892853413bd9d9f1a5d3a620a0ba39c5b2'
-const PNETWORKV2_VAULT_ADDRESS = '0xe396757ec7e6ac7c8e5abe7285dde47b98f22db8'
describe('withdrawInflationAndPegin', () => {
- const getLiquidityPoolsPresetActions = (_destinationAddress, _amount, _userData, _destinationChainId) => {
- const withdrawInflationCalldata = ethPNTContract.encodeFunctionData('withdrawInflation', [
- DAO_V1_TREASURY_ADDRESS,
- _amount
- ])
-
- const transferCalldata = vaultContract.encodeFunctionData('transfer', [
- ETHPNT_ADDRESS,
- DAO_V1_VOTING_ADDRESS,
- _amount
- ])
-
- const approveCalldata = ethPNTContract.encodeFunctionData('approve', [PNETWORKV2_VAULT_ADDRESS, _amount])
-
- const pegInCalldata = pNetworkV2Vault.encodeFunctionData('pegIn(uint256, address, string, bytes, bytes4)', [
- _amount,
- ETHPNT_ADDRESS,
- _destinationAddress,
- _userData,
- _destinationChainId
- ])
-
- return [
- { to: ETHPNT_ADDRESS, calldata: withdrawInflationCalldata },
- { to: DAO_V1_TREASURY_ADDRESS, calldata: transferCalldata },
- { to: ETHPNT_ADDRESS, calldata: approveCalldata },
- { to: PNETWORKV2_VAULT_ADDRESS, calldata: pegInCalldata }
- ]
- }
-
test('Should match the generated script', async () => {
const presets = getVotePresets({
presetParams: { 0: '1', 2: '0xa41657bf225F8Ec7E2010C89c3F084172948264D' },
diff --git a/src/utils/abis/MerklDistributionCreator.json b/src/utils/abis/MerklDistributionCreator.json
new file mode 100644
index 0000000..656057d
--- /dev/null
+++ b/src/utils/abis/MerklDistributionCreator.json
@@ -0,0 +1,4693 @@
+[
+ {
+ "inputs": [],
+ "stateMutability": "nonpayable",
+ "type": "constructor"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidLengths",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidParam",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidReward",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidSignature",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "NotGovernorOrGuardian",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "NotSigned",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "ZeroAddress",
+ "type": "error"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "previousAdmin",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "newAdmin",
+ "type": "address"
+ }
+ ],
+ "name": "AdminChanged",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "beacon",
+ "type": "address"
+ }
+ ],
+ "name": "BeaconUpgraded",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "_distributor",
+ "type": "address"
+ }
+ ],
+ "name": "DistributorUpdated",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "user",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "userFeeRebate",
+ "type": "uint256"
+ }
+ ],
+ "name": "FeeRebateUpdated",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "_feeRecipient",
+ "type": "address"
+ }
+ ],
+ "name": "FeeRecipientUpdated",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "_fees",
+ "type": "uint256"
+ }
+ ],
+ "name": "FeesSet",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "uint8",
+ "name": "version",
+ "type": "uint8"
+ }
+ ],
+ "name": "Initialized",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "bytes32",
+ "name": "_messageHash",
+ "type": "bytes32"
+ }
+ ],
+ "name": "MessageUpdated",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "bytes32",
+ "name": "rewardId",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "address",
+ "name": "uniV3Pool",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "rewardToken",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "address[]",
+ "name": "positionWrappers",
+ "type": "address[]"
+ },
+ {
+ "internalType": "uint32[]",
+ "name": "wrapperTypes",
+ "type": "uint32[]"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken0",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken1",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propFees",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "epochStart",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "numEpoch",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "isOutOfRangeIncentivized",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "boostedReward",
+ "type": "uint32"
+ },
+ {
+ "internalType": "address",
+ "name": "boostingAddress",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "additionalData",
+ "type": "bytes"
+ }
+ ],
+ "indexed": false,
+ "internalType": "struct DistributionParameters",
+ "name": "distribution",
+ "type": "tuple"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "sender",
+ "type": "address"
+ }
+ ],
+ "name": "NewDistribution",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "RewardTokenMinimumAmountUpdated",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "toggleStatus",
+ "type": "uint256"
+ }
+ ],
+ "name": "TokenWhitelistToggled",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "implementation",
+ "type": "address"
+ }
+ ],
+ "name": "Upgraded",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "bytes32",
+ "name": "messageHash",
+ "type": "bytes32"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "user",
+ "type": "address"
+ }
+ ],
+ "name": "UserSigned",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "user",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "toggleStatus",
+ "type": "uint256"
+ }
+ ],
+ "name": "UserSigningWhitelistToggled",
+ "type": "event"
+ },
+ {
+ "inputs": [],
+ "name": "BASE_9",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "EPOCH_DURATION",
+ "outputs": [
+ {
+ "internalType": "uint32",
+ "name": "",
+ "type": "uint32"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "core",
+ "outputs": [
+ {
+ "internalType": "contract ICore",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "bytes32",
+ "name": "rewardId",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "address",
+ "name": "uniV3Pool",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "rewardToken",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "address[]",
+ "name": "positionWrappers",
+ "type": "address[]"
+ },
+ {
+ "internalType": "uint32[]",
+ "name": "wrapperTypes",
+ "type": "uint32[]"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken0",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken1",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propFees",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "epochStart",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "numEpoch",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "isOutOfRangeIncentivized",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "boostedReward",
+ "type": "uint32"
+ },
+ {
+ "internalType": "address",
+ "name": "boostingAddress",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "additionalData",
+ "type": "bytes"
+ }
+ ],
+ "internalType": "struct DistributionParameters",
+ "name": "distribution",
+ "type": "tuple"
+ }
+ ],
+ "name": "createDistribution",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "distributionAmount",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "bytes32",
+ "name": "rewardId",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "address",
+ "name": "uniV3Pool",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "rewardToken",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "address[]",
+ "name": "positionWrappers",
+ "type": "address[]"
+ },
+ {
+ "internalType": "uint32[]",
+ "name": "wrapperTypes",
+ "type": "uint32[]"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken0",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken1",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propFees",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "epochStart",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "numEpoch",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "isOutOfRangeIncentivized",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "boostedReward",
+ "type": "uint32"
+ },
+ {
+ "internalType": "address",
+ "name": "boostingAddress",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "additionalData",
+ "type": "bytes"
+ }
+ ],
+ "internalType": "struct DistributionParameters[]",
+ "name": "distributions",
+ "type": "tuple[]"
+ }
+ ],
+ "name": "createDistributions",
+ "outputs": [
+ {
+ "internalType": "uint256[]",
+ "name": "",
+ "type": "uint256[]"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "name": "distributionList",
+ "outputs": [
+ {
+ "internalType": "bytes32",
+ "name": "rewardId",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "address",
+ "name": "uniV3Pool",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "rewardToken",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken0",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken1",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propFees",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "epochStart",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "numEpoch",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "isOutOfRangeIncentivized",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "boostedReward",
+ "type": "uint32"
+ },
+ {
+ "internalType": "address",
+ "name": "boostingAddress",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "additionalData",
+ "type": "bytes"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "distributor",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "name": "feeRebate",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "feeRecipient",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "fees",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "getActiveDistributions",
+ "outputs": [
+ {
+ "components": [
+ {
+ "components": [
+ {
+ "internalType": "bytes32",
+ "name": "rewardId",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "address",
+ "name": "uniV3Pool",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "rewardToken",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "address[]",
+ "name": "positionWrappers",
+ "type": "address[]"
+ },
+ {
+ "internalType": "uint32[]",
+ "name": "wrapperTypes",
+ "type": "uint32[]"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken0",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken1",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propFees",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "epochStart",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "numEpoch",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "isOutOfRangeIncentivized",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "boostedReward",
+ "type": "uint32"
+ },
+ {
+ "internalType": "address",
+ "name": "boostingAddress",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "additionalData",
+ "type": "bytes"
+ }
+ ],
+ "internalType": "struct DistributionParameters",
+ "name": "base",
+ "type": "tuple"
+ },
+ {
+ "internalType": "uint24",
+ "name": "poolFee",
+ "type": "uint24"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "add",
+ "type": "address"
+ },
+ {
+ "internalType": "uint8",
+ "name": "decimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint256",
+ "name": "poolBalance",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct UniswapTokenData",
+ "name": "token0",
+ "type": "tuple"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "add",
+ "type": "address"
+ },
+ {
+ "internalType": "uint8",
+ "name": "decimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint256",
+ "name": "poolBalance",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct UniswapTokenData",
+ "name": "token1",
+ "type": "tuple"
+ },
+ {
+ "internalType": "string",
+ "name": "rewardTokenSymbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint8",
+ "name": "rewardTokenDecimals",
+ "type": "uint8"
+ }
+ ],
+ "internalType": "struct ExtensiveDistributionParameters[]",
+ "name": "searchDistributions",
+ "type": "tuple[]"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint32",
+ "name": "skip",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "first",
+ "type": "uint32"
+ }
+ ],
+ "name": "getActiveDistributions",
+ "outputs": [
+ {
+ "components": [
+ {
+ "components": [
+ {
+ "internalType": "bytes32",
+ "name": "rewardId",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "address",
+ "name": "uniV3Pool",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "rewardToken",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "address[]",
+ "name": "positionWrappers",
+ "type": "address[]"
+ },
+ {
+ "internalType": "uint32[]",
+ "name": "wrapperTypes",
+ "type": "uint32[]"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken0",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken1",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propFees",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "epochStart",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "numEpoch",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "isOutOfRangeIncentivized",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "boostedReward",
+ "type": "uint32"
+ },
+ {
+ "internalType": "address",
+ "name": "boostingAddress",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "additionalData",
+ "type": "bytes"
+ }
+ ],
+ "internalType": "struct DistributionParameters",
+ "name": "base",
+ "type": "tuple"
+ },
+ {
+ "internalType": "uint24",
+ "name": "poolFee",
+ "type": "uint24"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "add",
+ "type": "address"
+ },
+ {
+ "internalType": "uint8",
+ "name": "decimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint256",
+ "name": "poolBalance",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct UniswapTokenData",
+ "name": "token0",
+ "type": "tuple"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "add",
+ "type": "address"
+ },
+ {
+ "internalType": "uint8",
+ "name": "decimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint256",
+ "name": "poolBalance",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct UniswapTokenData",
+ "name": "token1",
+ "type": "tuple"
+ },
+ {
+ "internalType": "string",
+ "name": "rewardTokenSymbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint8",
+ "name": "rewardTokenDecimals",
+ "type": "uint8"
+ }
+ ],
+ "internalType": "struct ExtensiveDistributionParameters[]",
+ "name": "searchDistributions",
+ "type": "tuple[]"
+ },
+ {
+ "internalType": "uint256",
+ "name": "lastIndexDistribution",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "uniV3Pool",
+ "type": "address"
+ }
+ ],
+ "name": "getActivePoolDistributions",
+ "outputs": [
+ {
+ "components": [
+ {
+ "components": [
+ {
+ "internalType": "bytes32",
+ "name": "rewardId",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "address",
+ "name": "uniV3Pool",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "rewardToken",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "address[]",
+ "name": "positionWrappers",
+ "type": "address[]"
+ },
+ {
+ "internalType": "uint32[]",
+ "name": "wrapperTypes",
+ "type": "uint32[]"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken0",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken1",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propFees",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "epochStart",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "numEpoch",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "isOutOfRangeIncentivized",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "boostedReward",
+ "type": "uint32"
+ },
+ {
+ "internalType": "address",
+ "name": "boostingAddress",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "additionalData",
+ "type": "bytes"
+ }
+ ],
+ "internalType": "struct DistributionParameters",
+ "name": "base",
+ "type": "tuple"
+ },
+ {
+ "internalType": "uint24",
+ "name": "poolFee",
+ "type": "uint24"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "add",
+ "type": "address"
+ },
+ {
+ "internalType": "uint8",
+ "name": "decimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint256",
+ "name": "poolBalance",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct UniswapTokenData",
+ "name": "token0",
+ "type": "tuple"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "add",
+ "type": "address"
+ },
+ {
+ "internalType": "uint8",
+ "name": "decimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint256",
+ "name": "poolBalance",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct UniswapTokenData",
+ "name": "token1",
+ "type": "tuple"
+ },
+ {
+ "internalType": "string",
+ "name": "rewardTokenSymbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint8",
+ "name": "rewardTokenDecimals",
+ "type": "uint8"
+ }
+ ],
+ "internalType": "struct ExtensiveDistributionParameters[]",
+ "name": "searchDistributions",
+ "type": "tuple[]"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "uniV3Pool",
+ "type": "address"
+ },
+ {
+ "internalType": "uint32",
+ "name": "skip",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "first",
+ "type": "uint32"
+ }
+ ],
+ "name": "getActivePoolDistributions",
+ "outputs": [
+ {
+ "components": [
+ {
+ "components": [
+ {
+ "internalType": "bytes32",
+ "name": "rewardId",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "address",
+ "name": "uniV3Pool",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "rewardToken",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "address[]",
+ "name": "positionWrappers",
+ "type": "address[]"
+ },
+ {
+ "internalType": "uint32[]",
+ "name": "wrapperTypes",
+ "type": "uint32[]"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken0",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken1",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propFees",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "epochStart",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "numEpoch",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "isOutOfRangeIncentivized",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "boostedReward",
+ "type": "uint32"
+ },
+ {
+ "internalType": "address",
+ "name": "boostingAddress",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "additionalData",
+ "type": "bytes"
+ }
+ ],
+ "internalType": "struct DistributionParameters",
+ "name": "base",
+ "type": "tuple"
+ },
+ {
+ "internalType": "uint24",
+ "name": "poolFee",
+ "type": "uint24"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "add",
+ "type": "address"
+ },
+ {
+ "internalType": "uint8",
+ "name": "decimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint256",
+ "name": "poolBalance",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct UniswapTokenData",
+ "name": "token0",
+ "type": "tuple"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "add",
+ "type": "address"
+ },
+ {
+ "internalType": "uint8",
+ "name": "decimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint256",
+ "name": "poolBalance",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct UniswapTokenData",
+ "name": "token1",
+ "type": "tuple"
+ },
+ {
+ "internalType": "string",
+ "name": "rewardTokenSymbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint8",
+ "name": "rewardTokenDecimals",
+ "type": "uint8"
+ }
+ ],
+ "internalType": "struct ExtensiveDistributionParameters[]",
+ "name": "",
+ "type": "tuple[]"
+ },
+ {
+ "internalType": "uint256",
+ "name": "lastIndexDistribution",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "getAllDistributions",
+ "outputs": [
+ {
+ "components": [
+ {
+ "internalType": "bytes32",
+ "name": "rewardId",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "address",
+ "name": "uniV3Pool",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "rewardToken",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "address[]",
+ "name": "positionWrappers",
+ "type": "address[]"
+ },
+ {
+ "internalType": "uint32[]",
+ "name": "wrapperTypes",
+ "type": "uint32[]"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken0",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken1",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propFees",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "epochStart",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "numEpoch",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "isOutOfRangeIncentivized",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "boostedReward",
+ "type": "uint32"
+ },
+ {
+ "internalType": "address",
+ "name": "boostingAddress",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "additionalData",
+ "type": "bytes"
+ }
+ ],
+ "internalType": "struct DistributionParameters[]",
+ "name": "",
+ "type": "tuple[]"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint32",
+ "name": "epochStart",
+ "type": "uint32"
+ }
+ ],
+ "name": "getDistributionsAfterEpoch",
+ "outputs": [
+ {
+ "components": [
+ {
+ "components": [
+ {
+ "internalType": "bytes32",
+ "name": "rewardId",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "address",
+ "name": "uniV3Pool",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "rewardToken",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "address[]",
+ "name": "positionWrappers",
+ "type": "address[]"
+ },
+ {
+ "internalType": "uint32[]",
+ "name": "wrapperTypes",
+ "type": "uint32[]"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken0",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken1",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propFees",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "epochStart",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "numEpoch",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "isOutOfRangeIncentivized",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "boostedReward",
+ "type": "uint32"
+ },
+ {
+ "internalType": "address",
+ "name": "boostingAddress",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "additionalData",
+ "type": "bytes"
+ }
+ ],
+ "internalType": "struct DistributionParameters",
+ "name": "base",
+ "type": "tuple"
+ },
+ {
+ "internalType": "uint24",
+ "name": "poolFee",
+ "type": "uint24"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "add",
+ "type": "address"
+ },
+ {
+ "internalType": "uint8",
+ "name": "decimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint256",
+ "name": "poolBalance",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct UniswapTokenData",
+ "name": "token0",
+ "type": "tuple"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "add",
+ "type": "address"
+ },
+ {
+ "internalType": "uint8",
+ "name": "decimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint256",
+ "name": "poolBalance",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct UniswapTokenData",
+ "name": "token1",
+ "type": "tuple"
+ },
+ {
+ "internalType": "string",
+ "name": "rewardTokenSymbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint8",
+ "name": "rewardTokenDecimals",
+ "type": "uint8"
+ }
+ ],
+ "internalType": "struct ExtensiveDistributionParameters[]",
+ "name": "searchDistributions",
+ "type": "tuple[]"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint32",
+ "name": "epochStart",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "skip",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "first",
+ "type": "uint32"
+ }
+ ],
+ "name": "getDistributionsAfterEpoch",
+ "outputs": [
+ {
+ "components": [
+ {
+ "components": [
+ {
+ "internalType": "bytes32",
+ "name": "rewardId",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "address",
+ "name": "uniV3Pool",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "rewardToken",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "address[]",
+ "name": "positionWrappers",
+ "type": "address[]"
+ },
+ {
+ "internalType": "uint32[]",
+ "name": "wrapperTypes",
+ "type": "uint32[]"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken0",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken1",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propFees",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "epochStart",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "numEpoch",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "isOutOfRangeIncentivized",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "boostedReward",
+ "type": "uint32"
+ },
+ {
+ "internalType": "address",
+ "name": "boostingAddress",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "additionalData",
+ "type": "bytes"
+ }
+ ],
+ "internalType": "struct DistributionParameters",
+ "name": "base",
+ "type": "tuple"
+ },
+ {
+ "internalType": "uint24",
+ "name": "poolFee",
+ "type": "uint24"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "add",
+ "type": "address"
+ },
+ {
+ "internalType": "uint8",
+ "name": "decimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint256",
+ "name": "poolBalance",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct UniswapTokenData",
+ "name": "token0",
+ "type": "tuple"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "add",
+ "type": "address"
+ },
+ {
+ "internalType": "uint8",
+ "name": "decimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint256",
+ "name": "poolBalance",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct UniswapTokenData",
+ "name": "token1",
+ "type": "tuple"
+ },
+ {
+ "internalType": "string",
+ "name": "rewardTokenSymbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint8",
+ "name": "rewardTokenDecimals",
+ "type": "uint8"
+ }
+ ],
+ "internalType": "struct ExtensiveDistributionParameters[]",
+ "name": "",
+ "type": "tuple[]"
+ },
+ {
+ "internalType": "uint256",
+ "name": "lastIndexDistribution",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint32",
+ "name": "epochStart",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "epochEnd",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "skip",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "first",
+ "type": "uint32"
+ }
+ ],
+ "name": "getDistributionsBetweenEpochs",
+ "outputs": [
+ {
+ "components": [
+ {
+ "components": [
+ {
+ "internalType": "bytes32",
+ "name": "rewardId",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "address",
+ "name": "uniV3Pool",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "rewardToken",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "address[]",
+ "name": "positionWrappers",
+ "type": "address[]"
+ },
+ {
+ "internalType": "uint32[]",
+ "name": "wrapperTypes",
+ "type": "uint32[]"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken0",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken1",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propFees",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "epochStart",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "numEpoch",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "isOutOfRangeIncentivized",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "boostedReward",
+ "type": "uint32"
+ },
+ {
+ "internalType": "address",
+ "name": "boostingAddress",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "additionalData",
+ "type": "bytes"
+ }
+ ],
+ "internalType": "struct DistributionParameters",
+ "name": "base",
+ "type": "tuple"
+ },
+ {
+ "internalType": "uint24",
+ "name": "poolFee",
+ "type": "uint24"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "add",
+ "type": "address"
+ },
+ {
+ "internalType": "uint8",
+ "name": "decimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint256",
+ "name": "poolBalance",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct UniswapTokenData",
+ "name": "token0",
+ "type": "tuple"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "add",
+ "type": "address"
+ },
+ {
+ "internalType": "uint8",
+ "name": "decimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint256",
+ "name": "poolBalance",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct UniswapTokenData",
+ "name": "token1",
+ "type": "tuple"
+ },
+ {
+ "internalType": "string",
+ "name": "rewardTokenSymbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint8",
+ "name": "rewardTokenDecimals",
+ "type": "uint8"
+ }
+ ],
+ "internalType": "struct ExtensiveDistributionParameters[]",
+ "name": "",
+ "type": "tuple[]"
+ },
+ {
+ "internalType": "uint256",
+ "name": "lastIndexDistribution",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint32",
+ "name": "epochStart",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "epochEnd",
+ "type": "uint32"
+ }
+ ],
+ "name": "getDistributionsBetweenEpochs",
+ "outputs": [
+ {
+ "components": [
+ {
+ "components": [
+ {
+ "internalType": "bytes32",
+ "name": "rewardId",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "address",
+ "name": "uniV3Pool",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "rewardToken",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "address[]",
+ "name": "positionWrappers",
+ "type": "address[]"
+ },
+ {
+ "internalType": "uint32[]",
+ "name": "wrapperTypes",
+ "type": "uint32[]"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken0",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken1",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propFees",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "epochStart",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "numEpoch",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "isOutOfRangeIncentivized",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "boostedReward",
+ "type": "uint32"
+ },
+ {
+ "internalType": "address",
+ "name": "boostingAddress",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "additionalData",
+ "type": "bytes"
+ }
+ ],
+ "internalType": "struct DistributionParameters",
+ "name": "base",
+ "type": "tuple"
+ },
+ {
+ "internalType": "uint24",
+ "name": "poolFee",
+ "type": "uint24"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "add",
+ "type": "address"
+ },
+ {
+ "internalType": "uint8",
+ "name": "decimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint256",
+ "name": "poolBalance",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct UniswapTokenData",
+ "name": "token0",
+ "type": "tuple"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "add",
+ "type": "address"
+ },
+ {
+ "internalType": "uint8",
+ "name": "decimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint256",
+ "name": "poolBalance",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct UniswapTokenData",
+ "name": "token1",
+ "type": "tuple"
+ },
+ {
+ "internalType": "string",
+ "name": "rewardTokenSymbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint8",
+ "name": "rewardTokenDecimals",
+ "type": "uint8"
+ }
+ ],
+ "internalType": "struct ExtensiveDistributionParameters[]",
+ "name": "searchDistributions",
+ "type": "tuple[]"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint32",
+ "name": "epoch",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "skip",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "first",
+ "type": "uint32"
+ }
+ ],
+ "name": "getDistributionsForEpoch",
+ "outputs": [
+ {
+ "components": [
+ {
+ "components": [
+ {
+ "internalType": "bytes32",
+ "name": "rewardId",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "address",
+ "name": "uniV3Pool",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "rewardToken",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "address[]",
+ "name": "positionWrappers",
+ "type": "address[]"
+ },
+ {
+ "internalType": "uint32[]",
+ "name": "wrapperTypes",
+ "type": "uint32[]"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken0",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken1",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propFees",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "epochStart",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "numEpoch",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "isOutOfRangeIncentivized",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "boostedReward",
+ "type": "uint32"
+ },
+ {
+ "internalType": "address",
+ "name": "boostingAddress",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "additionalData",
+ "type": "bytes"
+ }
+ ],
+ "internalType": "struct DistributionParameters",
+ "name": "base",
+ "type": "tuple"
+ },
+ {
+ "internalType": "uint24",
+ "name": "poolFee",
+ "type": "uint24"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "add",
+ "type": "address"
+ },
+ {
+ "internalType": "uint8",
+ "name": "decimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint256",
+ "name": "poolBalance",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct UniswapTokenData",
+ "name": "token0",
+ "type": "tuple"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "add",
+ "type": "address"
+ },
+ {
+ "internalType": "uint8",
+ "name": "decimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint256",
+ "name": "poolBalance",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct UniswapTokenData",
+ "name": "token1",
+ "type": "tuple"
+ },
+ {
+ "internalType": "string",
+ "name": "rewardTokenSymbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint8",
+ "name": "rewardTokenDecimals",
+ "type": "uint8"
+ }
+ ],
+ "internalType": "struct ExtensiveDistributionParameters[]",
+ "name": "",
+ "type": "tuple[]"
+ },
+ {
+ "internalType": "uint256",
+ "name": "lastIndexDistribution",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint32",
+ "name": "epoch",
+ "type": "uint32"
+ }
+ ],
+ "name": "getDistributionsForEpoch",
+ "outputs": [
+ {
+ "components": [
+ {
+ "components": [
+ {
+ "internalType": "bytes32",
+ "name": "rewardId",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "address",
+ "name": "uniV3Pool",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "rewardToken",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "address[]",
+ "name": "positionWrappers",
+ "type": "address[]"
+ },
+ {
+ "internalType": "uint32[]",
+ "name": "wrapperTypes",
+ "type": "uint32[]"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken0",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken1",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propFees",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "epochStart",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "numEpoch",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "isOutOfRangeIncentivized",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "boostedReward",
+ "type": "uint32"
+ },
+ {
+ "internalType": "address",
+ "name": "boostingAddress",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "additionalData",
+ "type": "bytes"
+ }
+ ],
+ "internalType": "struct DistributionParameters",
+ "name": "base",
+ "type": "tuple"
+ },
+ {
+ "internalType": "uint24",
+ "name": "poolFee",
+ "type": "uint24"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "add",
+ "type": "address"
+ },
+ {
+ "internalType": "uint8",
+ "name": "decimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint256",
+ "name": "poolBalance",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct UniswapTokenData",
+ "name": "token0",
+ "type": "tuple"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "add",
+ "type": "address"
+ },
+ {
+ "internalType": "uint8",
+ "name": "decimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint256",
+ "name": "poolBalance",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct UniswapTokenData",
+ "name": "token1",
+ "type": "tuple"
+ },
+ {
+ "internalType": "string",
+ "name": "rewardTokenSymbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint8",
+ "name": "rewardTokenDecimals",
+ "type": "uint8"
+ }
+ ],
+ "internalType": "struct ExtensiveDistributionParameters[]",
+ "name": "searchDistributions",
+ "type": "tuple[]"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "bytes32",
+ "name": "rewardId",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "address",
+ "name": "uniV3Pool",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "rewardToken",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "address[]",
+ "name": "positionWrappers",
+ "type": "address[]"
+ },
+ {
+ "internalType": "uint32[]",
+ "name": "wrapperTypes",
+ "type": "uint32[]"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken0",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken1",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propFees",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "epochStart",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "numEpoch",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "isOutOfRangeIncentivized",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "boostedReward",
+ "type": "uint32"
+ },
+ {
+ "internalType": "address",
+ "name": "boostingAddress",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "additionalData",
+ "type": "bytes"
+ }
+ ],
+ "internalType": "struct DistributionParameters",
+ "name": "distribution",
+ "type": "tuple"
+ }
+ ],
+ "name": "getExtensiveDistributionParameters",
+ "outputs": [
+ {
+ "components": [
+ {
+ "components": [
+ {
+ "internalType": "bytes32",
+ "name": "rewardId",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "address",
+ "name": "uniV3Pool",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "rewardToken",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "address[]",
+ "name": "positionWrappers",
+ "type": "address[]"
+ },
+ {
+ "internalType": "uint32[]",
+ "name": "wrapperTypes",
+ "type": "uint32[]"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken0",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken1",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propFees",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "epochStart",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "numEpoch",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "isOutOfRangeIncentivized",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "boostedReward",
+ "type": "uint32"
+ },
+ {
+ "internalType": "address",
+ "name": "boostingAddress",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "additionalData",
+ "type": "bytes"
+ }
+ ],
+ "internalType": "struct DistributionParameters",
+ "name": "base",
+ "type": "tuple"
+ },
+ {
+ "internalType": "uint24",
+ "name": "poolFee",
+ "type": "uint24"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "add",
+ "type": "address"
+ },
+ {
+ "internalType": "uint8",
+ "name": "decimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint256",
+ "name": "poolBalance",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct UniswapTokenData",
+ "name": "token0",
+ "type": "tuple"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "add",
+ "type": "address"
+ },
+ {
+ "internalType": "uint8",
+ "name": "decimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint256",
+ "name": "poolBalance",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct UniswapTokenData",
+ "name": "token1",
+ "type": "tuple"
+ },
+ {
+ "internalType": "string",
+ "name": "rewardTokenSymbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint8",
+ "name": "rewardTokenDecimals",
+ "type": "uint8"
+ }
+ ],
+ "internalType": "struct ExtensiveDistributionParameters",
+ "name": "extensiveParams",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "uniV3Pool",
+ "type": "address"
+ },
+ {
+ "internalType": "uint32",
+ "name": "epochStart",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "skip",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "first",
+ "type": "uint32"
+ }
+ ],
+ "name": "getPoolDistributionsAfterEpoch",
+ "outputs": [
+ {
+ "components": [
+ {
+ "components": [
+ {
+ "internalType": "bytes32",
+ "name": "rewardId",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "address",
+ "name": "uniV3Pool",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "rewardToken",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "address[]",
+ "name": "positionWrappers",
+ "type": "address[]"
+ },
+ {
+ "internalType": "uint32[]",
+ "name": "wrapperTypes",
+ "type": "uint32[]"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken0",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken1",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propFees",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "epochStart",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "numEpoch",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "isOutOfRangeIncentivized",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "boostedReward",
+ "type": "uint32"
+ },
+ {
+ "internalType": "address",
+ "name": "boostingAddress",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "additionalData",
+ "type": "bytes"
+ }
+ ],
+ "internalType": "struct DistributionParameters",
+ "name": "base",
+ "type": "tuple"
+ },
+ {
+ "internalType": "uint24",
+ "name": "poolFee",
+ "type": "uint24"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "add",
+ "type": "address"
+ },
+ {
+ "internalType": "uint8",
+ "name": "decimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint256",
+ "name": "poolBalance",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct UniswapTokenData",
+ "name": "token0",
+ "type": "tuple"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "add",
+ "type": "address"
+ },
+ {
+ "internalType": "uint8",
+ "name": "decimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint256",
+ "name": "poolBalance",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct UniswapTokenData",
+ "name": "token1",
+ "type": "tuple"
+ },
+ {
+ "internalType": "string",
+ "name": "rewardTokenSymbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint8",
+ "name": "rewardTokenDecimals",
+ "type": "uint8"
+ }
+ ],
+ "internalType": "struct ExtensiveDistributionParameters[]",
+ "name": "",
+ "type": "tuple[]"
+ },
+ {
+ "internalType": "uint256",
+ "name": "lastIndexDistribution",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "uniV3Pool",
+ "type": "address"
+ },
+ {
+ "internalType": "uint32",
+ "name": "epochStart",
+ "type": "uint32"
+ }
+ ],
+ "name": "getPoolDistributionsAfterEpoch",
+ "outputs": [
+ {
+ "components": [
+ {
+ "components": [
+ {
+ "internalType": "bytes32",
+ "name": "rewardId",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "address",
+ "name": "uniV3Pool",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "rewardToken",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "address[]",
+ "name": "positionWrappers",
+ "type": "address[]"
+ },
+ {
+ "internalType": "uint32[]",
+ "name": "wrapperTypes",
+ "type": "uint32[]"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken0",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken1",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propFees",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "epochStart",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "numEpoch",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "isOutOfRangeIncentivized",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "boostedReward",
+ "type": "uint32"
+ },
+ {
+ "internalType": "address",
+ "name": "boostingAddress",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "additionalData",
+ "type": "bytes"
+ }
+ ],
+ "internalType": "struct DistributionParameters",
+ "name": "base",
+ "type": "tuple"
+ },
+ {
+ "internalType": "uint24",
+ "name": "poolFee",
+ "type": "uint24"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "add",
+ "type": "address"
+ },
+ {
+ "internalType": "uint8",
+ "name": "decimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint256",
+ "name": "poolBalance",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct UniswapTokenData",
+ "name": "token0",
+ "type": "tuple"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "add",
+ "type": "address"
+ },
+ {
+ "internalType": "uint8",
+ "name": "decimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint256",
+ "name": "poolBalance",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct UniswapTokenData",
+ "name": "token1",
+ "type": "tuple"
+ },
+ {
+ "internalType": "string",
+ "name": "rewardTokenSymbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint8",
+ "name": "rewardTokenDecimals",
+ "type": "uint8"
+ }
+ ],
+ "internalType": "struct ExtensiveDistributionParameters[]",
+ "name": "searchDistributions",
+ "type": "tuple[]"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "uniV3Pool",
+ "type": "address"
+ },
+ {
+ "internalType": "uint32",
+ "name": "epochStart",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "epochEnd",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "skip",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "first",
+ "type": "uint32"
+ }
+ ],
+ "name": "getPoolDistributionsBetweenEpochs",
+ "outputs": [
+ {
+ "components": [
+ {
+ "components": [
+ {
+ "internalType": "bytes32",
+ "name": "rewardId",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "address",
+ "name": "uniV3Pool",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "rewardToken",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "address[]",
+ "name": "positionWrappers",
+ "type": "address[]"
+ },
+ {
+ "internalType": "uint32[]",
+ "name": "wrapperTypes",
+ "type": "uint32[]"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken0",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken1",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propFees",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "epochStart",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "numEpoch",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "isOutOfRangeIncentivized",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "boostedReward",
+ "type": "uint32"
+ },
+ {
+ "internalType": "address",
+ "name": "boostingAddress",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "additionalData",
+ "type": "bytes"
+ }
+ ],
+ "internalType": "struct DistributionParameters",
+ "name": "base",
+ "type": "tuple"
+ },
+ {
+ "internalType": "uint24",
+ "name": "poolFee",
+ "type": "uint24"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "add",
+ "type": "address"
+ },
+ {
+ "internalType": "uint8",
+ "name": "decimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint256",
+ "name": "poolBalance",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct UniswapTokenData",
+ "name": "token0",
+ "type": "tuple"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "add",
+ "type": "address"
+ },
+ {
+ "internalType": "uint8",
+ "name": "decimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint256",
+ "name": "poolBalance",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct UniswapTokenData",
+ "name": "token1",
+ "type": "tuple"
+ },
+ {
+ "internalType": "string",
+ "name": "rewardTokenSymbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint8",
+ "name": "rewardTokenDecimals",
+ "type": "uint8"
+ }
+ ],
+ "internalType": "struct ExtensiveDistributionParameters[]",
+ "name": "",
+ "type": "tuple[]"
+ },
+ {
+ "internalType": "uint256",
+ "name": "lastIndexDistribution",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "uniV3Pool",
+ "type": "address"
+ },
+ {
+ "internalType": "uint32",
+ "name": "epochStart",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "epochEnd",
+ "type": "uint32"
+ }
+ ],
+ "name": "getPoolDistributionsBetweenEpochs",
+ "outputs": [
+ {
+ "components": [
+ {
+ "components": [
+ {
+ "internalType": "bytes32",
+ "name": "rewardId",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "address",
+ "name": "uniV3Pool",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "rewardToken",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "address[]",
+ "name": "positionWrappers",
+ "type": "address[]"
+ },
+ {
+ "internalType": "uint32[]",
+ "name": "wrapperTypes",
+ "type": "uint32[]"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken0",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken1",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propFees",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "epochStart",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "numEpoch",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "isOutOfRangeIncentivized",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "boostedReward",
+ "type": "uint32"
+ },
+ {
+ "internalType": "address",
+ "name": "boostingAddress",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "additionalData",
+ "type": "bytes"
+ }
+ ],
+ "internalType": "struct DistributionParameters",
+ "name": "base",
+ "type": "tuple"
+ },
+ {
+ "internalType": "uint24",
+ "name": "poolFee",
+ "type": "uint24"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "add",
+ "type": "address"
+ },
+ {
+ "internalType": "uint8",
+ "name": "decimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint256",
+ "name": "poolBalance",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct UniswapTokenData",
+ "name": "token0",
+ "type": "tuple"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "add",
+ "type": "address"
+ },
+ {
+ "internalType": "uint8",
+ "name": "decimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint256",
+ "name": "poolBalance",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct UniswapTokenData",
+ "name": "token1",
+ "type": "tuple"
+ },
+ {
+ "internalType": "string",
+ "name": "rewardTokenSymbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint8",
+ "name": "rewardTokenDecimals",
+ "type": "uint8"
+ }
+ ],
+ "internalType": "struct ExtensiveDistributionParameters[]",
+ "name": "searchDistributions",
+ "type": "tuple[]"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "uniV3Pool",
+ "type": "address"
+ },
+ {
+ "internalType": "uint32",
+ "name": "epoch",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "skip",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "first",
+ "type": "uint32"
+ }
+ ],
+ "name": "getPoolDistributionsForEpoch",
+ "outputs": [
+ {
+ "components": [
+ {
+ "components": [
+ {
+ "internalType": "bytes32",
+ "name": "rewardId",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "address",
+ "name": "uniV3Pool",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "rewardToken",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "address[]",
+ "name": "positionWrappers",
+ "type": "address[]"
+ },
+ {
+ "internalType": "uint32[]",
+ "name": "wrapperTypes",
+ "type": "uint32[]"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken0",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken1",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propFees",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "epochStart",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "numEpoch",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "isOutOfRangeIncentivized",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "boostedReward",
+ "type": "uint32"
+ },
+ {
+ "internalType": "address",
+ "name": "boostingAddress",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "additionalData",
+ "type": "bytes"
+ }
+ ],
+ "internalType": "struct DistributionParameters",
+ "name": "base",
+ "type": "tuple"
+ },
+ {
+ "internalType": "uint24",
+ "name": "poolFee",
+ "type": "uint24"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "add",
+ "type": "address"
+ },
+ {
+ "internalType": "uint8",
+ "name": "decimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint256",
+ "name": "poolBalance",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct UniswapTokenData",
+ "name": "token0",
+ "type": "tuple"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "add",
+ "type": "address"
+ },
+ {
+ "internalType": "uint8",
+ "name": "decimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint256",
+ "name": "poolBalance",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct UniswapTokenData",
+ "name": "token1",
+ "type": "tuple"
+ },
+ {
+ "internalType": "string",
+ "name": "rewardTokenSymbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint8",
+ "name": "rewardTokenDecimals",
+ "type": "uint8"
+ }
+ ],
+ "internalType": "struct ExtensiveDistributionParameters[]",
+ "name": "",
+ "type": "tuple[]"
+ },
+ {
+ "internalType": "uint256",
+ "name": "lastIndexDistribution",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "uniV3Pool",
+ "type": "address"
+ },
+ {
+ "internalType": "uint32",
+ "name": "epoch",
+ "type": "uint32"
+ }
+ ],
+ "name": "getPoolDistributionsForEpoch",
+ "outputs": [
+ {
+ "components": [
+ {
+ "components": [
+ {
+ "internalType": "bytes32",
+ "name": "rewardId",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "address",
+ "name": "uniV3Pool",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "rewardToken",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "address[]",
+ "name": "positionWrappers",
+ "type": "address[]"
+ },
+ {
+ "internalType": "uint32[]",
+ "name": "wrapperTypes",
+ "type": "uint32[]"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken0",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken1",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propFees",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "epochStart",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "numEpoch",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "isOutOfRangeIncentivized",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "boostedReward",
+ "type": "uint32"
+ },
+ {
+ "internalType": "address",
+ "name": "boostingAddress",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "additionalData",
+ "type": "bytes"
+ }
+ ],
+ "internalType": "struct DistributionParameters",
+ "name": "base",
+ "type": "tuple"
+ },
+ {
+ "internalType": "uint24",
+ "name": "poolFee",
+ "type": "uint24"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "add",
+ "type": "address"
+ },
+ {
+ "internalType": "uint8",
+ "name": "decimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint256",
+ "name": "poolBalance",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct UniswapTokenData",
+ "name": "token0",
+ "type": "tuple"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "add",
+ "type": "address"
+ },
+ {
+ "internalType": "uint8",
+ "name": "decimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint256",
+ "name": "poolBalance",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct UniswapTokenData",
+ "name": "token1",
+ "type": "tuple"
+ },
+ {
+ "internalType": "string",
+ "name": "rewardTokenSymbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint8",
+ "name": "rewardTokenDecimals",
+ "type": "uint8"
+ }
+ ],
+ "internalType": "struct ExtensiveDistributionParameters[]",
+ "name": "searchDistributions",
+ "type": "tuple[]"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "getValidRewardTokens",
+ "outputs": [
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "minimumAmountPerEpoch",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct RewardTokenAmounts[]",
+ "name": "",
+ "type": "tuple[]"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "contract ICore",
+ "name": "_core",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "_distributor",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "_fees",
+ "type": "uint256"
+ }
+ ],
+ "name": "initialize",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "name": "isWhitelistedToken",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "message",
+ "outputs": [
+ {
+ "internalType": "string",
+ "name": "",
+ "type": "string"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "messageHash",
+ "outputs": [
+ {
+ "internalType": "bytes32",
+ "name": "",
+ "type": "bytes32"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "name": "nonces",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "proxiableUUID",
+ "outputs": [
+ {
+ "internalType": "bytes32",
+ "name": "",
+ "type": "bytes32"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "contract IERC20[]",
+ "name": "tokens",
+ "type": "address[]"
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ }
+ ],
+ "name": "recoverFees",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "name": "rewardTokenMinAmounts",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "name": "rewardTokens",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_feeRecipient",
+ "type": "address"
+ }
+ ],
+ "name": "setFeeRecipient",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "_fees",
+ "type": "uint256"
+ }
+ ],
+ "name": "setFees",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "string",
+ "name": "_message",
+ "type": "string"
+ }
+ ],
+ "name": "setMessage",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_distributor",
+ "type": "address"
+ }
+ ],
+ "name": "setNewDistributor",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address[]",
+ "name": "tokens",
+ "type": "address[]"
+ },
+ {
+ "internalType": "uint256[]",
+ "name": "amounts",
+ "type": "uint256[]"
+ }
+ ],
+ "name": "setRewardTokenMinAmounts",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "user",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "userFeeRebate",
+ "type": "uint256"
+ }
+ ],
+ "name": "setUserFeeRebate",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "bytes",
+ "name": "signature",
+ "type": "bytes"
+ }
+ ],
+ "name": "sign",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "bytes32",
+ "name": "rewardId",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "address",
+ "name": "uniV3Pool",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "rewardToken",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "address[]",
+ "name": "positionWrappers",
+ "type": "address[]"
+ },
+ {
+ "internalType": "uint32[]",
+ "name": "wrapperTypes",
+ "type": "uint32[]"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken0",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken1",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propFees",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "epochStart",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "numEpoch",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "isOutOfRangeIncentivized",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "boostedReward",
+ "type": "uint32"
+ },
+ {
+ "internalType": "address",
+ "name": "boostingAddress",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "additionalData",
+ "type": "bytes"
+ }
+ ],
+ "internalType": "struct DistributionParameters",
+ "name": "distribution",
+ "type": "tuple"
+ },
+ {
+ "internalType": "bytes",
+ "name": "signature",
+ "type": "bytes"
+ }
+ ],
+ "name": "signAndCreateDistribution",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "distributionAmount",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "user",
+ "type": "address"
+ }
+ ],
+ "name": "toggleSigningWhitelist",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ }
+ ],
+ "name": "toggleTokenWhitelist",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "bytes32",
+ "name": "rewardId",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "address",
+ "name": "uniV3Pool",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "rewardToken",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "address[]",
+ "name": "positionWrappers",
+ "type": "address[]"
+ },
+ {
+ "internalType": "uint32[]",
+ "name": "wrapperTypes",
+ "type": "uint32[]"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken0",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken1",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propFees",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "epochStart",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "numEpoch",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "isOutOfRangeIncentivized",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "boostedReward",
+ "type": "uint32"
+ },
+ {
+ "internalType": "address",
+ "name": "boostingAddress",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "additionalData",
+ "type": "bytes"
+ }
+ ],
+ "internalType": "struct DistributionParameters",
+ "name": "distribution",
+ "type": "tuple"
+ }
+ ],
+ "name": "tryGetExtensiveDistributionParameters",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "success",
+ "type": "bool"
+ },
+ {
+ "components": [
+ {
+ "components": [
+ {
+ "internalType": "bytes32",
+ "name": "rewardId",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "address",
+ "name": "uniV3Pool",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "rewardToken",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "address[]",
+ "name": "positionWrappers",
+ "type": "address[]"
+ },
+ {
+ "internalType": "uint32[]",
+ "name": "wrapperTypes",
+ "type": "uint32[]"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken0",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propToken1",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "propFees",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "epochStart",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "numEpoch",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "isOutOfRangeIncentivized",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "boostedReward",
+ "type": "uint32"
+ },
+ {
+ "internalType": "address",
+ "name": "boostingAddress",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "additionalData",
+ "type": "bytes"
+ }
+ ],
+ "internalType": "struct DistributionParameters",
+ "name": "base",
+ "type": "tuple"
+ },
+ {
+ "internalType": "uint24",
+ "name": "poolFee",
+ "type": "uint24"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "add",
+ "type": "address"
+ },
+ {
+ "internalType": "uint8",
+ "name": "decimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint256",
+ "name": "poolBalance",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct UniswapTokenData",
+ "name": "token0",
+ "type": "tuple"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "add",
+ "type": "address"
+ },
+ {
+ "internalType": "uint8",
+ "name": "decimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint256",
+ "name": "poolBalance",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct UniswapTokenData",
+ "name": "token1",
+ "type": "tuple"
+ },
+ {
+ "internalType": "string",
+ "name": "rewardTokenSymbol",
+ "type": "string"
+ },
+ {
+ "internalType": "uint8",
+ "name": "rewardTokenDecimals",
+ "type": "uint8"
+ }
+ ],
+ "internalType": "struct ExtensiveDistributionParameters",
+ "name": "extensiveParams",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newImplementation",
+ "type": "address"
+ }
+ ],
+ "name": "upgradeTo",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newImplementation",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "data",
+ "type": "bytes"
+ }
+ ],
+ "name": "upgradeToAndCall",
+ "outputs": [],
+ "stateMutability": "payable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "name": "userSignatureWhitelist",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "name": "userSignatures",
+ "outputs": [
+ {
+ "internalType": "bytes32",
+ "name": "",
+ "type": "bytes32"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ }
+]
diff --git a/src/utils/presets/createMerklIncentive.js b/src/utils/presets/createMerklIncentive.js
new file mode 100644
index 0000000..4302b6b
--- /dev/null
+++ b/src/utils/presets/createMerklIncentive.js
@@ -0,0 +1,165 @@
+import {
+ dandelionVotingContract,
+ distributionCreator,
+ ethPNTContract,
+ getCampaignPayloadFromParameters,
+ pNetworkV2Vault,
+ prepareInflationData,
+ prepareInflationProposal
+} from './utils'
+import settings from '../../settings'
+
+const propToken0PercentPreset = 45
+const propToken1PercentPreset = 45
+const propFeesPercentPreset = 10
+
+const createMerklIncentive = ({ presetParams, setPresetParams }) => ({
+ id: 'createMerklIncentive',
+ name: 'Create Merkle Incentive',
+ description: 'Inflate ethPNT and use the inflated amount to create a Merkle incentive plan',
+ args: [
+ {
+ id: 'pool-address',
+ name: 'pool-address',
+ component: 'Input',
+ props: {
+ style: {
+ fontSize: 15
+ },
+ placeholder: 'Pool address ...',
+ value: presetParams[0] || '',
+ onChange: (_e) =>
+ setPresetParams({
+ ...presetParams,
+ 0: _e.target.value
+ })
+ }
+ },
+ {
+ id: 'rewards',
+ name: 'Rewards',
+ component: 'Input',
+ props: {
+ type: 'number',
+ style: {
+ fontSize: 15
+ },
+ placeholder: 'Total Reward ...',
+ value: presetParams[1] || '',
+ onChange: (_e) =>
+ setPresetParams({
+ ...presetParams,
+ 1: _e.target.value
+ })
+ }
+ },
+ {
+ id: 'duration',
+ name: 'duration-in-months',
+ component: 'Input',
+ props: {
+ type: 'number',
+ style: {
+ fontSize: 15
+ },
+ placeholder: 'Duration in months ...',
+ value: presetParams[2] || '',
+ onChange: (_e) =>
+ setPresetParams({
+ ...presetParams,
+ 2: _e.target.value
+ })
+ }
+ },
+ {
+ id: 'distribution-formula',
+ name: 'MerklDistributionFormula',
+ component: 'MerklDistributionFormula',
+ props: [
+ {
+ type: 'number',
+ style: {
+ fontSize: 15
+ },
+ placeholder: 'Insert percentage ...',
+ value: presetParams[3] || propToken0PercentPreset,
+ onChange: (_e) =>
+ setPresetParams({
+ ...presetParams,
+ 3: _e.target.value
+ })
+ },
+ {
+ type: 'number',
+ style: {
+ fontSize: 15
+ },
+ placeholder: 'Insert percentage ...',
+ value: presetParams[4] || propToken1PercentPreset,
+ onChange: (_e) =>
+ setPresetParams({
+ ...presetParams,
+ 4: _e.target.value
+ })
+ },
+ {
+ type: 'number',
+ style: {
+ fontSize: 15
+ },
+ placeholder: 'Insert percentage ...',
+ value: presetParams[5] || propFeesPercentPreset,
+ onChange: (_e) =>
+ setPresetParams({
+ ...presetParams,
+ 5: _e.target.value
+ })
+ }
+ ]
+ }
+ ],
+ prepare: async () => {
+ if (Object.values(presetParams).length < 3) return null
+ const poolAddress = presetParams[0]
+ const totalReward = presetParams[1]
+ const campaignDurationInMonths = presetParams[2]
+ const propToken0Percent = presetParams[3] ? presetParams[3] : propToken0PercentPreset
+ const propToken1Percent = presetParams[4] ? presetParams[4] : propToken1PercentPreset
+ const propFeesPercent = presetParams[5] ? presetParams[5] : propFeesPercentPreset
+
+ const inflationData = prepareInflationData(totalReward)
+
+ const payload = await getCampaignPayloadFromParameters(
+ poolAddress,
+ inflationData.ethPNTAddress,
+ inflationData.rawAmount,
+ propToken0Percent,
+ propToken1Percent,
+ propFeesPercent,
+ campaignDurationInMonths
+ )
+
+ const inflationProposal = await prepareInflationProposal(
+ inflationData.ethPNTAddress,
+ settings.contracts.dandelionVoting,
+ inflationData.rawAmount
+ )
+
+ const approve = {
+ to: inflationData.ethPNTAddress,
+ calldata: ethPNTContract.encodeFunctionData('approve', [
+ settings.contracts.merklDistributionCreatorAddress,
+ inflationData.rawAmount
+ ])
+ }
+
+ const createDistributionCalldata = {
+ to: settings.contracts.merklDistributionCreatorAddress,
+ calldata: distributionCreator.encodeFunctionData('createDistribution', [payload])
+ }
+
+ return [...inflationProposal, approve, createDistributionCalldata]
+ }
+})
+
+export default createMerklIncentive
diff --git a/src/utils/presets/utils.js b/src/utils/presets/utils.js
index 1a480e9..f4c09a0 100644
--- a/src/utils/presets/utils.js
+++ b/src/utils/presets/utils.js
@@ -1,14 +1,21 @@
import VaultABI from '../abis/Vault.json'
+import DandelionVotingABI from '../abis/DandelionVoting.json'
import EthPNTABI from '../abis/EthPNT.json'
import pNetworkV2VaultABI from '../abis/pNetworkV2Vault.json'
+import MerklDistributionCreatorABI from '../abis/MerklDistributionCreator.json'
import BigNumber from 'bignumber.js'
import { ethers } from 'ethers'
+import { readContract } from '@wagmi/core'
import settings from '../../settings'
export const vaultContract = new ethers.utils.Interface(VaultABI)
export const ethPNTContract = new ethers.utils.Interface(EthPNTABI)
export const pNetworkV2Vault = new ethers.utils.Interface(pNetworkV2VaultABI)
+export const distributionCreator = new ethers.utils.Interface(MerklDistributionCreatorABI)
+export const dandelionVotingContract = new ethers.utils.Interface(DandelionVotingABI)
+
+const ONE_DAY = 60 * 60 * 24
export const prepareInflationData = (amount) => {
const ethPNTAsset = settings.assets.find((asset) => asset.symbol == 'ethPNT')
@@ -38,3 +45,66 @@ export const prepareInflationProposal = async (ethPNTAddress, receiverAddress, r
calldata: vaultContract.encodeFunctionData('transfer', [ethPNTAddress, receiverAddress, rawAmount])
}
]
+
+const sha3 = (_string) => ethers.utils.keccak256(ethers.utils.toUtf8Bytes(_string))
+
+const getCorrectEpochStartTimestamp = async () => {
+ const now = ethers.BigNumber.from(Math.floor(Date.now() / 1000))
+ const ethereumBlockTime = 15 // seconds
+
+ const durationBlocks = await readContract({
+ address: settings.contracts.dandelionVoting,
+ abi: DandelionVotingABI,
+ functionName: 'durationBlocks',
+ args: []
+ })
+ const executionDelayBlocks = await readContract({
+ address: settings.contracts.dandelionVoting,
+ abi: DandelionVotingABI,
+ functionName: 'executionDelayBlocks',
+ args: []
+ })
+ const blocksRequiredBeforeExecuting = durationBlocks.add(executionDelayBlocks)
+ const timeRequiredBeforeExecuting = blocksRequiredBeforeExecuting.mul(ethereumBlockTime) // seconds
+ // We allow enough time for the execution before the campaign expires, that is
+ // executionBlockTs + 1 day
+ return now.add(timeRequiredBeforeExecuting).add(ONE_DAY)
+}
+
+export const getCampaignPayloadFromParameters = async (
+ _uniswapV3Pool,
+ _rewardToken,
+ _amount,
+ _token0Percentage,
+ _token1Percentage,
+ _feesPercentage,
+ _campaignDurationInMonths
+) => {
+ // From the front end we'll get the percentage (i.e. for 45.10% we'll use 4510)
+ const propToken0 = _token0Percentage * 100
+ const propToken1 = _token1Percentage * 100
+ const propFees = _feesPercentage * 100
+ const epochStartTs = await getCorrectEpochStartTimestamp()
+ const campaignDurationInHours = _campaignDurationInMonths * 28 * 24 // 4 weeks per month => 28 days, 24 hours per day
+
+ if (!ethers.utils.isAddress(_rewardToken)) throw new Error('Invalid address', _rewardToken)
+ if (!ethers.utils.isAddress(_uniswapV3Pool)) throw new Error('Invalid address', _uniswapV3Pool)
+
+ return {
+ rewardId: sha3('pnetwork-incentives'),
+ uniV3Pool: _uniswapV3Pool,
+ rewardToken: _rewardToken,
+ amount: _amount,
+ positionWrappers: [],
+ wrapperTypes: [],
+ propToken0: propToken0,
+ propToken1: propToken1,
+ propFees: propFees,
+ epochStart: epochStartTs,
+ numEpoch: campaignDurationInHours,
+ isOutOfRangeIncentivized: 0,
+ boostedReward: 0,
+ boostingAddress: settings.zeroAddress,
+ additionalData: sha3('pnetwork-incentives')
+ }
+}
diff --git a/src/utils/vote-presets.js b/src/utils/vote-presets.js
index 9b54b9b..ef8bc29 100644
--- a/src/utils/vote-presets.js
+++ b/src/utils/vote-presets.js
@@ -1,3 +1,4 @@
+import createMerklIncentive from './presets/createMerklIncentive'
import paymentFromTreasury from './presets/paymentFromTreasury'
import withdrawInflationAndPegin from './presets/withdrawInflationAndPegin'
import withdrawInflationToAssociation from './presets/withdrawInflationToAssociation'
@@ -9,6 +10,7 @@ const getVotePresets = ({ presetParams, setPresetParams, provider }) => {
withdrawInflationToRecipient: withdrawInflationToRecipient({ presetParams, setPresetParams }),
withdrawInflationToAssociation: withdrawInflationToAssociation({ presetParams, setPresetParams }),
withdrawInflationAndPegin: withdrawInflationAndPegin({ presetParams, setPresetParams }),
+ createMerklIncentive: createMerklIncentive({ presetParams, setPresetParams }),
custom: {
id: 'custom',
name: 'Custom - encoded script',