From 9bea8e88c5a052a956ebddedb828b4fdfa2269b1 Mon Sep 17 00:00:00 2001 From: Danylo Kanievskyi Date: Thu, 12 Dec 2024 15:17:00 +0200 Subject: [PATCH] feat: use latest UsualM deployment --- src/abi/usual-m-wrapped-m/usualM.abi.json | 84 +++++++++++++++-------- src/dex/usual/usual-m-usd0.ts | 2 +- src/dex/usual/usual-m-wrapped-m.ts | 2 +- tests/constants-e2e.ts | 2 +- 4 files changed, 58 insertions(+), 32 deletions(-) diff --git a/src/abi/usual-m-wrapped-m/usualM.abi.json b/src/abi/usual-m-wrapped-m/usualM.abi.json index 96818b251..53ea08cd6 100644 --- a/src/abi/usual-m-wrapped-m/usualM.abi.json +++ b/src/abi/usual-m-wrapped-m/usualM.abi.json @@ -1,5 +1,12 @@ [ { "type": "constructor", "inputs": [], "stateMutability": "nonpayable" }, + { + "type": "function", + "name": "DECIMALS_NUMBER", + "inputs": [], + "outputs": [{ "name": "", "type": "uint8", "internalType": "uint8" }], + "stateMutability": "view" + }, { "type": "function", "name": "DOMAIN_SEPARATOR", @@ -74,19 +81,24 @@ "internalType": "address" }, { "name": "salt", "type": "bytes32", "internalType": "bytes32" }, - { - "name": "extensions", - "type": "uint256[]", - "internalType": "uint256[]" - } + { "name": "extensions", "type": "uint256[]", "internalType": "uint256[]" } ], "stateMutability": "view" }, + { + "type": "function", + "name": "getWrappableAmount", + "inputs": [ + { "name": "amount", "type": "uint256", "internalType": "uint256" } + ], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "stateMutability": "view" + }, { "type": "function", "name": "initialize", "inputs": [ - { "name": "smartM_", "type": "address", "internalType": "address" }, + { "name": "wrappedM_", "type": "address", "internalType": "address" }, { "name": "registryAccess_", "type": "address", @@ -105,6 +117,13 @@ "outputs": [{ "name": "", "type": "bool", "internalType": "bool" }], "stateMutability": "view" }, + { + "type": "function", + "name": "mintCap", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "stateMutability": "view" + }, { "type": "function", "name": "name", @@ -159,10 +178,12 @@ }, { "type": "function", - "name": "smartM", - "inputs": [], - "outputs": [{ "name": "", "type": "address", "internalType": "address" }], - "stateMutability": "view" + "name": "setMintCap", + "inputs": [ + { "name": "newMintCap", "type": "uint256", "internalType": "uint256" } + ], + "outputs": [], + "stateMutability": "nonpayable" }, { "type": "function", @@ -225,24 +246,6 @@ "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "nonpayable" }, - { - "type": "function", - "name": "unwrap", - "inputs": [ - { "name": "recipient", "type": "address", "internalType": "address" } - ], - "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "wrap", - "inputs": [ - { "name": "recipient", "type": "address", "internalType": "address" } - ], - "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], - "stateMutability": "nonpayable" - }, { "type": "function", "name": "wrap", @@ -267,6 +270,13 @@ "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "nonpayable" }, + { + "type": "function", + "name": "wrappedM", + "inputs": [], + "outputs": [{ "name": "", "type": "address", "internalType": "address" }], + "stateMutability": "view" + }, { "type": "event", "name": "Approval", @@ -324,6 +334,19 @@ ], "anonymous": false }, + { + "type": "event", + "name": "MintCapSet", + "inputs": [ + { + "name": "newMintCap", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, { "type": "event", "name": "Paused", @@ -473,11 +496,14 @@ { "name": "currentNonce", "type": "uint256", "internalType": "uint256" } ] }, + { "type": "error", "name": "InvalidAmount", "inputs": [] }, { "type": "error", "name": "InvalidInitialization", "inputs": [] }, + { "type": "error", "name": "InvalidUInt96", "inputs": [] }, + { "type": "error", "name": "MintCapExceeded", "inputs": [] }, { "type": "error", "name": "NotAuthorized", "inputs": [] }, { "type": "error", "name": "NotInitializing", "inputs": [] }, { "type": "error", "name": "SameValue", "inputs": [] }, { "type": "error", "name": "ZeroAddress", "inputs": [] }, { "type": "error", "name": "ZeroRegistryAccess", "inputs": [] }, - { "type": "error", "name": "ZeroSmartM", "inputs": [] } + { "type": "error", "name": "ZeroWrappedM", "inputs": [] } ] diff --git a/src/dex/usual/usual-m-usd0.ts b/src/dex/usual/usual-m-usd0.ts index a1649d344..653450cee 100644 --- a/src/dex/usual/usual-m-usd0.ts +++ b/src/dex/usual/usual-m-usd0.ts @@ -18,7 +18,7 @@ const Config: DexConfigMap = [Network.MAINNET]: { usualDaoCollateralAddress: '0xde6e1F680C4816446C8D515989E2358636A38b04', fromToken: { - address: '0xfe274c305b365dc38e188e8f01c4fae2171ce927', + address: '0x4cbc25559dbbd1272ec5b64c7b5f48a2405e6470', decimals: 6, }, toToken: { diff --git a/src/dex/usual/usual-m-wrapped-m.ts b/src/dex/usual/usual-m-wrapped-m.ts index b4a423f30..8eb5d822f 100644 --- a/src/dex/usual/usual-m-wrapped-m.ts +++ b/src/dex/usual/usual-m-wrapped-m.ts @@ -20,7 +20,7 @@ const Config: DexConfigMap = { decimals: 6, }, toToken: { - address: '0xfe274c305b365dc38e188e8f01c4fae2171ce927', + address: '0x4cbc25559dbbd1272ec5b64c7b5f48a2405e6470', decimals: 6, }, }, diff --git a/tests/constants-e2e.ts b/tests/constants-e2e.ts index ac161e99b..934bbdf7c 100644 --- a/tests/constants-e2e.ts +++ b/tests/constants-e2e.ts @@ -552,7 +552,7 @@ export const Tokens: { symbol: 'wM', }, UsualM: { - address: '0xFe274C305b365dC38e188E8f01c4FAe2171ce927', + address: '0x4cbc25559dbbd1272ec5b64c7b5f48a2405e6470', decimals: 6, symbol: 'USUALM', },