From eb0a5e5e51a448a5068f1ec1fa4731cd2c97586e Mon Sep 17 00:00:00 2001 From: Michael Mueller Date: Thu, 22 Sep 2022 12:18:54 +0200 Subject: [PATCH 1/2] chore: bump Pool v2 packages to beta.1 --- package.json | 6 +++--- yarn.lock | 24 ++++++++++++------------ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index c50af49..984e7a6 100644 --- a/package.json +++ b/package.json @@ -59,13 +59,13 @@ "@maplelabs/loanV1": "npm:@maplelabs/loan@v1.0.0", "@maplelabs/loanV2": "npm:@maplelabs/loan@v2.0.0", "@maplelabs/loanV3": "npm:@maplelabs/loan@v3.0.0", - "@maplelabs/loanV4": "npm:@maplelabs/loan@v4.0.0-beta.0", + "@maplelabs/loanV4": "npm:@maplelabs/loan@v4.0.0-beta.1", "@maplelabs/mapleGlobals": "npm:@maplelabs/globals@v1.0.0", - "@maplelabs/mapleGlobalsV2": "npm:@maplelabs/globals-v2@1.0.0-beta.0", + "@maplelabs/mapleGlobalsV2": "npm:@maplelabs/globals-v2@1.0.0-beta.1", "@maplelabs/mapleToken": "npm:@maplelabs/maple-token@1.0.0 ", "@maplelabs/mplRewards": "npm:@maplelabs/mpl-rewards@v1.0.0", "@maplelabs/pool": "npm:@maplelabs/pool@v1.0.0", - "@maplelabs/poolV2": "npm:@maplelabs/pool-v2@1.0.0-beta.0", + "@maplelabs/poolV2": "npm:@maplelabs/pool-v2@1.0.0-beta.1.1", "@maplelabs/premiumCalculator": "npm:@maplelabs/premium-calculator@v1.0.0", "@maplelabs/repaymentCalculator": "npm:@maplelabs/repayment-calculator@v1.0.0", "@maplelabs/stakeLocker": "npm:@maplelabs/stake-locker@v1.0.0", diff --git a/yarn.lock b/yarn.lock index 3c43587..1a502b1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -951,20 +951,20 @@ resolved "https://registry.npmjs.org/@maplelabs/loan/-/loan-3.0.0.tgz#bb0f3aca056d3198e164310f418c4fa0809efbe1" integrity sha512-bfcKvwZz/MhnzZtFCN8n5OAPOyHJQrOXdb9xIwYu5sNQ4HMNwZySz/F5BGfmNCrJZd+WiNK1oFi4gKzHlmy57w== -"@maplelabs/loanV4@npm:@maplelabs/loan@v4.0.0-beta.0": - version "4.0.0-beta.0" - resolved "https://registry.yarnpkg.com/@maplelabs/loan/-/loan-4.0.0-beta.0.tgz#4394b01b216489bb287c8a92f831f747eb0ca971" - integrity sha512-K0nX2Gf3QU1vi0L5Uq/PGwbfxZN7wpqjGjHFPgXO58cPULmDW4+2hd+IAzLz8EffRSJNhcCTuJeWMDyJ/bFLgg== +"@maplelabs/loanV4@npm:@maplelabs/loan@v4.0.0-beta.1": + version "4.0.0-beta.1" + resolved "https://registry.yarnpkg.com/@maplelabs/loan/-/loan-4.0.0-beta.1.tgz#90efa295100047069134e9b8b7028fd24be57a8f" + integrity sha512-OMJHI9lfK1QSjiTLox5eyaPSC8gse0lXCrNeCbbm89PE6ZfDd2WFZwcjAg2CCzyg+WzxEKkhpqusr7TGfjWLnQ== "@maplelabs/mapleGlobals@npm:@maplelabs/globals@v1.0.0": version "1.0.0" resolved "https://registry.npmjs.org/@maplelabs/globals/-/globals-1.0.0.tgz#85fd3e667cdb5cd26e5882951e8a7cf7426645fe" integrity sha512-pNqeltNI03JD0PdvZinJKP9UE9Xu8jFRzVxXm3mHMmLFkJmsEgwh2J8Sr8+2HSKouS9eX9RiH6vCh+nUwo45ug== -"@maplelabs/mapleGlobalsV2@npm:@maplelabs/globals-v2@1.0.0-beta.0": - version "1.0.0-beta.0" - resolved "https://registry.yarnpkg.com/@maplelabs/globals-v2/-/globals-v2-1.0.0-beta.0.tgz#4326996c149373548ead5055af90dd41872e09ab" - integrity sha512-l5lUXsI9gEh2/gL7QPb1RAXRBO0ugJy5Hi/RaXbJ8KQQtXJS6nukFos6McxZfS73KI7j3NpfvPAPmY3WwOqLIA== +"@maplelabs/mapleGlobalsV2@npm:@maplelabs/globals-v2@1.0.0-beta.1": + version "1.0.0-beta.1" + resolved "https://registry.yarnpkg.com/@maplelabs/globals-v2/-/globals-v2-1.0.0-beta.1.tgz#f32b3b98af1fa83ba586e7447a3003e188adbf24" + integrity sha512-ojYK1cJymL9wRss+woWnKvMjDXUedm6PiqwxasRTAtSJ7k/X5k0ZADmC7PEx1D/JKsjFlYOZFbcSmCesuG7UdQ== "@maplelabs/mapleToken@npm:@maplelabs/maple-token@1.0.0 ": version "1.0.0" @@ -981,10 +981,10 @@ resolved "https://registry.npmjs.org/@maplelabs/pool/-/pool-1.0.0.tgz#7b04e9aee854d941a60445adb2f5cd54ab78d434" integrity sha512-2X2Q+IfLgkGRO4aeEXeWnaTzEKW2bMAJW/140tnw+YG4thbZloyYRI2hrrplTzjFaWkB6MvZgAOhSiHfrie0nQ== -"@maplelabs/poolV2@npm:@maplelabs/pool-v2@1.0.0-beta.0": - version "1.0.0-beta.0" - resolved "https://registry.yarnpkg.com/@maplelabs/pool-v2/-/pool-v2-1.0.0-beta.0.tgz#706717c527d5bcd937312c4f9cdce3395bd607d7" - integrity sha512-iZ2bhyPduDia24MCBKj1mcEyfK6c8lnLdYQsQ2zaqeOR2l73MPA+8Ph0KrFoK/T8C42TzfdIIGrBZOAB4k141w== +"@maplelabs/poolV2@npm:@maplelabs/pool-v2@1.0.0-beta.1.1": + version "1.0.0-beta.1.1" + resolved "https://registry.yarnpkg.com/@maplelabs/pool-v2/-/pool-v2-1.0.0-beta.1.1.tgz#c915aa09b8ddcd5f1db68c2df5db25fc9ef6354f" + integrity sha512-HhK2A6OdTQ9tlhNGFkOK1cmthwY2K8/9EVd/q/iFG2BDVqM4zNonY3jwP1kCzbWzIUjHCPERhDprf0zjZ/Q5bg== "@maplelabs/premiumCalculator@npm:@maplelabs/premium-calculator@v1.0.0": version "1.0.0" From 13f08ee21623b4417b247c92ba937e3febddb00b Mon Sep 17 00:00:00 2001 From: Michael Mueller Date: Thu, 22 Sep 2022 12:19:19 +0200 Subject: [PATCH 2/2] chore: update ABIs --- src/abis/DebtLockerV3Factory.abi.json | 477 -------------------------- src/abis/LoanManager.abi.json | 119 +++++-- src/abis/LoanV3Factory.abi.json | 464 ------------------------- src/abis/LoanV4.abi.json | 59 ++-- src/abis/LoanV4Factory.abi.json | 464 ------------------------- src/abis/LoanV4Initializer.abi.json | 26 +- src/abis/MapleGlobalsV2.abi.json | 54 ++- src/abis/PoolManager.abi.json | 135 +++++--- 8 files changed, 279 insertions(+), 1519 deletions(-) delete mode 100644 src/abis/DebtLockerV3Factory.abi.json delete mode 100644 src/abis/LoanV3Factory.abi.json delete mode 100644 src/abis/LoanV4Factory.abi.json diff --git a/src/abis/DebtLockerV3Factory.abi.json b/src/abis/DebtLockerV3Factory.abi.json deleted file mode 100644 index 8d854bb..0000000 --- a/src/abis/DebtLockerV3Factory.abi.json +++ /dev/null @@ -1,477 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "address", - "name": "mapleGlobals_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "version_", - "type": "uint256" - } - ], - "name": "DefaultVersionSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "version_", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "implementationAddress_", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "initializer_", - "type": "address" - } - ], - "name": "ImplementationRegistered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "version_", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "instance_", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "initializationArguments_", - "type": "bytes" - } - ], - "name": "InstanceDeployed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "instance_", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "fromVersion_", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "toVersion_", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "migrationArguments_", - "type": "bytes" - } - ], - "name": "InstanceUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "mapleGlobals_", - "type": "address" - } - ], - "name": "MapleGlobalsSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "fromVersion_", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "toVersion_", - "type": "uint256" - } - ], - "name": "UpgradePathDisabled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "fromVersion_", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "toVersion_", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "migrator_", - "type": "address" - } - ], - "name": "UpgradePathEnabled", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "arguments_", - "type": "bytes" - }, - { - "internalType": "bytes32", - "name": "salt_", - "type": "bytes32" - } - ], - "name": "createInstance", - "outputs": [ - { - "internalType": "address", - "name": "instance_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "defaultImplementation", - "outputs": [ - { - "internalType": "address", - "name": "defaultImplementation_", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "defaultVersion", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "fromVersion_", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "toVersion_", - "type": "uint256" - } - ], - "name": "disableUpgradePath", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "fromVersion_", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "toVersion_", - "type": "uint256" - }, - { - "internalType": "address", - "name": "migrator_", - "type": "address" - } - ], - "name": "enableUpgradePath", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "factoryType", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "arguments_", - "type": "bytes" - }, - { - "internalType": "bytes32", - "name": "salt_", - "type": "bytes32" - } - ], - "name": "getInstanceAddress", - "outputs": [ - { - "internalType": "address", - "name": "instanceAddress_", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "version_", - "type": "uint256" - } - ], - "name": "implementationOf", - "outputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "mapleGlobals", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "oldVersion_", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "newVersion_", - "type": "uint256" - } - ], - "name": "migratorForPath", - "outputs": [ - { - "internalType": "address", - "name": "migrator_", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "loan_", - "type": "address" - } - ], - "name": "newLocker", - "outputs": [ - { - "internalType": "address", - "name": "debtLocker_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "version_", - "type": "uint256" - }, - { - "internalType": "address", - "name": "implementationAddress_", - "type": "address" - }, - { - "internalType": "address", - "name": "initializer_", - "type": "address" - } - ], - "name": "registerImplementation", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "version_", - "type": "uint256" - } - ], - "name": "setDefaultVersion", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "mapleGlobals_", - "type": "address" - } - ], - "name": "setGlobals", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "upgradeEnabledForPath", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "toVersion_", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "arguments_", - "type": "bytes" - } - ], - "name": "upgradeInstance", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - } - ], - "name": "versionOf", - "outputs": [ - { - "internalType": "uint256", - "name": "version_", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - } -] \ No newline at end of file diff --git a/src/abis/LoanManager.abi.json b/src/abis/LoanManager.abi.json index 40e2a37..a70724c 100644 --- a/src/abis/LoanManager.abi.json +++ b/src/abis/LoanManager.abi.json @@ -62,6 +62,80 @@ "name": "MinRatioSet", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "loan_", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "paymentId_", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "platformManagementFeeRate_", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "delegateManagementFeeRate_", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "startDate_", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nextPaymentDueDate_", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "netRefinanceInterest_", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newRate_", + "type": "uint256" + } + ], + "name": "PaymentAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "loan_", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "paymentId_", + "type": "uint256" + } + ], + "name": "PaymentRemoved", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -301,7 +375,7 @@ "inputs": [ { "internalType": "address", - "name": "loanAddress_", + "name": "loan_", "type": "address" } ], @@ -386,6 +460,24 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "loan_", + "type": "address" + }, + { + "internalType": "bool", + "name": "isGovernor_", + "type": "bool" + } + ], + "name": "impairLoan", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [], "name": "implementation", @@ -684,7 +776,7 @@ "type": "bool" } ], - "name": "removeDefaultWarning", + "name": "removeLoanImpairment", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -773,6 +865,11 @@ "internalType": "address", "name": "loan_", "type": "address" + }, + { + "internalType": "address", + "name": "liquidatorFactory_", + "type": "address" } ], "name": "triggerDefault", @@ -796,24 +893,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "loan_", - "type": "address" - }, - { - "internalType": "bool", - "name": "isGovernor_", - "type": "bool" - } - ], - "name": "triggerDefaultWarning", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [], "name": "unrealizedLosses", diff --git a/src/abis/LoanV3Factory.abi.json b/src/abis/LoanV3Factory.abi.json deleted file mode 100644 index 963d01a..0000000 --- a/src/abis/LoanV3Factory.abi.json +++ /dev/null @@ -1,464 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "address", - "name": "mapleGlobals_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "version_", - "type": "uint256" - } - ], - "name": "DefaultVersionSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "version_", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "implementationAddress_", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "initializer_", - "type": "address" - } - ], - "name": "ImplementationRegistered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "version_", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "instance_", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "initializationArguments_", - "type": "bytes" - } - ], - "name": "InstanceDeployed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "instance_", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "fromVersion_", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "toVersion_", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "migrationArguments_", - "type": "bytes" - } - ], - "name": "InstanceUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "mapleGlobals_", - "type": "address" - } - ], - "name": "MapleGlobalsSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "fromVersion_", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "toVersion_", - "type": "uint256" - } - ], - "name": "UpgradePathDisabled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "fromVersion_", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "toVersion_", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "migrator_", - "type": "address" - } - ], - "name": "UpgradePathEnabled", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "arguments_", - "type": "bytes" - }, - { - "internalType": "bytes32", - "name": "salt_", - "type": "bytes32" - } - ], - "name": "createInstance", - "outputs": [ - { - "internalType": "address", - "name": "instance_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "defaultImplementation", - "outputs": [ - { - "internalType": "address", - "name": "defaultImplementation_", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "defaultVersion", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "fromVersion_", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "toVersion_", - "type": "uint256" - } - ], - "name": "disableUpgradePath", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "fromVersion_", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "toVersion_", - "type": "uint256" - }, - { - "internalType": "address", - "name": "migrator_", - "type": "address" - } - ], - "name": "enableUpgradePath", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "arguments_", - "type": "bytes" - }, - { - "internalType": "bytes32", - "name": "salt_", - "type": "bytes32" - } - ], - "name": "getInstanceAddress", - "outputs": [ - { - "internalType": "address", - "name": "instanceAddress_", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "version_", - "type": "uint256" - } - ], - "name": "implementationOf", - "outputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "isLoan", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "mapleGlobals", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "oldVersion_", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "newVersion_", - "type": "uint256" - } - ], - "name": "migratorForPath", - "outputs": [ - { - "internalType": "address", - "name": "migrator_", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "version_", - "type": "uint256" - }, - { - "internalType": "address", - "name": "implementationAddress_", - "type": "address" - }, - { - "internalType": "address", - "name": "initializer_", - "type": "address" - } - ], - "name": "registerImplementation", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "version_", - "type": "uint256" - } - ], - "name": "setDefaultVersion", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "mapleGlobals_", - "type": "address" - } - ], - "name": "setGlobals", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "upgradeEnabledForPath", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "toVersion_", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "arguments_", - "type": "bytes" - } - ], - "name": "upgradeInstance", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - } - ], - "name": "versionOf", - "outputs": [ - { - "internalType": "uint256", - "name": "version_", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - } -] \ No newline at end of file diff --git a/src/abis/LoanV4.abi.json b/src/abis/LoanV4.abi.json index 8086a8e..05c7cd6 100644 --- a/src/abis/LoanV4.abi.json +++ b/src/abis/LoanV4.abi.json @@ -207,6 +207,19 @@ "name": "LoanClosed", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "nextPaymentDueDate_", + "type": "uint256" + } + ], + "name": "LoanImpaired", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -300,19 +313,6 @@ "name": "NewTermsRejected", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "nextPaymentDueDate_", - "type": "uint256" - } - ], - "name": "NextPaymentDueDateFastForwarded", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -869,6 +869,13 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "impairLoan", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [], "name": "implementation", @@ -897,11 +904,11 @@ }, { "inputs": [], - "name": "isInDefaultWarning", + "name": "isImpaired", "outputs": [ { "internalType": "bool", - "name": "isInDefaultWarning_", + "name": "isImpaired_", "type": "bool" } ], @@ -1007,6 +1014,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "originalNextPaymentDueDate", + "outputs": [ + { + "internalType": "uint256", + "name": "originalNextPaymentDueDate_", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "paymentInterval", @@ -1208,7 +1228,7 @@ }, { "inputs": [], - "name": "removeDefaultWarning", + "name": "removeLoanImpairment", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -1319,13 +1339,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "triggerDefaultWarning", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { diff --git a/src/abis/LoanV4Factory.abi.json b/src/abis/LoanV4Factory.abi.json deleted file mode 100644 index 963d01a..0000000 --- a/src/abis/LoanV4Factory.abi.json +++ /dev/null @@ -1,464 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "address", - "name": "mapleGlobals_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "version_", - "type": "uint256" - } - ], - "name": "DefaultVersionSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "version_", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "implementationAddress_", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "initializer_", - "type": "address" - } - ], - "name": "ImplementationRegistered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "version_", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "instance_", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "initializationArguments_", - "type": "bytes" - } - ], - "name": "InstanceDeployed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "instance_", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "fromVersion_", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "toVersion_", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "migrationArguments_", - "type": "bytes" - } - ], - "name": "InstanceUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "mapleGlobals_", - "type": "address" - } - ], - "name": "MapleGlobalsSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "fromVersion_", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "toVersion_", - "type": "uint256" - } - ], - "name": "UpgradePathDisabled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "fromVersion_", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "toVersion_", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "migrator_", - "type": "address" - } - ], - "name": "UpgradePathEnabled", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "arguments_", - "type": "bytes" - }, - { - "internalType": "bytes32", - "name": "salt_", - "type": "bytes32" - } - ], - "name": "createInstance", - "outputs": [ - { - "internalType": "address", - "name": "instance_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "defaultImplementation", - "outputs": [ - { - "internalType": "address", - "name": "defaultImplementation_", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "defaultVersion", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "fromVersion_", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "toVersion_", - "type": "uint256" - } - ], - "name": "disableUpgradePath", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "fromVersion_", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "toVersion_", - "type": "uint256" - }, - { - "internalType": "address", - "name": "migrator_", - "type": "address" - } - ], - "name": "enableUpgradePath", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "arguments_", - "type": "bytes" - }, - { - "internalType": "bytes32", - "name": "salt_", - "type": "bytes32" - } - ], - "name": "getInstanceAddress", - "outputs": [ - { - "internalType": "address", - "name": "instanceAddress_", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "version_", - "type": "uint256" - } - ], - "name": "implementationOf", - "outputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "isLoan", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "mapleGlobals", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "oldVersion_", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "newVersion_", - "type": "uint256" - } - ], - "name": "migratorForPath", - "outputs": [ - { - "internalType": "address", - "name": "migrator_", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "version_", - "type": "uint256" - }, - { - "internalType": "address", - "name": "implementationAddress_", - "type": "address" - }, - { - "internalType": "address", - "name": "initializer_", - "type": "address" - } - ], - "name": "registerImplementation", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "version_", - "type": "uint256" - } - ], - "name": "setDefaultVersion", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "mapleGlobals_", - "type": "address" - } - ], - "name": "setGlobals", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "upgradeEnabledForPath", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "toVersion_", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "arguments_", - "type": "bytes" - } - ], - "name": "upgradeInstance", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - } - ], - "name": "versionOf", - "outputs": [ - { - "internalType": "uint256", - "name": "version_", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - } -] \ No newline at end of file diff --git a/src/abis/LoanV4Initializer.abi.json b/src/abis/LoanV4Initializer.abi.json index e5b968f..2555c44 100644 --- a/src/abis/LoanV4Initializer.abi.json +++ b/src/abis/LoanV4Initializer.abi.json @@ -207,6 +207,19 @@ "name": "LoanClosed", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "nextPaymentDueDate_", + "type": "uint256" + } + ], + "name": "LoanImpaired", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -300,19 +313,6 @@ "name": "NewTermsRejected", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "nextPaymentDueDate_", - "type": "uint256" - } - ], - "name": "NextPaymentDueDateFastForwarded", - "type": "event" - }, { "anonymous": false, "inputs": [ diff --git a/src/abis/MapleGlobalsV2.abi.json b/src/abis/MapleGlobalsV2.abi.json index 7a4c6c8..7eccccb 100644 --- a/src/abis/MapleGlobalsV2.abi.json +++ b/src/abis/MapleGlobalsV2.abi.json @@ -1,20 +1,4 @@ [ - { - "inputs": [ - { - "internalType": "uint128", - "name": "defaultTimelockDelay_", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "defaultTimelockDuration_", - "type": "uint128" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, { "anonymous": false, "inputs": [ @@ -139,6 +123,25 @@ "name": "GovernorshipAccepted", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "asset_", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "price_", + "type": "uint256" + } + ], + "name": "ManualOverridePriceSet", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -329,6 +332,25 @@ "name": "PoolManagerOwnershipTransferred", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "asset_", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "oracle_", + "type": "address" + } + ], + "name": "PriceOracleSet", + "type": "event" + }, { "anonymous": false, "inputs": [ diff --git a/src/abis/PoolManager.abi.json b/src/abis/PoolManager.abi.json index 3d91ed7..9862cc4 100644 --- a/src/abis/PoolManager.abi.json +++ b/src/abis/PoolManager.abi.json @@ -80,58 +80,70 @@ "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "loan_", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "managementFeeRate_", + "type": "uint256" } ], - "name": "DefaultWarningRemoved", + "name": "DelegateManagementFeeRateSet", "type": "event" }, { "anonymous": false, "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "loan_", - "type": "address" - }, { "indexed": false, "internalType": "uint256", - "name": "newPaymentDueDate_", + "name": "liquidityCap_", "type": "uint256" } ], - "name": "DefaultWarningTriggered", + "name": "LiquidityCapSet", "type": "event" }, { "anonymous": false, "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "loan_", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "loanManager_", + "type": "address" + }, { "indexed": false, "internalType": "uint256", - "name": "managementFeeRate_", + "name": "amount_", "type": "uint256" } ], - "name": "DelegateManagementFeeRateSet", + "name": "LoanFunded", "type": "event" }, { "anonymous": false, "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "loan_", + "type": "address" + }, { "indexed": false, "internalType": "uint256", - "name": "liquidityCap_", + "name": "newPaymentDueDate_", "type": "uint256" } ], - "name": "LiquidityCapSet", + "name": "LoanImpaired", "type": "event" }, { @@ -142,21 +154,9 @@ "internalType": "address", "name": "loan_", "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "loanManager_", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount_", - "type": "uint256" } ], - "name": "LoanFunded", + "name": "LoanImpairmentRemoved", "type": "event" }, { @@ -784,6 +784,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "loan_", + "type": "address" + } + ], + "name": "impairLoan", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [], "name": "implementation", @@ -1130,7 +1143,7 @@ "type": "address" } ], - "name": "removeDefaultWarning", + "name": "removeLoanImpairment", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -1221,6 +1234,29 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "loanManager_", + "type": "address" + }, + { + "internalType": "address", + "name": "collateralAsset_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allowedSlippage_", + "type": "uint256" + } + ], + "name": "setAllowedSlippage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -1260,6 +1296,29 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "loanManager_", + "type": "address" + }, + { + "internalType": "address", + "name": "collateralAsset_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "minRatio_", + "type": "uint256" + } + ], + "name": "setMinRatio", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [], "name": "setOpenToPublic", @@ -1312,22 +1371,14 @@ "internalType": "address", "name": "loan_", "type": "address" - } - ], - "name": "triggerDefault", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + }, { "internalType": "address", - "name": "loan_", + "name": "liquidatorFactory_", "type": "address" } ], - "name": "triggerDefaultWarning", + "name": "triggerDefault", "outputs": [], "stateMutability": "nonpayable", "type": "function"