From f52b37c8482d444381b512c41166ee1f118f418e Mon Sep 17 00:00:00 2001 From: Samarendra Gouda Date: Wed, 20 Nov 2024 20:46:55 +0530 Subject: [PATCH 1/2] feat: add morpho new token wrapper --- package.json | 2 +- .../connectors/v2/MORPHO-TOKEN-WRAPPER-A.ts | 27 +++++++++++++++++++ src/abi/connectors/v2/index.ts | 4 ++- src/addresses/mainnet/connectorsV2_M1.ts | 1 + 4 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 src/abi/connectors/v2/MORPHO-TOKEN-WRAPPER-A.ts diff --git a/package.json b/package.json index 1531a2d..edeb4da 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dsa-connect", - "version": "0.7.10", + "version": "0.7.11", "description": "DSA connect", "main": "dist/index.js", "module": "dist/index.es.js", diff --git a/src/abi/connectors/v2/MORPHO-TOKEN-WRAPPER-A.ts b/src/abi/connectors/v2/MORPHO-TOKEN-WRAPPER-A.ts new file mode 100644 index 0000000..c44b831 --- /dev/null +++ b/src/abi/connectors/v2/MORPHO-TOKEN-WRAPPER-A.ts @@ -0,0 +1,27 @@ +import { AbiItem } from 'web3-utils' +export const MORPHO_TOKEN_WRAPPER_A: AbiItem[] = [ + { inputs: [], name: 'LessTokensReceived', type: 'error' }, + { + anonymous: false, + inputs: [{ indexed: true, internalType: 'uint256', name: 'newTokensReceived', type: 'uint256' }], + name: 'LogConvertToNewMorpho', + type: 'event' + }, + { + inputs: [], + name: 'convertToNewMorpho', + 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' + } +] diff --git a/src/abi/connectors/v2/index.ts b/src/abi/connectors/v2/index.ts index d84d501..6f55eba 100644 --- a/src/abi/connectors/v2/index.ts +++ b/src/abi/connectors/v2/index.ts @@ -146,6 +146,7 @@ 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' +import { MORPHO_TOKEN_WRAPPER_A } from "./MORPHO-TOKEN-WRAPPER-A" export const connectorsV2_M1 = { 'MORPHO-REWARDS-A': MORPHO_REWARDS_A, @@ -290,5 +291,6 @@ export const connectorsV2_M1 = { 'FLUID-VAULT-T4-A': FLUID_VAULT_T4_A, 'ZEROX-V5-A': ZEROX_V5_A, 'MERKLE-CLAIM-LRT-A': MERKLE_CLAIM_LRT_A, - 'ZEROX-V2-A': ZEROX_V2_A + 'ZEROX-V2-A': ZEROX_V2_A, + 'MORPHO-TOKEN-WRAPPER-A': MORPHO_TOKEN_WRAPPER_A } diff --git a/src/addresses/mainnet/connectorsV2_M1.ts b/src/addresses/mainnet/connectorsV2_M1.ts index c969e30..d9ac9e4 100644 --- a/src/addresses/mainnet/connectorsV2_M1.ts +++ b/src/addresses/mainnet/connectorsV2_M1.ts @@ -125,4 +125,5 @@ export const connectorsV2_M1 = { 'ZEROX-V5-A': '0xebB17b077FD2BD29422eE5Ed8E5DA0c506748A25', 'MERKLE-CLAIM-LRT-A': '0x4F2500Ac4334880C966dCAA220b54fd6664603F6', 'ZEROX-V2-A': '0xebB17b077FD2BD29422eE5Ed8E5DA0c506748A25', + 'MORPHO-TOKEN-WRAPPER-A': '0x2D73c8C3BA746976d43311324565f290c0C9d44E', } From ee57a4d35c6a8331e2bb61facadb1e582ec7f26d Mon Sep 17 00:00:00 2001 From: Samarendra Gouda Date: Thu, 21 Nov 2024 03:17:19 +0530 Subject: [PATCH 2/2] fix: remove abi err --- src/abi/connectors/v2/MORPHO-TOKEN-WRAPPER-A.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/abi/connectors/v2/MORPHO-TOKEN-WRAPPER-A.ts b/src/abi/connectors/v2/MORPHO-TOKEN-WRAPPER-A.ts index c44b831..f79ff3b 100644 --- a/src/abi/connectors/v2/MORPHO-TOKEN-WRAPPER-A.ts +++ b/src/abi/connectors/v2/MORPHO-TOKEN-WRAPPER-A.ts @@ -1,6 +1,5 @@ import { AbiItem } from 'web3-utils' export const MORPHO_TOKEN_WRAPPER_A: AbiItem[] = [ - { inputs: [], name: 'LessTokensReceived', type: 'error' }, { anonymous: false, inputs: [{ indexed: true, internalType: 'uint256', name: 'newTokensReceived', type: 'uint256' }],