Skip to content

Commit

Permalink
Merge pull request #318 from Instadapp/f/okx
Browse files Browse the repository at this point in the history
feat: add OKX connectors
  • Loading branch information
SamarendraGouda authored Sep 11, 2024
2 parents 5337a59 + e97c9bb commit ae77b02
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 5 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.6.99",
"version": "0.6.100",
"description": "DSA connect",
"main": "dist/index.js",
"module": "dist/index.es.js",
Expand Down
40 changes: 40 additions & 0 deletions src/abi/connectors/v2/OKX-A.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { AbiItem } from 'web3-utils'

export const OKX_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 @@ -136,6 +136,7 @@ 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"
import { OKX_A } from "./OKX-A"

export const connectorsV2_M1 = {
'MORPHO-REWARDS-A': MORPHO_REWARDS_A,
Expand Down Expand Up @@ -270,5 +271,6 @@ export const connectorsV2_M1 = {
'SPARK-CLAIM-A': SPARK_CLAIM_A,
'FLUID-ARB-CLAIM-A': FLUID_ARB_CLAIM_A,
'WEETHS-A': WEETHS_A,
'ODOS-V2-A': ODOS_V2_A
'ODOS-V2-A': ODOS_V2_A,
'OKX-A': OKX_A,
}
3 changes: 2 additions & 1 deletion src/addresses/arbitrum/connectorsV2_M1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,6 @@ export const connectorsV2_M1 = {
'BASIC-D-V2': '0x389657de20592A0F5aD9eb4De44fE8293616B751',
'INSTAPOOL-D': '0x65f244005B002ecD701Eb44F042d64CCE1bb8D1b',
'FLUID-ARB-CLAIM-A': '0x95596f9C4477861C313B1dD5e20aCd1f3DFBc092',
'ODOS-V2-A': '0xf52AE7868e01074EaAd587060d75e996baed9aEF'
'ODOS-V2-A': '0xf52AE7868e01074EaAd587060d75e996baed9aEF',
'OKX-A': '0x28Fb3469E5650B4A979A9F3A54040407eB412Eed'
}
1 change: 1 addition & 0 deletions src/addresses/avalanche/connectorsV2_M1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ export const connectorsV2_M1 = {
'AVO-APPROVE-MULTISIG-STAGING-A': '0x832925F26de92062fca39262aC90939Ed508325b',
'PARASWAP-V6-A': '0x8b69e301EC529A96898a4b386E094D60F241a608',
'INSTAPOOL-D': '0xCFB46DbF4535F6C72BdFaf9FB8e7130fA03e24BC',
'OKX-A': '0xE761304F14FeeE3dB4491738DA175891Db430468'
}
1 change: 1 addition & 0 deletions src/addresses/base/connectorsV2_M1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ export const connectorsV2_M1 = {
'FLUID-A': '0x671E98Cd55587CFf8bA192489fFd968D804757D7',
'BASIC-D-V2': '0x748Fbb99DE5a89a506AB1DDF15839368402bEb4F',
'MORPHO-BLUE-A': '0x38cB414DA0620F2D7Ec3A9A1f185D519270F9538',
'OKX-A': '0x0cAF0705a21Be560690A14e4e6D61A3A167fB026'
}
3 changes: 2 additions & 1 deletion src/addresses/mainnet/connectorsV2_M1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,6 @@ export const connectorsV2_M1 = {
'PARASWAP-V6-A': '0x6e5484d041aF87CD6C95cd95bd5bE7eA786098D3',
'MERKLE-CLAIM-A': '0xee85F567efc35621145dCf62f341d095D94b9F65',
'SPARK-CLAIM-A': '0xC36a19FFA9D050EEe5D53Fa15095Dc1228767EcF',
'WEETHS-A': '0x8714DDa838b9fd0CF426545D319721c086833d59'
'WEETHS-A': '0x8714DDa838b9fd0CF426545D319721c086833d59',
'OKX-A': '0x69107F54d58400b38E4e7fE8037bff5C35EE222f'
}
3 changes: 2 additions & 1 deletion src/addresses/optimism/connectorsV2_M1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@ export const connectorsV2_M1 = {
'PARASWAP-V6-A': '0xcDAb2C496A96B6Df19f3f305933088eE2d74C5bA',
'INSTAPOOL-D': '0x43416B914a9F66C46FF0dD9Ca05Bc297989f8F7E',
'COMPOUND-V3-A': ' 0xDb08a687bC3Cf7127F7933146D08d1De2a73ef87',
'COMPOUND-V3-REWARDS-A': '0x389657de20592A0F5aD9eb4De44fE8293616B751'
'COMPOUND-V3-REWARDS-A': '0x389657de20592A0F5aD9eb4De44fE8293616B751',
'OKX-A': '0xF61617C863C58f864083377A446E051668DbDc51'
}
1 change: 1 addition & 0 deletions src/addresses/polygon/connectorsV2_M1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,5 @@ export const connectorsV2_M1 = {
'FLUID-STAKING-A': '0xFF93C10FB34f7069071D0679c45ed77A98f37f21',
'PARASWAP-V6-A': '0xc6639CE123d779fE6eA545B70CbDc1dCA421740d',
'INSTAPOOL-D': '0xf2Ab6FF3707752557a8410e2cFc7F48B4E248Fa0',
'OKX-A': '0x06feaa505193e987B12f161F1dB73b1D4d604001',
}

0 comments on commit ae77b02

Please sign in to comment.