From 9761ce0749f364925c77fd89e0d89b4eb4fd715e Mon Sep 17 00:00:00 2001 From: Shriya Tyagi Date: Wed, 6 Nov 2024 02:33:03 +0530 Subject: [PATCH] feat: add ZEROX-V5-A --- package.json | 2 +- src/abi/connectors/v2/ZEROX-A.ts | 27 +----------------------- src/abi/connectors/v2/ZEROX-V5-A.ts | 3 +++ src/abi/connectors/v2/index.ts | 4 +++- src/addresses/mainnet/connectorsV2_M1.ts | 5 +++-- 5 files changed, 11 insertions(+), 30 deletions(-) create mode 100644 src/abi/connectors/v2/ZEROX-V5-A.ts diff --git a/package.json b/package.json index c3ffcf18..5d3d0e1b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dsa-connect", - "version": "0.7.7", + "version": "0.7.8", "description": "DSA connect", "main": "dist/index.js", "module": "dist/index.es.js", diff --git a/src/abi/connectors/v2/ZEROX-A.ts b/src/abi/connectors/v2/ZEROX-A.ts index df56b28e..8830d86b 100644 --- a/src/abi/connectors/v2/ZEROX-A.ts +++ b/src/abi/connectors/v2/ZEROX-A.ts @@ -1,28 +1,3 @@ import { AbiItem } from 'web3-utils' -export const ZEROX_A: AbiItem[] = [ - { - 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', - }, -] +export const ZEROX_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"}] \ No newline at end of file diff --git a/src/abi/connectors/v2/ZEROX-V5-A.ts b/src/abi/connectors/v2/ZEROX-V5-A.ts new file mode 100644 index 00000000..1c617d0b --- /dev/null +++ b/src/abi/connectors/v2/ZEROX-V5-A.ts @@ -0,0 +1,3 @@ +import { AbiItem } from 'web3-utils' + +export const ZEROX_V5_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"}] \ No newline at end of file diff --git a/src/abi/connectors/v2/index.ts b/src/abi/connectors/v2/index.ts index 4cb0ad97..58680a21 100644 --- a/src/abi/connectors/v2/index.ts +++ b/src/abi/connectors/v2/index.ts @@ -143,6 +143,7 @@ import { AAVE_V3_ETHERFI } from "./AAVE-V3-ETHERFI" import { FLUID_VAULT_T2_A } from "./FLUID-VAULT-T2-A" import { FLUID_VAULT_T3_A } from "./FLUID-VAULT-T3-A" import { FLUID_VAULT_T4_A } from "./FLUID-VAULT-T4-A" +import { ZEROX_V5_A } from "./ZEROX-V5-A" export const connectorsV2_M1 = { 'MORPHO-REWARDS-A': MORPHO_REWARDS_A, @@ -284,5 +285,6 @@ export const connectorsV2_M1 = { 'AAVE-V3-ETHERFI': AAVE_V3_ETHERFI, 'FLUID-VAULT-T2-A': FLUID_VAULT_T2_A, 'FLUID-VAULT-T3-A': FLUID_VAULT_T3_A, - 'FLUID-VAULT-T4-A': FLUID_VAULT_T4_A + 'FLUID-VAULT-T4-A': FLUID_VAULT_T4_A, + 'ZEROX-V5-A': ZEROX_V5_A } diff --git a/src/addresses/mainnet/connectorsV2_M1.ts b/src/addresses/mainnet/connectorsV2_M1.ts index 0a4aaa59..bd81cba6 100644 --- a/src/addresses/mainnet/connectorsV2_M1.ts +++ b/src/addresses/mainnet/connectorsV2_M1.ts @@ -58,7 +58,7 @@ export const connectorsV2_M1 = { 'PARASWAP-V5-A': '0x888d85fe4eafe3d462f11faa1b22c0d860be8f3f', 'UNIVERSE-A': '0xd7a7296623c56f884b0a753ebd6653911f3986ca', 'PARASWAP-A': '0x888d85fe4eafe3d462f11faa1b22c0d860be8f3f', - 'ZEROX-A': '0x4354e07ef8a68e5c24b343e74b2574cbdd05ec81', + 'ZEROX-A': '0xebB17b077FD2BD29422eE5Ed8E5DA0c506748A25', 'ZEROX-V4-A': '0x4354e07ef8a68e5c24b343e74b2574cbdd05ec81', 'SUSHISWAP-A': '0x90D45f987bCad6DD7FB5fE0994124D455cf30Bca', 'UBIQUITY-A': '0x8EC066D75d665616A94F2EccDBE49b54eAeefc78', @@ -121,5 +121,6 @@ export const connectorsV2_M1 = { 'AAVE-V3-ETHERFI': '0xf2c3968e5373C58F01C931a589B7cccf0C01163b', 'FLUID-VAULT-T2-A': '0x2Edf4cc84989Aa31C74ea69bc5166a4C287f0dFb', 'FLUID-VAULT-T3-A': '0x18C8E1a43D12B218a2142d36aA0e885b39e5e8F6', - 'FLUID-VAULT-T4-A': '0xD1574167A8EB19b006ae6F93Bc96d320a9a0C3C6' + 'FLUID-VAULT-T4-A': '0xD1574167A8EB19b006ae6F93Bc96d320a9a0C3C6', + 'ZEROX-V5-A': '0xebB17b077FD2BD29422eE5Ed8E5DA0c506748A25' }