Skip to content

Commit

Permalink
Merge pull request #334 from Instadapp/f/zero-x
Browse files Browse the repository at this point in the history
fix: update 0x-v2 connectors
  • Loading branch information
SamarendraGouda authored Nov 16, 2024
2 parents 71ec8cc + 98582d7 commit ea97d45
Show file tree
Hide file tree
Showing 10 changed files with 95 additions and 9 deletions.
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.9",
"version": "0.7.10",
"description": "DSA connect",
"main": "dist/index.js",
"module": "dist/index.es.js",
Expand Down
39 changes: 38 additions & 1 deletion src/abi/connectors/v2/ZEROX-A.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,40 @@
import { AbiItem } from 'web3-utils'

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"}]
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'
}
]
40 changes: 40 additions & 0 deletions src/abi/connectors/v2/ZEROX-V2-A.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { AbiItem } from 'web3-utils'

export const ZEROX_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'
}
]
4 changes: 3 additions & 1 deletion src/abi/connectors/v2/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ 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"
import { MERKLE_CLAIM_LRT_A } from "./MERKLE-CLAIM-LRT-A"
import { ZEROX_V2_A } from './ZEROX-V2-A'

export const connectorsV2_M1 = {
'MORPHO-REWARDS-A': MORPHO_REWARDS_A,
Expand Down Expand Up @@ -288,5 +289,6 @@ export const connectorsV2_M1 = {
'FLUID-VAULT-T3-A': FLUID_VAULT_T3_A,
'FLUID-VAULT-T4-A': FLUID_VAULT_T4_A,
'ZEROX-V5-A': ZEROX_V5_A,
'MERKLE-CLAIM-LRT-A': MERKLE_CLAIM_LRT_A
'MERKLE-CLAIM-LRT-A': MERKLE_CLAIM_LRT_A,
'ZEROX-V2-A': ZEROX_V2_A
}
4 changes: 3 additions & 1 deletion src/addresses/arbitrum/connectorsV2_M1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,7 @@ export const connectorsV2_M1 = {
'INSTAPOOL-D': '0x65f244005B002ecD701Eb44F042d64CCE1bb8D1b',
'FLUID-ARB-CLAIM-A': '0x95596f9C4477861C313B1dD5e20aCd1f3DFBc092',
'ODOS-V2-A': '0xf52AE7868e01074EaAd587060d75e996baed9aEF',
'OKX-A': '0x28Fb3469E5650B4A979A9F3A54040407eB412Eed'
'OKX-A': '0x28Fb3469E5650B4A979A9F3A54040407eB412Eed',
'ZEROX-V2-A': '0xa2fA0329183586d0231e29F80Ee70a0559418EE2',
'ZEROX-A': '0xa2fA0329183586d0231e29F80Ee70a0559418EE2',
}
3 changes: 2 additions & 1 deletion src/addresses/avalanche/connectorsV2_M1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const connectorsV2_M1 = {
'INTEROP-STAGING-A': '0xe62984be80f360b8c183ee3c0c6ad3cdfa45103b',
'INSTAPOOL-C': '0xB2A7F20D10A006B0bEA86Ce42F2524Fde5D6a0F4',
'PARASWAP-V5-A': '0x8a7fCeE0e1Ff6DB33C7E83060c18e3B97915A970',
'ZEROX-A': '0x929376C77A2fB8152375a089a4Fccf84Ff481479',
'ZEROX-A': '0xDb08a687bC3Cf7127F7933146D08d1De2a73ef87',
'ZEROX-V4-A': '0x929376C77A2fB8152375a089a4Fccf84Ff481479',
'SUSHISWAP-A': '0x8dA60dee0815a08d16C066b07814b10722fA9306',
'1INCH-A': '0x2360Ac6C1F061c5A5Af797FD195bA6B00b3d48Ee',
Expand Down Expand Up @@ -41,4 +41,5 @@ export const connectorsV2_M1 = {
'INSTAPOOL-D': '0xCFB46DbF4535F6C72BdFaf9FB8e7130fA03e24BC',
'OKX-A': '0xE761304F14FeeE3dB4491738DA175891Db430468',
'ODOS-V2-A': '0x748Fbb99DE5a89a506AB1DDF15839368402bEb4F',
'ZEROX-V2-A': '0xDb08a687bC3Cf7127F7933146D08d1De2a73ef87',
}
3 changes: 2 additions & 1 deletion src/addresses/base/connectorsV2_M1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const connectorsV2_M1 = {
'UNISWAP-V3-A': '0x0Ac1eab0fBe7d57881C4C9626eD493E5809CbDd9',
'BASIC-B': '0xA99c0a10e25a5b9E2F937bA00dFD268c4489023b',
'BASIC-C': '0x8De45b985A62639eCfC4c8A898E65426b6cBeE07',
'ZEROX-A': '0x426D8cC10ebbC9c6cB4d013209CdcAb46a51eD1a',
'ZEROX-A': '0x68e391aF9B25C6fBFC48efDea7Ea391E053E5217',
'ZEROX-V4-A': '0x426D8cC10ebbC9c6cB4d013209CdcAb46a51eD1a',
'UNISWAP-V3-ROUTER-A': '0x1852C8b7FD63D8D8749cA8DBd98d9fad9Ccc7AC7',
'UNISWAP-V3-SWAP-A': '0xDF1B85eDBbD6DC34713dFF3c0400AD08292d1B70',
Expand All @@ -30,4 +30,5 @@ export const connectorsV2_M1 = {
'MORPHO-BLUE-A': '0x38cB414DA0620F2D7Ec3A9A1f185D519270F9538',
'OKX-A': '0x0cAF0705a21Be560690A14e4e6D61A3A167fB026',
'ODOS-V2-A': '0x5523AFAdCd20310569A61694dA0B8F47EF991690',
'ZEROX-V2-A': '0x68e391aF9B25C6fBFC48efDea7Ea391E053E5217',
}
3 changes: 2 additions & 1 deletion src/addresses/mainnet/connectorsV2_M1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,5 +123,6 @@ export const connectorsV2_M1 = {
'FLUID-VAULT-T3-A': '0x18C8E1a43D12B218a2142d36aA0e885b39e5e8F6',
'FLUID-VAULT-T4-A': '0xD1574167A8EB19b006ae6F93Bc96d320a9a0C3C6',
'ZEROX-V5-A': '0xebB17b077FD2BD29422eE5Ed8E5DA0c506748A25',
'MERKLE-CLAIM-LRT-A': '0x4F2500Ac4334880C966dCAA220b54fd6664603F6'
'MERKLE-CLAIM-LRT-A': '0x4F2500Ac4334880C966dCAA220b54fd6664603F6',
'ZEROX-V2-A': '0xebB17b077FD2BD29422eE5Ed8E5DA0c506748A25',
}
3 changes: 2 additions & 1 deletion src/addresses/optimism/connectorsV2_M1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const connectorsV2_M1 = {
'PARASWAP-V5-A': '0x6793C4390Dd2f95a74E20329e93957243Ae70232',
'PARASWAP-A': '0x6793C4390Dd2f95a74E20329e93957243Ae70232',
'ZEROX-V4-A': '0x2a89237B746154FCda7aC90976dA95b44680A554',
'ZEROX-A': '0x2a89237B746154FCda7aC90976dA95b44680A554',
'ZEROX-A': '0xDC365b39e01767E22094CD0C4A67C5B6e5641B18',
'AVO-APPROVE-A': '0xCe162CbD45C8Ca7646C9B641D17B154D85924a09',
'AVO-APPROVE-STAGING-A': '0x426D8cC10ebbC9c6cB4d013209CdcAb46a51eD1a',
'CONNEXT-A': '0x0492B77bafd78E7124b0A6d81eFB470bF9aE53fC',
Expand All @@ -38,4 +38,5 @@ export const connectorsV2_M1 = {
'COMPOUND-V3-REWARDS-A': '0x389657de20592A0F5aD9eb4De44fE8293616B751',
'OKX-A': '0xF61617C863C58f864083377A446E051668DbDc51',
'ODOS-V2-A': '0x38cB414DA0620F2D7Ec3A9A1f185D519270F9538',
'ZEROX-V2-A': '0xDC365b39e01767E22094CD0C4A67C5B6e5641B18',
}
3 changes: 2 additions & 1 deletion src/addresses/polygon/connectorsV2_M1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const connectorsV2_M1 = {
'UNISWAP-V3-STAKE-A': '0x8a7fCeE0e1Ff6DB33C7E83060c18e3B97915A970',
'QUICKSWAP-A': '0x7B00D124Fc98107ff97fAc5d37493E1784Bb5C8E',
'PARASWAP-V5-A': '0x7f4466Faf06A2CA3b10e806cC21E2280E5Ef3D8f',
'ZEROX-A': '0x5450668E28476770151AfBA03b19ed262adF8446',
'ZEROX-A': '0x727b922F9C95ccD7F6d718eEf7b1343f22B112DB',
'ZEROX-V4-A': '0x5450668E28476770151AfBA03b19ed262adF8446',
'BASIC-B': '0xbB590B0FC4080E434adAc39a51DC9eE3335dbf09',
'BASIC-C': '0x288945d1E7a528e862f200ac24F30326A43000f9',
Expand Down Expand Up @@ -62,4 +62,5 @@ export const connectorsV2_M1 = {
'INSTAPOOL-D': '0xf2Ab6FF3707752557a8410e2cFc7F48B4E248Fa0',
'OKX-A': '0x06feaa505193e987B12f161F1dB73b1D4d604001',
'ODOS-V2-A': '0xC27822C1D54c47C28471090b6F465bB61A0469F9',
'ZEROX-V2-A': '0x727b922F9C95ccD7F6d718eEf7b1343f22B112DB',
}

0 comments on commit ea97d45

Please sign in to comment.