@defisaver/automation-sdk 1.2.33 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/abis/legacy_AaveV2Subscriptions.json +1 -1
- package/esm/abis/legacy_CompoundV2Subscriptions.json +1 -1
- package/esm/abis/legacy_MakerSubscriptions.json +1 -1
- package/esm/services/strategiesService.js +36 -36
- package/esm/services/strategySubService.d.ts +9 -9
- package/esm/services/strategySubService.js +31 -31
- package/esm/services/subDataService.d.ts +4 -4
- package/esm/services/subDataService.js +20 -20
- package/esm/types/index.d.ts +4 -4
- package/package.json +1 -1
- package/src/abis/legacy_AaveV2Subscriptions.json +1 -1
- package/src/abis/legacy_CompoundV2Subscriptions.json +1 -1
- package/src/abis/legacy_MakerSubscriptions.json +1 -1
- package/src/services/strategiesService.ts +36 -36
- package/src/services/strategySubService.ts +56 -56
- package/src/services/subDataService.ts +32 -32
- package/src/types/contracts/generated/Legacy_AaveV2Subscriptions.ts +8 -8
- package/src/types/contracts/generated/Legacy_CompoundV2Subscriptions.ts +8 -8
- package/src/types/contracts/generated/Legacy_MakerSubscriptions.ts +11 -11
- package/src/types/index.ts +4 -4
- package/umd/index.js +73 -73
- package/yarn-error.log +7233 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"abi": [{ "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": false, "internalType": "uint128", "name": "", "type": "uint128" }, { "indexed": false, "internalType": "uint128", "name": "", "type": "uint128" }, { "indexed": false, "internalType": "uint128", "name": "", "type": "uint128" }, { "indexed": false, "internalType": "uint128", "name": "", "type": "uint128" }, { "indexed": false, "internalType": "bool", "name": "", "type": "bool" }], "name": "ParamUpdates", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "user", "type": "address" }], "name": "Subscribed", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "user", "type": "address" }], "name": "Unsubscribed", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "user", "type": "address" }], "name": "Updated", "type": "event" }, { "inputs": [], "name": "NAME", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "admin", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "changeIndex", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_user", "type": "address" }], "name": "getHolder", "outputs": [{ "components": [{ "internalType": "address", "name": "user", "type": "address" }, { "internalType": "uint128", "name": "
|
|
2
|
+
"abi": [{ "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": false, "internalType": "uint128", "name": "", "type": "uint128" }, { "indexed": false, "internalType": "uint128", "name": "", "type": "uint128" }, { "indexed": false, "internalType": "uint128", "name": "", "type": "uint128" }, { "indexed": false, "internalType": "uint128", "name": "", "type": "uint128" }, { "indexed": false, "internalType": "bool", "name": "", "type": "bool" }], "name": "ParamUpdates", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "user", "type": "address" }], "name": "Subscribed", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "user", "type": "address" }], "name": "Unsubscribed", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "user", "type": "address" }], "name": "Updated", "type": "event" }, { "inputs": [], "name": "NAME", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "admin", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "changeIndex", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_user", "type": "address" }], "name": "getHolder", "outputs": [{ "components": [{ "internalType": "address", "name": "user", "type": "address" }, { "internalType": "uint128", "name": "triggerRepayRatio", "type": "uint128" }, { "internalType": "uint128", "name": "triggerBoostRatio", "type": "uint128" }, { "internalType": "uint128", "name": "optimalRatioBoost", "type": "uint128" }, { "internalType": "uint128", "name": "optimalRatioRepay", "type": "uint128" }, { "internalType": "bool", "name": "boostEnabled", "type": "bool" }], "internalType": "struct AaveSubscriptionsV2.AaveHolder", "name": "", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getSubscribers", "outputs": [{ "components": [{ "internalType": "address", "name": "user", "type": "address" }, { "internalType": "uint128", "name": "triggerRepayRatio", "type": "uint128" }, { "internalType": "uint128", "name": "triggerBoostRatio", "type": "uint128" }, { "internalType": "uint128", "name": "optimalRatioBoost", "type": "uint128" }, { "internalType": "uint128", "name": "optimalRatioRepay", "type": "uint128" }, { "internalType": "bool", "name": "boostEnabled", "type": "bool" }], "internalType": "struct AaveSubscriptionsV2.AaveHolder[]", "name": "", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_page", "type": "uint256" }, { "internalType": "uint256", "name": "_perPage", "type": "uint256" }], "name": "getSubscribersByPage", "outputs": [{ "components": [{ "internalType": "address", "name": "user", "type": "address" }, { "internalType": "uint128", "name": "triggerRepayRatio", "type": "uint128" }, { "internalType": "uint128", "name": "triggerBoostRatio", "type": "uint128" }, { "internalType": "uint128", "name": "optimalRatioBoost", "type": "uint128" }, { "internalType": "uint128", "name": "optimalRatioRepay", "type": "uint128" }, { "internalType": "bool", "name": "boostEnabled", "type": "bool" }], "internalType": "struct AaveSubscriptionsV2.AaveHolder[]", "name": "", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_user", "type": "address" }], "name": "isSubscribed", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "kill", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_admin", "type": "address" }], "name": "setAdminByAdmin", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_admin", "type": "address" }], "name": "setAdminByOwner", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_owner", "type": "address" }], "name": "setOwnerByAdmin", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint128", "name": "_triggerRepayRatio", "type": "uint128" }, { "internalType": "uint128", "name": "_triggerBoostRatio", "type": "uint128" }, { "internalType": "uint128", "name": "_optimalBoost", "type": "uint128" }, { "internalType": "uint128", "name": "_optimalRepay", "type": "uint128" }, { "internalType": "bool", "name": "_boostEnabled", "type": "bool" }], "name": "subscribe", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "name": "subscribers", "outputs": [{ "internalType": "address", "name": "user", "type": "address" }, { "internalType": "uint128", "name": "triggerRepayRatio", "type": "uint128" }, { "internalType": "uint128", "name": "triggerBoostRatio", "type": "uint128" }, { "internalType": "uint128", "name": "optimalRatioBoost", "type": "uint128" }, { "internalType": "uint128", "name": "optimalRatioRepay", "type": "uint128" }, { "internalType": "bool", "name": "boostEnabled", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "", "type": "address" }], "name": "subscribersPos", "outputs": [{ "internalType": "uint256", "name": "arrPos", "type": "uint256" }, { "internalType": "bool", "name": "subscribed", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "unsubscribe", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_user", "type": "address" }], "name": "unsubscribeByAdmin", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_token", "type": "address" }, { "internalType": "uint256", "name": "_amount", "type": "uint256" }], "name": "withdrawStuckFunds", "outputs": [], "stateMutability": "nonpayable", "type": "function" }],
|
|
3
3
|
"networks": {
|
|
4
4
|
"1": {
|
|
5
5
|
"address": "0x6B25043BF08182d8e86056C6548847aF607cd7CD"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"abi": [{ "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": false, "internalType": "uint128", "name": "", "type": "uint128" }, { "indexed": false, "internalType": "uint128", "name": "", "type": "uint128" }, { "indexed": false, "internalType": "uint128", "name": "", "type": "uint128" }, { "indexed": false, "internalType": "uint128", "name": "", "type": "uint128" }, { "indexed": false, "internalType": "bool", "name": "", "type": "bool" }], "name": "ParamUpdates", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "user", "type": "address" }], "name": "Subscribed", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "user", "type": "address" }], "name": "Unsubscribed", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "user", "type": "address" }], "name": "Updated", "type": "event" }, { "inputs": [], "name": "admin", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "changeIndex", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_user", "type": "address" }], "name": "getHolder", "outputs": [{ "components": [{ "internalType": "address", "name": "user", "type": "address" }, { "internalType": "uint128", "name": "
|
|
2
|
+
"abi": [{ "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": false, "internalType": "uint128", "name": "", "type": "uint128" }, { "indexed": false, "internalType": "uint128", "name": "", "type": "uint128" }, { "indexed": false, "internalType": "uint128", "name": "", "type": "uint128" }, { "indexed": false, "internalType": "uint128", "name": "", "type": "uint128" }, { "indexed": false, "internalType": "bool", "name": "", "type": "bool" }], "name": "ParamUpdates", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "user", "type": "address" }], "name": "Subscribed", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "user", "type": "address" }], "name": "Unsubscribed", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "user", "type": "address" }], "name": "Updated", "type": "event" }, { "inputs": [], "name": "admin", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "changeIndex", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_user", "type": "address" }], "name": "getHolder", "outputs": [{ "components": [{ "internalType": "address", "name": "user", "type": "address" }, { "internalType": "uint128", "name": "triggerRepayRatio", "type": "uint128" }, { "internalType": "uint128", "name": "triggerBoostRatio", "type": "uint128" }, { "internalType": "uint128", "name": "optimalRatioBoost", "type": "uint128" }, { "internalType": "uint128", "name": "optimalRatioRepay", "type": "uint128" }, { "internalType": "bool", "name": "boostEnabled", "type": "bool" }], "internalType": "struct CompoundSubscriptions.CompoundHolder", "name": "", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getSubscribers", "outputs": [{ "components": [{ "internalType": "address", "name": "user", "type": "address" }, { "internalType": "uint128", "name": "triggerRepayRatio", "type": "uint128" }, { "internalType": "uint128", "name": "triggerBoostRatio", "type": "uint128" }, { "internalType": "uint128", "name": "optimalRatioBoost", "type": "uint128" }, { "internalType": "uint128", "name": "optimalRatioRepay", "type": "uint128" }, { "internalType": "bool", "name": "boostEnabled", "type": "bool" }], "internalType": "struct CompoundSubscriptions.CompoundHolder[]", "name": "", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_page", "type": "uint256" }, { "internalType": "uint256", "name": "_perPage", "type": "uint256" }], "name": "getSubscribersByPage", "outputs": [{ "components": [{ "internalType": "address", "name": "user", "type": "address" }, { "internalType": "uint128", "name": "triggerRepayRatio", "type": "uint128" }, { "internalType": "uint128", "name": "triggerBoostRatio", "type": "uint128" }, { "internalType": "uint128", "name": "optimalRatioBoost", "type": "uint128" }, { "internalType": "uint128", "name": "optimalRatioRepay", "type": "uint128" }, { "internalType": "bool", "name": "boostEnabled", "type": "bool" }], "internalType": "struct CompoundSubscriptions.CompoundHolder[]", "name": "", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_user", "type": "address" }], "name": "isSubscribed", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "kill", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_admin", "type": "address" }], "name": "setAdminByAdmin", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_admin", "type": "address" }], "name": "setAdminByOwner", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_owner", "type": "address" }], "name": "setOwnerByAdmin", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint128", "name": "_triggerRepayRatio", "type": "uint128" }, { "internalType": "uint128", "name": "_triggerBoostRatio", "type": "uint128" }, { "internalType": "uint128", "name": "_optimalBoost", "type": "uint128" }, { "internalType": "uint128", "name": "_optimalRepay", "type": "uint128" }, { "internalType": "bool", "name": "_boostEnabled", "type": "bool" }], "name": "subscribe", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "name": "subscribers", "outputs": [{ "internalType": "address", "name": "user", "type": "address" }, { "internalType": "uint128", "name": "triggerRepayRatio", "type": "uint128" }, { "internalType": "uint128", "name": "triggerBoostRatio", "type": "uint128" }, { "internalType": "uint128", "name": "optimalRatioBoost", "type": "uint128" }, { "internalType": "uint128", "name": "optimalRatioRepay", "type": "uint128" }, { "internalType": "bool", "name": "boostEnabled", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "", "type": "address" }], "name": "subscribersPos", "outputs": [{ "internalType": "uint256", "name": "arrPos", "type": "uint256" }, { "internalType": "bool", "name": "subscribed", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "unsubscribe", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_user", "type": "address" }], "name": "unsubscribeByAdmin", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_token", "type": "address" }, { "internalType": "uint256", "name": "_amount", "type": "uint256" }], "name": "withdrawStuckFunds", "outputs": [], "stateMutability": "nonpayable", "type": "function" }],
|
|
3
3
|
"networks": {
|
|
4
4
|
"1": {
|
|
5
5
|
"address": "0x52015EFFD577E08f498a0CCc11905925D58D6207",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"abi": [{ "constant": true, "inputs": [], "name": "WETH_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "CDAI_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "getSubscribers", "outputs": [{ "components": [{ "name": "minRatio", "type": "uint128" }, { "name": "maxRatio", "type": "uint128" }, { "name": "optimalRatioBoost", "type": "uint128" }, { "name": "optimalRatioRepay", "type": "uint128" }, { "name": "owner", "type": "address" }, { "name": "cdpId", "type": "uint256" }, { "name": "boostEnabled", "type": "bool" }, { "name": "nextPriceEnabled", "type": "bool" }], "name": "", "type": "tuple[]" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "SAVINGS_LOGGER_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "SAI_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "changeIndex", "outputs": [{ "name": "", "type": "uint256" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [{ "name": "_cdpId", "type": "uint256" }], "name": "getCdpHolder", "outputs": [{ "name": "subscribed", "type": "bool" }, { "components": [{ "name": "minRatio", "type": "uint128" }, { "name": "maxRatio", "type": "uint128" }, { "name": "optimalRatioBoost", "type": "uint128" }, { "name": "optimalRatioRepay", "type": "uint128" }, { "name": "owner", "type": "address" }, { "name": "cdpId", "type": "uint256" }, { "name": "boostEnabled", "type": "bool" }, { "name": "nextPriceEnabled", "type": "bool" }], "name": "", "type": "tuple" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "PIP_INTERFACE_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [{ "name": "_owner", "type": "address" }], "name": "setOwnerByAdmin", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "KYBER_ETH_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "OTC_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "DAI_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "IDAI_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [{ "name": "_ilk", "type": "bytes32" }, { "name": "_cdpId", "type": "uint256" }], "name": "getIlkInfo", "outputs": [{ "name": "ilk", "type": "bytes32" }, { "name": "art", "type": "uint256" }, { "name": "rate", "type": "uint256" }, { "name": "spot", "type": "uint256" }, { "name": "line", "type": "uint256" }, { "name": "dust", "type": "uint256" }, { "name": "mat", "type": "uint256" }, { "name": "par", "type": "uint256" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "spotter", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "GAS_TOKEN_INTERFACE_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "vat", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "VOX_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "MANAGER_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "MONITOR_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "ETH2DAI_WRAPPER", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "manager", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "STUPID_EXCHANGE", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [{ "name": "", "type": "uint256" }], "name": "subscribers", "outputs": [{ "name": "minRatio", "type": "uint128" }, { "name": "maxRatio", "type": "uint128" }, { "name": "optimalRatioBoost", "type": "uint128" }, { "name": "optimalRatioRepay", "type": "uint128" }, { "name": "owner", "type": "address" }, { "name": "cdpId", "type": "uint256" }, { "name": "boostEnabled", "type": "bool" }, { "name": "nextPriceEnabled", "type": "bool" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [{ "name": "_cdpId", "type": "uint256" }, { "name": "_minRatio", "type": "uint128" }, { "name": "_maxRatio", "type": "uint128" }, { "name": "_optimalBoost", "type": "uint128" }, { "name": "_optimalRepay", "type": "uint128" }, { "name": "_boostEnabled", "type": "bool" }, { "name": "_nextPriceEnabled", "type": "bool" }], "name": "subscribe", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "MIGRATION_ACTIONS_PROXY", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [{ "name": "", "type": "bytes32" }], "name": "minLimits", "outputs": [{ "name": "", "type": "uint256" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "SPOTTER_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [{ "name": "", "type": "uint256" }], "name": "subscribersPos", "outputs": [{ "name": "arrPos", "type": "uint256" }, { "name": "subscribed", "type": "bool" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "PROXY_REGISTRY_INTERFACE_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "PROXY_ACTIONS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "MKR_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "FACTORY_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [{ "name": "_page", "type": "uint256" }, { "name": "_perPage", "type": "uint256" }], "name": "getSubscribersByPage", "outputs": [{ "components": [{ "name": "minRatio", "type": "uint128" }, { "name": "maxRatio", "type": "uint128" }, { "name": "optimalRatioBoost", "type": "uint128" }, { "name": "optimalRatioRepay", "type": "uint128" }, { "name": "owner", "type": "address" }, { "name": "cdpId", "type": "uint256" }, { "name": "boostEnabled", "type": "bool" }, { "name": "nextPriceEnabled", "type": "bool" }], "name": "", "type": "tuple[]" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "owner", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [{ "name": "_cdpId", "type": "uint256" }], "name": "unsubscribeByAdmin", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "LOGGER_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "SAVER_EXCHANGE_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "MAKER_DAI_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "DISCOUNT_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [{ "name": "_admin", "type": "address" }], "name": "setAdminByAdmin", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "JUG_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [{ "name": "_cdpId", "type": "uint256" }], "name": "unsubscribe", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "NEW_CDAI_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "KYBER_WRAPPER", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "SUBSCRIPTION_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "NEW_IDAI_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "COMPOUND_DAI_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [{ "name": "_cdpId", "type": "uint256" }], "name": "getOwner", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "UNISWAP_FACTORY", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "OASIS_WRAPPER", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "PETH_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [{ "name": "_cdpId", "type": "uint256" }], "name": "getSubscribedInfo", "outputs": [{ "name": "", "type": "bool" }, { "name": "", "type": "uint128" }, { "name": "", "type": "uint128" }, { "name": "", "type": "uint128" }, { "name": "", "type": "uint128" }, { "name": "", "type": "address" }, { "name": "coll", "type": "uint256" }, { "name": "debt", "type": "uint256" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "KYBER_INTERFACE", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "VAT_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "DAI_JOIN_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "ERC20_PROXY_0X", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "WALLET_ID", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "SOLO_MARGIN_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "UNISWAP_WRAPPER", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [{ "name": "_admin", "type": "address" }], "name": "setAdminByOwner", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "saverProxy", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [{ "name": "_ilk", "type": "bytes32" }, { "name": "_newRatio", "type": "uint256" }], "name": "changeMinRatios", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "TUB_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "ETH_JOIN_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "SCD_MCD_MIGRATION", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "admin", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "inputs": [{ "name": "_saverProxy", "type": "address" }], "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [{ "indexed": true, "name": "owner", "type": "address" }, { "indexed": false, "name": "cdpId", "type": "uint256" }], "name": "Subscribed", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "name": "owner", "type": "address" }, { "indexed": false, "name": "cdpId", "type": "uint256" }], "name": "Unsubscribed", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "name": "owner", "type": "address" }, { "indexed": false, "name": "cdpId", "type": "uint256" }], "name": "Updated", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "name": "owner", "type": "address" }, { "indexed": false, "name": "cdpId", "type": "uint256" }, { "indexed": false, "name": "", "type": "uint128" }, { "indexed": false, "name": "", "type": "uint128" }, { "indexed": false, "name": "", "type": "uint128" }, { "indexed": false, "name": "", "type": "uint128" }, { "indexed": false, "name": "boostEnabled", "type": "bool" }], "name": "ParamUpdates", "type": "event" }],
|
|
2
|
+
"abi": [{ "constant": true, "inputs": [], "name": "WETH_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "CDAI_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "getSubscribers", "outputs": [{ "components": [{ "name": "triggerRepayRatio", "type": "uint128" }, { "name": "triggerBoostRatio", "type": "uint128" }, { "name": "optimalRatioBoost", "type": "uint128" }, { "name": "optimalRatioRepay", "type": "uint128" }, { "name": "owner", "type": "address" }, { "name": "cdpId", "type": "uint256" }, { "name": "boostEnabled", "type": "bool" }, { "name": "nextPriceEnabled", "type": "bool" }], "name": "", "type": "tuple[]" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "SAVINGS_LOGGER_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "SAI_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "changeIndex", "outputs": [{ "name": "", "type": "uint256" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [{ "name": "_cdpId", "type": "uint256" }], "name": "getCdpHolder", "outputs": [{ "name": "subscribed", "type": "bool" }, { "components": [{ "name": "triggerRepayRatio", "type": "uint128" }, { "name": "triggerBoostRatio", "type": "uint128" }, { "name": "optimalRatioBoost", "type": "uint128" }, { "name": "optimalRatioRepay", "type": "uint128" }, { "name": "owner", "type": "address" }, { "name": "cdpId", "type": "uint256" }, { "name": "boostEnabled", "type": "bool" }, { "name": "nextPriceEnabled", "type": "bool" }], "name": "", "type": "tuple" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "PIP_INTERFACE_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [{ "name": "_owner", "type": "address" }], "name": "setOwnerByAdmin", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "KYBER_ETH_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "OTC_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "DAI_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "IDAI_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [{ "name": "_ilk", "type": "bytes32" }, { "name": "_cdpId", "type": "uint256" }], "name": "getIlkInfo", "outputs": [{ "name": "ilk", "type": "bytes32" }, { "name": "art", "type": "uint256" }, { "name": "rate", "type": "uint256" }, { "name": "spot", "type": "uint256" }, { "name": "line", "type": "uint256" }, { "name": "dust", "type": "uint256" }, { "name": "mat", "type": "uint256" }, { "name": "par", "type": "uint256" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "spotter", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "GAS_TOKEN_INTERFACE_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "vat", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "VOX_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "MANAGER_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "MONITOR_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "ETH2DAI_WRAPPER", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "manager", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "STUPID_EXCHANGE", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [{ "name": "", "type": "uint256" }], "name": "subscribers", "outputs": [{ "name": "triggerRepayRatio", "type": "uint128" }, { "name": "triggerBoostRatio", "type": "uint128" }, { "name": "optimalRatioBoost", "type": "uint128" }, { "name": "optimalRatioRepay", "type": "uint128" }, { "name": "owner", "type": "address" }, { "name": "cdpId", "type": "uint256" }, { "name": "boostEnabled", "type": "bool" }, { "name": "nextPriceEnabled", "type": "bool" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [{ "name": "_cdpId", "type": "uint256" }, { "name": "_triggerRepayRatio", "type": "uint128" }, { "name": "_triggerBoostRatio", "type": "uint128" }, { "name": "_optimalBoost", "type": "uint128" }, { "name": "_optimalRepay", "type": "uint128" }, { "name": "_boostEnabled", "type": "bool" }, { "name": "_nextPriceEnabled", "type": "bool" }], "name": "subscribe", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "MIGRATION_ACTIONS_PROXY", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [{ "name": "", "type": "bytes32" }], "name": "minLimits", "outputs": [{ "name": "", "type": "uint256" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "SPOTTER_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [{ "name": "", "type": "uint256" }], "name": "subscribersPos", "outputs": [{ "name": "arrPos", "type": "uint256" }, { "name": "subscribed", "type": "bool" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "PROXY_REGISTRY_INTERFACE_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "PROXY_ACTIONS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "MKR_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "FACTORY_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [{ "name": "_page", "type": "uint256" }, { "name": "_perPage", "type": "uint256" }], "name": "getSubscribersByPage", "outputs": [{ "components": [{ "name": "triggerRepayRatio", "type": "uint128" }, { "name": "triggerBoostRatio", "type": "uint128" }, { "name": "optimalRatioBoost", "type": "uint128" }, { "name": "optimalRatioRepay", "type": "uint128" }, { "name": "owner", "type": "address" }, { "name": "cdpId", "type": "uint256" }, { "name": "boostEnabled", "type": "bool" }, { "name": "nextPriceEnabled", "type": "bool" }], "name": "", "type": "tuple[]" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "owner", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [{ "name": "_cdpId", "type": "uint256" }], "name": "unsubscribeByAdmin", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "LOGGER_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "SAVER_EXCHANGE_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "MAKER_DAI_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "DISCOUNT_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [{ "name": "_admin", "type": "address" }], "name": "setAdminByAdmin", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "JUG_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [{ "name": "_cdpId", "type": "uint256" }], "name": "unsubscribe", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "NEW_CDAI_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "KYBER_WRAPPER", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "SUBSCRIPTION_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "NEW_IDAI_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "COMPOUND_DAI_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [{ "name": "_cdpId", "type": "uint256" }], "name": "getOwner", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "UNISWAP_FACTORY", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "OASIS_WRAPPER", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "PETH_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [{ "name": "_cdpId", "type": "uint256" }], "name": "getSubscribedInfo", "outputs": [{ "name": "", "type": "bool" }, { "name": "", "type": "uint128" }, { "name": "", "type": "uint128" }, { "name": "", "type": "uint128" }, { "name": "", "type": "uint128" }, { "name": "", "type": "address" }, { "name": "coll", "type": "uint256" }, { "name": "debt", "type": "uint256" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "KYBER_INTERFACE", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "VAT_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "DAI_JOIN_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "ERC20_PROXY_0X", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "WALLET_ID", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "SOLO_MARGIN_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "UNISWAP_WRAPPER", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [{ "name": "_admin", "type": "address" }], "name": "setAdminByOwner", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "saverProxy", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [{ "name": "_ilk", "type": "bytes32" }, { "name": "_newRatio", "type": "uint256" }], "name": "changetriggerRepayRatios", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "TUB_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "ETH_JOIN_ADDRESS", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "SCD_MCD_MIGRATION", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "admin", "outputs": [{ "name": "", "type": "address" }], "payable": false, "stateMutability": "view", "type": "function" }, { "inputs": [{ "name": "_saverProxy", "type": "address" }], "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [{ "indexed": true, "name": "owner", "type": "address" }, { "indexed": false, "name": "cdpId", "type": "uint256" }], "name": "Subscribed", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "name": "owner", "type": "address" }, { "indexed": false, "name": "cdpId", "type": "uint256" }], "name": "Unsubscribed", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "name": "owner", "type": "address" }, { "indexed": false, "name": "cdpId", "type": "uint256" }], "name": "Updated", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "name": "owner", "type": "address" }, { "indexed": false, "name": "cdpId", "type": "uint256" }, { "indexed": false, "name": "", "type": "uint128" }, { "indexed": false, "name": "", "type": "uint128" }, { "indexed": false, "name": "", "type": "uint128" }, { "indexed": false, "name": "", "type": "uint128" }, { "indexed": false, "name": "boostEnabled", "type": "bool" }], "name": "ParamUpdates", "type": "event" }],
|
|
3
3
|
"networks": {
|
|
4
4
|
"1": {
|
|
5
5
|
"createdBlock": 8335635,
|
|
@@ -13,8 +13,8 @@ function parseMakerSavingsLiqProtection(position, parseData) {
|
|
|
13
13
|
_position.strategyData.decoded.triggerData = triggerData;
|
|
14
14
|
_position.strategyData.decoded.subData = subData;
|
|
15
15
|
_position.specific = {
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
triggerRepayRatio: Number(triggerData.ratio),
|
|
17
|
+
targetRepayRatio: Number(subData.targetRatio),
|
|
18
18
|
repayEnabled: true,
|
|
19
19
|
boostEnabled: false,
|
|
20
20
|
};
|
|
@@ -61,16 +61,16 @@ function parseMakerLeverageManagement(position, parseData) {
|
|
|
61
61
|
const isRepay = _position.strategy.strategyId === Strategies.Identifiers.Repay;
|
|
62
62
|
if (isRepay) {
|
|
63
63
|
_position.specific = {
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
triggerRepayRatio: triggerData.ratio,
|
|
65
|
+
targetRepayRatio: subData.targetRatio,
|
|
66
66
|
repayEnabled: true,
|
|
67
67
|
subId1: Number(subId),
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
70
|
else {
|
|
71
71
|
_position.specific = {
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
triggerBoostRatio: triggerData.ratio,
|
|
73
|
+
targetBoostRatio: subData.targetRatio,
|
|
74
74
|
boostEnabled: isEnabled,
|
|
75
75
|
subId2: Number(subId),
|
|
76
76
|
};
|
|
@@ -120,16 +120,16 @@ function parseAaveV2LeverageManagement(position, parseData) {
|
|
|
120
120
|
const isRepay = _position.strategy.strategyId === Strategies.Identifiers.Repay;
|
|
121
121
|
if (isRepay) {
|
|
122
122
|
_position.specific = {
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
triggerRepayRatio: triggerData.ratio,
|
|
124
|
+
targetRepayRatio: subData.targetRatio,
|
|
125
125
|
repayEnabled: true,
|
|
126
126
|
subId1: Number(subId),
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
129
|
else {
|
|
130
130
|
_position.specific = {
|
|
131
|
-
|
|
132
|
-
|
|
131
|
+
triggerBoostRatio: triggerData.ratio,
|
|
132
|
+
targetBoostRatio: subData.targetRatio,
|
|
133
133
|
boostEnabled: isEnabled,
|
|
134
134
|
subId2: Number(subId),
|
|
135
135
|
};
|
|
@@ -149,16 +149,16 @@ function parseAaveV3LeverageManagement(position, parseData) {
|
|
|
149
149
|
const isRepay = _position.strategy.strategyId === Strategies.Identifiers.Repay;
|
|
150
150
|
if (isRepay) {
|
|
151
151
|
_position.specific = {
|
|
152
|
-
|
|
153
|
-
|
|
152
|
+
triggerRepayRatio: triggerData.ratio,
|
|
153
|
+
targetRepayRatio: subData.targetRatio,
|
|
154
154
|
repayEnabled: true,
|
|
155
155
|
subId1: Number(subId),
|
|
156
156
|
};
|
|
157
157
|
}
|
|
158
158
|
else {
|
|
159
159
|
_position.specific = {
|
|
160
|
-
|
|
161
|
-
|
|
160
|
+
triggerBoostRatio: triggerData.ratio,
|
|
161
|
+
targetBoostRatio: subData.targetRatio,
|
|
162
162
|
boostEnabled: isEnabled,
|
|
163
163
|
subId2: Number(subId),
|
|
164
164
|
};
|
|
@@ -178,16 +178,16 @@ function parseMorphoAaveV2LeverageManagement(position, parseData) {
|
|
|
178
178
|
const isRepay = _position.strategy.strategyId === Strategies.Identifiers.Repay;
|
|
179
179
|
if (isRepay) {
|
|
180
180
|
_position.specific = {
|
|
181
|
-
|
|
182
|
-
|
|
181
|
+
triggerRepayRatio: triggerData.ratio,
|
|
182
|
+
targetRepayRatio: subData.targetRatio,
|
|
183
183
|
repayEnabled: true,
|
|
184
184
|
subId1: Number(subId),
|
|
185
185
|
};
|
|
186
186
|
}
|
|
187
187
|
else {
|
|
188
188
|
_position.specific = {
|
|
189
|
-
|
|
190
|
-
|
|
189
|
+
triggerBoostRatio: triggerData.ratio,
|
|
190
|
+
targetBoostRatio: subData.targetRatio,
|
|
191
191
|
boostEnabled: isEnabled,
|
|
192
192
|
subId2: Number(subId),
|
|
193
193
|
};
|
|
@@ -229,16 +229,16 @@ function parseCompoundV2LeverageManagement(position, parseData) {
|
|
|
229
229
|
const isRepay = [Strategies.Identifiers.Repay, Strategies.Identifiers.EoaRepay].includes(_position.strategy.strategyId);
|
|
230
230
|
if (isRepay) {
|
|
231
231
|
_position.specific = {
|
|
232
|
-
|
|
233
|
-
|
|
232
|
+
triggerRepayRatio: triggerData.ratio,
|
|
233
|
+
targetRepayRatio: subData.targetRatio,
|
|
234
234
|
repayEnabled: true,
|
|
235
235
|
subId1: Number(subId),
|
|
236
236
|
};
|
|
237
237
|
}
|
|
238
238
|
else {
|
|
239
239
|
_position.specific = {
|
|
240
|
-
|
|
241
|
-
|
|
240
|
+
triggerBoostRatio: triggerData.ratio,
|
|
241
|
+
targetBoostRatio: subData.targetRatio,
|
|
242
242
|
boostEnabled: isEnabled,
|
|
243
243
|
subId2: Number(subId),
|
|
244
244
|
};
|
|
@@ -259,16 +259,16 @@ function parseCompoundV3LeverageManagement(position, parseData) {
|
|
|
259
259
|
const isRepay = [Strategies.Identifiers.Repay, Strategies.Identifiers.EoaRepay].includes(_position.strategy.strategyId);
|
|
260
260
|
if (isRepay) {
|
|
261
261
|
_position.specific = {
|
|
262
|
-
|
|
263
|
-
|
|
262
|
+
triggerRepayRatio: triggerData.ratio,
|
|
263
|
+
targetRepayRatio: subData.targetRatio,
|
|
264
264
|
repayEnabled: true,
|
|
265
265
|
subId1: Number(subId),
|
|
266
266
|
};
|
|
267
267
|
}
|
|
268
268
|
else {
|
|
269
269
|
_position.specific = {
|
|
270
|
-
|
|
271
|
-
|
|
270
|
+
triggerBoostRatio: triggerData.ratio,
|
|
271
|
+
targetBoostRatio: subData.targetRatio,
|
|
272
272
|
boostEnabled: isEnabled,
|
|
273
273
|
subId2: Number(subId),
|
|
274
274
|
};
|
|
@@ -292,8 +292,8 @@ function parseLiquityBondProtection(position, parseData) {
|
|
|
292
292
|
_position.strategyData.decoded.subData = subDataService.liquityPaybackUsingChickenBondSubData.decode(subStruct.subData);
|
|
293
293
|
_position.strategyData.decoded.triggerData = triggerData;
|
|
294
294
|
_position.specific = {
|
|
295
|
-
|
|
296
|
-
|
|
295
|
+
triggerRepayRatio: Number(triggerData.ratio),
|
|
296
|
+
targetRepayRatio: Infinity,
|
|
297
297
|
repayEnabled: true,
|
|
298
298
|
};
|
|
299
299
|
return _position;
|
|
@@ -325,16 +325,16 @@ function parseLiquityLeverageManagement(position, parseData) {
|
|
|
325
325
|
const isRepay = _position.strategy.strategyId === Strategies.Identifiers.Repay;
|
|
326
326
|
if (isRepay) {
|
|
327
327
|
_position.specific = {
|
|
328
|
-
|
|
329
|
-
|
|
328
|
+
triggerRepayRatio: triggerData.ratio,
|
|
329
|
+
targetRepayRatio: subData.targetRatio,
|
|
330
330
|
repayEnabled: true,
|
|
331
331
|
subId1: Number(subId),
|
|
332
332
|
};
|
|
333
333
|
}
|
|
334
334
|
else {
|
|
335
335
|
_position.specific = {
|
|
336
|
-
|
|
337
|
-
|
|
336
|
+
triggerBoostRatio: triggerData.ratio,
|
|
337
|
+
targetBoostRatio: subData.targetRatio,
|
|
338
338
|
boostEnabled: isEnabled,
|
|
339
339
|
subId2: Number(subId),
|
|
340
340
|
};
|
|
@@ -354,16 +354,16 @@ function parseSparkLeverageManagement(position, parseData) {
|
|
|
354
354
|
const isRepay = _position.strategy.strategyId === Strategies.Identifiers.Repay;
|
|
355
355
|
if (isRepay) {
|
|
356
356
|
_position.specific = {
|
|
357
|
-
|
|
358
|
-
|
|
357
|
+
triggerRepayRatio: triggerData.ratio,
|
|
358
|
+
targetRepayRatio: subData.targetRatio,
|
|
359
359
|
repayEnabled: true,
|
|
360
360
|
subId1: Number(subId),
|
|
361
361
|
};
|
|
362
362
|
}
|
|
363
363
|
else {
|
|
364
364
|
_position.specific = {
|
|
365
|
-
|
|
366
|
-
|
|
365
|
+
triggerBoostRatio: triggerData.ratio,
|
|
366
|
+
targetBoostRatio: subData.targetRatio,
|
|
367
367
|
boostEnabled: isEnabled,
|
|
368
368
|
subId2: Number(subId),
|
|
369
369
|
};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { Bundles, ChainId, RatioState, Strategies } from '../types/enums';
|
|
2
2
|
import type { EthereumAddress, StrategyOrBundleIds } from '../types';
|
|
3
3
|
export declare const makerEncode: {
|
|
4
|
-
repayFromSavings(bundleId: StrategyOrBundleIds, vaultId: number,
|
|
4
|
+
repayFromSavings(bundleId: StrategyOrBundleIds, vaultId: number, triggerRepayRatio: number, targetRepayRatio: number, isBundle?: boolean, chainId?: ChainId, daiAddr?: EthereumAddress, mcdCdpManagerAddr?: EthereumAddress): (boolean | string[])[];
|
|
5
5
|
closeOnPrice(vaultId: number, ratioState: RatioState, price: string, closeToAssetAddr: EthereumAddress, chainlinkCollAddress: EthereumAddress, chainId?: ChainId, daiAddr?: EthereumAddress, mcdCdpManagerAddr?: EthereumAddress): (boolean | string[] | Strategies.MainnetIds)[];
|
|
6
6
|
trailingStop(vaultId: number, triggerPercentage: number, closeToAssetAddr: EthereumAddress, chainlinkCollAddress: EthereumAddress, roundId: number, chainId?: ChainId, daiAddr?: EthereumAddress, mcdCdpManagerAddr?: EthereumAddress): (boolean | string[] | Strategies.MainnetIds)[];
|
|
7
|
-
leverageManagement(vaultId: number,
|
|
7
|
+
leverageManagement(vaultId: number, triggerRepayRatio: string, triggerBoostRatio: string, targetBoostRatio: string, targetRepayRatio: string, boostEnabled: boolean): (string | number | boolean)[];
|
|
8
8
|
};
|
|
9
9
|
export declare const liquityEncode: {
|
|
10
10
|
closeOnPrice(priceOverOrUnder: RatioState, price: string, closeToAssetAddr: EthereumAddress, chainlinkCollAddress: EthereumAddress, chainId?: ChainId, collAddr?: EthereumAddress, debtAddr?: EthereumAddress): (boolean | string[] | Strategies.MainnetIds)[];
|
|
11
11
|
trailingStop(triggerPercentage: number, closeToAssetAddr: EthereumAddress, chainlinkCollAddress: EthereumAddress, roundId: number, chainId?: ChainId, collAddr?: EthereumAddress, debtAddr?: EthereumAddress): (boolean | string[] | Strategies.MainnetIds)[];
|
|
12
12
|
paybackFromChickenBondStrategySub(proxyAddress: EthereumAddress, ratio: number, sourceId: string, sourceType: number, ratioState?: RatioState): (boolean | string[] | Bundles.MainnetIds)[];
|
|
13
|
-
leverageManagement(
|
|
13
|
+
leverageManagement(triggerRepayRatio: string, triggerBoostRatio: string, targetBoostRatio: string, targetRepayRatio: string, boostEnabled: boolean): (string | boolean)[];
|
|
14
14
|
};
|
|
15
15
|
export declare const chickenBondsEncode: {
|
|
16
16
|
rebond(bondId: number): string[];
|
|
17
17
|
};
|
|
18
18
|
export declare const aaveV2Encode: {
|
|
19
|
-
leverageManagement(
|
|
19
|
+
leverageManagement(triggerRepayRatio: number, triggerBoostRatio: number, targetBoostRatio: number, targetRepayRatio: number, boostEnabled: boolean): string[];
|
|
20
20
|
};
|
|
21
21
|
export declare const aaveV3Encode: {
|
|
22
|
-
leverageManagement(
|
|
22
|
+
leverageManagement(triggerRepayRatio: number, triggerBoostRatio: number, targetBoostRatio: number, targetRepayRatio: number, boostEnabled: boolean): string;
|
|
23
23
|
closeToAsset(strategyOrBundleId: number, isBundle: boolean | undefined, triggerData: {
|
|
24
24
|
baseTokenAddress: EthereumAddress;
|
|
25
25
|
quoteTokenAddress: EthereumAddress;
|
|
@@ -33,20 +33,20 @@ export declare const aaveV3Encode: {
|
|
|
33
33
|
}): (number | boolean | string[])[];
|
|
34
34
|
};
|
|
35
35
|
export declare const compoundV2Encode: {
|
|
36
|
-
leverageManagement(
|
|
36
|
+
leverageManagement(triggerRepayRatio: number, triggerBoostRatio: number, targetBoostRatio: number, targetRepayRatio: number, boostEnabled: boolean): string[];
|
|
37
37
|
};
|
|
38
38
|
export declare const compoundV3Encode: {
|
|
39
|
-
leverageManagement(market: EthereumAddress, baseToken: EthereumAddress,
|
|
39
|
+
leverageManagement(market: EthereumAddress, baseToken: EthereumAddress, triggerRepayRatio: number, triggerBoostRatio: number, targetBoostRatio: number, targetRepayRatio: number, boostEnabled: boolean, isEOA: boolean): string[];
|
|
40
40
|
};
|
|
41
41
|
export declare const morphoAaveV2Encode: {
|
|
42
|
-
leverageManagement(
|
|
42
|
+
leverageManagement(triggerRepayRatio: number, triggerBoostRatio: number, targetBoostRatio: number, targetRepayRatio: number, boostEnabled: boolean): string[];
|
|
43
43
|
};
|
|
44
44
|
export declare const exchangeEncode: {
|
|
45
45
|
dca(fromToken: EthereumAddress, toToken: EthereumAddress, amount: string, timestamp: number, interval: number, network: number): (boolean | string[] | Strategies.MainnetIds | Strategies.OptimismIds | Strategies.ArbitrumIds)[];
|
|
46
46
|
limitOrder(fromToken: EthereumAddress, toToken: EthereumAddress, amount: string, targetPrice: string, goodUntil: string, orderType: number): string[];
|
|
47
47
|
};
|
|
48
48
|
export declare const sparkEncode: {
|
|
49
|
-
leverageManagement(
|
|
49
|
+
leverageManagement(triggerRepayRatio: number, triggerBoostRatio: number, targetBoostRatio: number, targetRepayRatio: number, boostEnabled: boolean): string;
|
|
50
50
|
closeToAsset(strategyOrBundleId: number, isBundle: boolean | undefined, triggerData: {
|
|
51
51
|
baseTokenAddress: EthereumAddress;
|
|
52
52
|
quoteTokenAddress: EthereumAddress;
|