Skip to content

Commit

Permalink
Merge pull request #321 from Instadapp/f/merkle-connector
Browse files Browse the repository at this point in the history
feat: add merkle-claim connector
  • Loading branch information
thrilok209 authored Sep 23, 2024
2 parents 36e18cd + 573a10d commit 9fd8d80
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dsa-connect",
"version": "0.7.0",
"version": "0.7.1",
"description": "DSA connect",
"main": "dist/index.js",
"module": "dist/index.es.js",
Expand Down
78 changes: 78 additions & 0 deletions src/abi/connectors/v2/FLUID-MERKLE-CLAIM-A.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
import { AbiItem } from 'web3-utils'
export const FLUID_MERKLE_CLAIM_A: AbiItem[] = [
{
anonymous: false,
inputs: [
{ indexed: false, internalType: 'address', name: 'merkleDistributorContract', type: 'address' },
{ indexed: false, internalType: 'address', name: 'rewardToken', type: 'address' },
{ indexed: false, internalType: 'uint256', name: 'cumulativeAmount', type: 'uint256' },
{ indexed: false, internalType: 'bytes32', name: 'positionId', type: 'bytes32' },
{ indexed: false, internalType: 'uint256', name: 'cycle', type: 'uint256' },
{ indexed: false, internalType: 'bytes32[]', name: 'merkleProof', type: 'bytes32[]' },
{ indexed: false, internalType: 'uint256', name: 'rewardsClaimed', type: 'uint256' },
{ indexed: false, internalType: 'uint256', name: 'setId', type: 'uint256' }
],
name: 'LogClaim',
type: 'event'
},
{
anonymous: false,
inputs: [
{ indexed: false, internalType: 'address', name: 'merkleDistributorContract', type: 'address' },
{ indexed: false, internalType: 'address', name: 'rewardToken', type: 'address' },
{ indexed: false, internalType: 'address', name: 'recipient_', type: 'address' },
{ indexed: false, internalType: 'uint256', name: 'cumulativeAmount', type: 'uint256' },
{ indexed: false, internalType: 'bytes32', name: 'positionId', type: 'bytes32' },
{ indexed: false, internalType: 'uint256', name: 'cycle', type: 'uint256' },
{ indexed: false, internalType: 'bytes32[]', name: 'merkleProof', type: 'bytes32[]' },
{ indexed: false, internalType: 'uint256', name: 'rewardsClaimed', type: 'uint256' },
{ indexed: false, internalType: 'uint256', name: 'setId', type: 'uint256' }
],
name: 'LogClaimOnBehalf',
type: 'event'
},
{
inputs: [
{ internalType: 'address', name: 'merkleDistributorContract', type: 'address' },
{ internalType: 'address', name: 'rewardToken', type: 'address' },
{ internalType: 'uint256', name: 'cumulativeAmount_', type: 'uint256' },
{ internalType: 'bytes32', name: 'positionId_', type: 'bytes32' },
{ internalType: 'uint256', name: 'cycle_', type: 'uint256' },
{ internalType: 'bytes32[]', name: 'merkleProof_', type: 'bytes32[]' },
{ internalType: 'uint256', name: 'setId_', type: 'uint256' }
],
name: 'claim',
outputs: [
{ internalType: 'string', name: '_eventName', type: 'string' },
{ internalType: 'bytes', name: '_eventParam', type: 'bytes' }
],
stateMutability: 'payable',
type: 'function'
},
{
inputs: [
{ internalType: 'address', name: 'merkleDistributorContract', type: 'address' },
{ internalType: 'address', name: 'rewardToken', type: 'address' },
{ internalType: 'address', name: 'recipient_', type: 'address' },
{ internalType: 'uint256', name: 'cumulativeAmount_', type: 'uint256' },
{ internalType: 'bytes32', name: 'positionId_', type: 'bytes32' },
{ internalType: 'uint256', name: 'cycle_', type: 'uint256' },
{ internalType: 'bytes32[]', name: 'merkleProof_', type: 'bytes32[]' },
{ internalType: 'uint256', name: 'setId_', type: 'uint256' }
],
name: 'claimOnBehalf',
outputs: [
{ internalType: 'string', name: '_eventName', type: 'string' },
{ internalType: 'bytes', name: '_eventParam', type: 'bytes' }
],
stateMutability: 'payable',
type: 'function'
},
{
inputs: [],
name: 'name',
outputs: [{ internalType: 'string', name: '', type: 'string' }],
stateMutability: 'view',
type: 'function'
}
]
2 changes: 2 additions & 0 deletions src/abi/connectors/v2/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ import { FLUID_ARB_CLAIM_A } from "./FLUID-ARB-CLAIM-A"
import { WEETHS_A } from "./WEETHS-A"
import { ODOS_V2_A } from "./ODOS-V2-A"
import { OKX_A } from "./OKX-A"
import { FLUID_MERKLE_CLAIM_A } from "./FLUID-MERKLE-CLAIM-A"

export const connectorsV2_M1 = {
'MORPHO-REWARDS-A': MORPHO_REWARDS_A,
Expand Down Expand Up @@ -273,4 +274,5 @@ export const connectorsV2_M1 = {
'WEETHS-A': WEETHS_A,
'ODOS-V2-A': ODOS_V2_A,
'OKX-A': OKX_A,
'FLUID-MERKLE-CLAIM-A': FLUID_MERKLE_CLAIM_A,
}
1 change: 1 addition & 0 deletions src/addresses/mainnet/connectorsV2_M1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,5 @@ export const connectorsV2_M1 = {
'WEETHS-A': '0x8714DDa838b9fd0CF426545D319721c086833d59',
'OKX-A': '0x69107F54d58400b38E4e7fE8037bff5C35EE222f',
'ODOS-V2-A': '0xAa48Cca7DCe006F37DBb2e2Ef2dE7ACD5f6F5Dfc',
'FLUID-MERKLE-CLAIM-A': '0xaa9322865E914c625043D8cEc1318ebaD071B365'
}

0 comments on commit 9fd8d80

Please sign in to comment.