From 70c520ad2d5f8f6c692bab14a217b33d20602cab Mon Sep 17 00:00:00 2001 From: Samarendra Gouda Date: Sun, 25 Aug 2024 22:10:07 +0530 Subject: [PATCH] feat: add odos to arbitrum --- package.json | 2 +- src/abi/connectors/v2/ODOS-V2-A.ts | 40 +++++++++++++++++++++++ src/abi/connectors/v2/index.ts | 4 ++- src/addresses/arbitrum/connectorsV2_M1.ts | 3 +- 4 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 src/abi/connectors/v2/ODOS-V2-A.ts diff --git a/package.json b/package.json index 4dd19922..bc49378a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dsa-connect", - "version": "0.6.98", + "version": "0.6.99", "description": "DSA connect", "main": "dist/index.js", "module": "dist/index.es.js", diff --git a/src/abi/connectors/v2/ODOS-V2-A.ts b/src/abi/connectors/v2/ODOS-V2-A.ts new file mode 100644 index 00000000..e92fb833 --- /dev/null +++ b/src/abi/connectors/v2/ODOS-V2-A.ts @@ -0,0 +1,40 @@ +import { AbiItem } from 'web3-utils' + +export const ODOS_V2_A: AbiItem[] = [ + { + anonymous: false, + inputs: [ + { indexed: false, internalType: 'address', name: 'buyToken', type: 'address' }, + { indexed: false, internalType: 'address', name: 'sellToken', type: 'address' }, + { indexed: false, internalType: 'uint256', name: 'buyAmt', type: 'uint256' }, + { indexed: false, internalType: 'uint256', name: 'sellAmt', type: 'uint256' }, + { indexed: false, internalType: 'uint256', name: 'setId', type: 'uint256' } + ], + name: 'LogSwap', + type: 'event' + }, + { + inputs: [], + name: 'name', + outputs: [{ internalType: 'string', name: '', type: 'string' }], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [ + { internalType: 'address', name: 'buyAddr', type: 'address' }, + { internalType: 'address', name: 'sellAddr', type: 'address' }, + { internalType: 'uint256', name: 'sellAmt', type: 'uint256' }, + { internalType: 'uint256', name: 'unitAmt', type: 'uint256' }, + { internalType: 'bytes', name: 'callData', type: 'bytes' }, + { internalType: 'uint256', name: 'setId', type: 'uint256' } + ], + name: 'swap', + outputs: [ + { internalType: 'string', name: '_eventName', type: 'string' }, + { internalType: 'bytes', name: '_eventParam', type: 'bytes' } + ], + stateMutability: 'payable', + type: 'function' + } +] diff --git a/src/abi/connectors/v2/index.ts b/src/abi/connectors/v2/index.ts index 95d44d2c..03081dfa 100644 --- a/src/abi/connectors/v2/index.ts +++ b/src/abi/connectors/v2/index.ts @@ -135,6 +135,7 @@ import { MERKLE_CLAIM_A } from "./MERKLE-CLAIM-A" import { SPARK_CLAIM_A } from "./SPARK-CLAIM-A" import { FLUID_ARB_CLAIM_A } from "./FLUID-ARB-CLAIM-A" import { WEETHS_A } from "./WEETHS-A" +import { ODOS_V2_A } from "./ODOS-V2-A" export const connectorsV2_M1 = { 'MORPHO-REWARDS-A': MORPHO_REWARDS_A, @@ -268,5 +269,6 @@ export const connectorsV2_M1 = { 'MERKLE-CLAIM-A': MERKLE_CLAIM_A, 'SPARK-CLAIM-A': SPARK_CLAIM_A, 'FLUID-ARB-CLAIM-A': FLUID_ARB_CLAIM_A, - 'WEETHS-A': WEETHS_A + 'WEETHS-A': WEETHS_A, + 'ODOS-V2-A': ODOS_V2_A } diff --git a/src/addresses/arbitrum/connectorsV2_M1.ts b/src/addresses/arbitrum/connectorsV2_M1.ts index c7cb65b7..9cd72f1a 100644 --- a/src/addresses/arbitrum/connectorsV2_M1.ts +++ b/src/addresses/arbitrum/connectorsV2_M1.ts @@ -41,5 +41,6 @@ export const connectorsV2_M1 = { 'FLUID-STAKING-A': '0xDb08a687bC3Cf7127F7933146D08d1De2a73ef87', 'BASIC-D-V2': '0x389657de20592A0F5aD9eb4De44fE8293616B751', 'INSTAPOOL-D': '0x65f244005B002ecD701Eb44F042d64CCE1bb8D1b', - 'FLUID-ARB-CLAIM-A': '0x95596f9C4477861C313B1dD5e20aCd1f3DFBc092' + 'FLUID-ARB-CLAIM-A': '0x95596f9C4477861C313B1dD5e20aCd1f3DFBc092', + 'ODOS-V2-A': '0xf52AE7868e01074EaAd587060d75e996baed9aEF' }