From dc1c66f493b2c26e27b2a03c5885ff2bf603b4ef Mon Sep 17 00:00:00 2001 From: kostyamospan <37243242+kostyamospan@users.noreply.github.com> Date: Tue, 29 Oct 2024 13:46:31 +0200 Subject: [PATCH] Feat/midas (#2) * wip: midas b2c and abis * fix: addresses to lowercase * fix: midas erc20OfInterest * chore: mbtc added * fix: to lower case * fix: format --------- Co-authored-by: Jonathan --- ...4799353f3805a3e6c4e1cbbb83217d123.abi.json | 68 +++++++ ...ca90db7606013d8cd2e77eb024df693bd.abi.json | 59 ++++++ ...61a930bc5c7b75bf06cdd954218ca9f0b.abi.json | 68 +++++++ ...76869516aea980390494aaed45c3efc1a.abi.json | 68 +++++++ ...cbf6923350521ecbc28a555a500c4f0ec.abi.json | 68 +++++++ ...5420711723af805f08187c9e6bf796683.abi.json | 59 ++++++ ...f4c86a459ebbdc39c5be77833b3a15d88.abi.json | 59 ++++++ ...4f4793ac5e71e0502213a9bbe3a6d4517.abi.json | 68 +++++++ ethereum/midas/b2c.json | 192 ++++++++++++++++++ 9 files changed, 709 insertions(+) create mode 100644 ethereum/midas/abis/0x0d89c1c4799353f3805a3e6c4e1cbbb83217d123.abi.json create mode 100644 ethereum/midas/abis/0x10cc8dbca90db7606013d8cd2e77eb024df693bd.abi.json create mode 100644 ethereum/midas/abis/0x19ab19e61a930bc5c7b75bf06cdd954218ca9f0b.abi.json create mode 100644 ethereum/midas/abis/0x30d9d1e76869516aea980390494aaed45c3efc1a.abi.json create mode 100644 ethereum/midas/abis/0x569d7dccbf6923350521ecbc28a555a500c4f0ec.abi.json create mode 100644 ethereum/midas/abis/0x99361435420711723af805f08187c9e6bf796683.abi.json create mode 100644 ethereum/midas/abis/0xa8a5c4ff4c86a459ebbdc39c5be77833b3a15d88.abi.json create mode 100644 ethereum/midas/abis/0xf6e51d24f4793ac5e71e0502213a9bbe3a6d4517.abi.json create mode 100644 ethereum/midas/b2c.json diff --git a/ethereum/midas/abis/0x0d89c1c4799353f3805a3e6c4e1cbbb83217d123.abi.json b/ethereum/midas/abis/0x0d89c1c4799353f3805a3e6c4e1cbbb83217d123.abi.json new file mode 100644 index 00000000..cf89e703 --- /dev/null +++ b/ethereum/midas/abis/0x0d89c1c4799353f3805a3e6c4e1cbbb83217d123.abi.json @@ -0,0 +1,68 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "tokenOut", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountMTokenIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minReceiveAmount", + "type": "uint256" + } + ], + "name": "redeemInstant", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenOut", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountMTokenIn", + "type": "uint256" + } + ], + "name": "redeemRequest", + "outputs": [ + { + "internalType": "uint256", + "name": "requestId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountMTokenIn", + "type": "uint256" + } + ], + "name": "redeemFiatRequest", + "outputs": [ + { + "internalType": "uint256", + "name": "requestId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/ethereum/midas/abis/0x10cc8dbca90db7606013d8cd2e77eb024df693bd.abi.json b/ethereum/midas/abis/0x10cc8dbca90db7606013d8cd2e77eb024df693bd.abi.json new file mode 100644 index 00000000..8da0615f --- /dev/null +++ b/ethereum/midas/abis/0x10cc8dbca90db7606013d8cd2e77eb024df693bd.abi.json @@ -0,0 +1,59 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "tokenIn", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountToken", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minReceiveAmount", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "referrerId", + "type": "bytes32" + } + ], + "name": "depositInstant", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenIn", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountToken", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "referrerId", + "type": "bytes32" + } + ], + "name": "depositRequest", + "outputs": [ + { + "internalType": "uint256", + "name": "requestId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/ethereum/midas/abis/0x19ab19e61a930bc5c7b75bf06cdd954218ca9f0b.abi.json b/ethereum/midas/abis/0x19ab19e61a930bc5c7b75bf06cdd954218ca9f0b.abi.json new file mode 100644 index 00000000..cf89e703 --- /dev/null +++ b/ethereum/midas/abis/0x19ab19e61a930bc5c7b75bf06cdd954218ca9f0b.abi.json @@ -0,0 +1,68 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "tokenOut", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountMTokenIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minReceiveAmount", + "type": "uint256" + } + ], + "name": "redeemInstant", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenOut", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountMTokenIn", + "type": "uint256" + } + ], + "name": "redeemRequest", + "outputs": [ + { + "internalType": "uint256", + "name": "requestId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountMTokenIn", + "type": "uint256" + } + ], + "name": "redeemFiatRequest", + "outputs": [ + { + "internalType": "uint256", + "name": "requestId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/ethereum/midas/abis/0x30d9d1e76869516aea980390494aaed45c3efc1a.abi.json b/ethereum/midas/abis/0x30d9d1e76869516aea980390494aaed45c3efc1a.abi.json new file mode 100644 index 00000000..cf89e703 --- /dev/null +++ b/ethereum/midas/abis/0x30d9d1e76869516aea980390494aaed45c3efc1a.abi.json @@ -0,0 +1,68 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "tokenOut", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountMTokenIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minReceiveAmount", + "type": "uint256" + } + ], + "name": "redeemInstant", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenOut", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountMTokenIn", + "type": "uint256" + } + ], + "name": "redeemRequest", + "outputs": [ + { + "internalType": "uint256", + "name": "requestId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountMTokenIn", + "type": "uint256" + } + ], + "name": "redeemFiatRequest", + "outputs": [ + { + "internalType": "uint256", + "name": "requestId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/ethereum/midas/abis/0x569d7dccbf6923350521ecbc28a555a500c4f0ec.abi.json b/ethereum/midas/abis/0x569d7dccbf6923350521ecbc28a555a500c4f0ec.abi.json new file mode 100644 index 00000000..cf89e703 --- /dev/null +++ b/ethereum/midas/abis/0x569d7dccbf6923350521ecbc28a555a500c4f0ec.abi.json @@ -0,0 +1,68 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "tokenOut", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountMTokenIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minReceiveAmount", + "type": "uint256" + } + ], + "name": "redeemInstant", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenOut", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountMTokenIn", + "type": "uint256" + } + ], + "name": "redeemRequest", + "outputs": [ + { + "internalType": "uint256", + "name": "requestId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountMTokenIn", + "type": "uint256" + } + ], + "name": "redeemFiatRequest", + "outputs": [ + { + "internalType": "uint256", + "name": "requestId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/ethereum/midas/abis/0x99361435420711723af805f08187c9e6bf796683.abi.json b/ethereum/midas/abis/0x99361435420711723af805f08187c9e6bf796683.abi.json new file mode 100644 index 00000000..8da0615f --- /dev/null +++ b/ethereum/midas/abis/0x99361435420711723af805f08187c9e6bf796683.abi.json @@ -0,0 +1,59 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "tokenIn", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountToken", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minReceiveAmount", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "referrerId", + "type": "bytes32" + } + ], + "name": "depositInstant", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenIn", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountToken", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "referrerId", + "type": "bytes32" + } + ], + "name": "depositRequest", + "outputs": [ + { + "internalType": "uint256", + "name": "requestId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/ethereum/midas/abis/0xa8a5c4ff4c86a459ebbdc39c5be77833b3a15d88.abi.json b/ethereum/midas/abis/0xa8a5c4ff4c86a459ebbdc39c5be77833b3a15d88.abi.json new file mode 100644 index 00000000..8da0615f --- /dev/null +++ b/ethereum/midas/abis/0xa8a5c4ff4c86a459ebbdc39c5be77833b3a15d88.abi.json @@ -0,0 +1,59 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "tokenIn", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountToken", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minReceiveAmount", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "referrerId", + "type": "bytes32" + } + ], + "name": "depositInstant", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenIn", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountToken", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "referrerId", + "type": "bytes32" + } + ], + "name": "depositRequest", + "outputs": [ + { + "internalType": "uint256", + "name": "requestId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/ethereum/midas/abis/0xf6e51d24f4793ac5e71e0502213a9bbe3a6d4517.abi.json b/ethereum/midas/abis/0xf6e51d24f4793ac5e71e0502213a9bbe3a6d4517.abi.json new file mode 100644 index 00000000..cf89e703 --- /dev/null +++ b/ethereum/midas/abis/0xf6e51d24f4793ac5e71e0502213a9bbe3a6d4517.abi.json @@ -0,0 +1,68 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "tokenOut", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountMTokenIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minReceiveAmount", + "type": "uint256" + } + ], + "name": "redeemInstant", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenOut", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountMTokenIn", + "type": "uint256" + } + ], + "name": "redeemRequest", + "outputs": [ + { + "internalType": "uint256", + "name": "requestId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountMTokenIn", + "type": "uint256" + } + ], + "name": "redeemFiatRequest", + "outputs": [ + { + "internalType": "uint256", + "name": "requestId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/ethereum/midas/b2c.json b/ethereum/midas/b2c.json new file mode 100644 index 00000000..9016aad1 --- /dev/null +++ b/ethereum/midas/b2c.json @@ -0,0 +1,192 @@ +{ + "blockchainName": "ethereum", + "chainId": 1, + "contracts": [ + { + "address": "0x99361435420711723af805f08187c9e6bf796683", + "contractName": "MTbillDepositVault", + "selectors": { + "0x6e26b9f8": { + "erc20OfInterest": [ + "tokenIn" + ], + "method": "depositRequest", + "plugin": "Midas" + }, + "0xc02dd27a": { + "erc20OfInterest": [ + "tokenIn" + ], + "method": "depositInstant", + "plugin": "Midas" + } + } + }, + { + "address": "0xa8a5c4ff4c86a459ebbdc39c5be77833b3a15d88", + "contractName": "MBasisDepositVault", + "selectors": { + "0x6e26b9f8": { + "erc20OfInterest": [ + "tokenIn" + ], + "method": "depositRequest", + "plugin": "Midas" + }, + "0xc02dd27a": { + "erc20OfInterest": [ + "tokenIn" + ], + "method": "depositInstant", + "plugin": "Midas" + } + } + }, + { + "address": "0x10cc8dbca90db7606013d8cd2e77eb024df693bd", + "contractName": "MBtcDepositVault", + "selectors": { + "0x6e26b9f8": { + "erc20OfInterest": [ + "tokenIn" + ], + "method": "depositRequest", + "plugin": "Midas" + }, + "0xc02dd27a": { + "erc20OfInterest": [ + "tokenIn" + ], + "method": "depositInstant", + "plugin": "Midas" + } + } + }, + { + "address": "0xf6e51d24f4793ac5e71e0502213a9bbe3a6d4517", + "contractName": "MTbillRedemptionVault", + "selectors": { + "0x8b53f75e": { + "erc20OfInterest": [ + "tokenOut" + ], + "method": "redeemInstant", + "plugin": "Midas" + }, + "0xbfc2d46a": { + "erc20OfInterest": [ + "tokenOut" + ], + "method": "redeemRequest", + "plugin": "Midas" + }, + "0xd5f73f5c": { + "erc20OfInterest": [], + "method": "redeemFiatRequest", + "plugin": "Midas" + } + } + }, + { + "address": "0x19ab19e61a930bc5c7b75bf06cdd954218ca9f0b", + "contractName": "MBasisRedemptionVault", + "selectors": { + "0x8b53f75e": { + "erc20OfInterest": [ + "tokenOut" + ], + "method": "redeemInstant", + "plugin": "Midas" + }, + "0xbfc2d46a": { + "erc20OfInterest": [ + "tokenOut" + ], + "method": "redeemRequest", + "plugin": "Midas" + }, + "0xd5f73f5c": { + "erc20OfInterest": [], + "method": "redeemFiatRequest", + "plugin": "Midas" + } + } + }, + { + "address": "0x30d9d1e76869516aea980390494aaed45c3efc1a", + "contractName": "MBtcRedemptionVault", + "selectors": { + "0x8b53f75e": { + "erc20OfInterest": [ + "tokenOut" + ], + "method": "redeemInstant", + "plugin": "Midas" + }, + "0xbfc2d46a": { + "erc20OfInterest": [ + "tokenOut" + ], + "method": "redeemRequest", + "plugin": "Midas" + }, + "0xd5f73f5c": { + "erc20OfInterest": [], + "method": "redeemFiatRequest", + "plugin": "Midas" + } + } + }, + { + "address": "0x569d7dccbf6923350521ecbc28a555a500c4f0ec", + "contractName": "MTbillRedemptionVaultBuidl", + "selectors": { + "0x8b53f75e": { + "erc20OfInterest": [ + "tokenOut" + ], + "method": "redeemInstant", + "plugin": "Midas" + }, + "0xbfc2d46a": { + "erc20OfInterest": [ + "tokenOut" + ], + "method": "redeemRequest", + "plugin": "Midas" + }, + "0xd5f73f5c": { + "erc20OfInterest": [], + "method": "redeemFiatRequest", + "plugin": "Midas" + } + } + }, + { + "address": "0x0d89c1c4799353f3805a3e6c4e1cbbb83217d123", + "contractName": "MBasisRedemptionVaultSwapper", + "selectors": { + "0x8b53f75e": { + "erc20OfInterest": [ + "tokenOut" + ], + "method": "redeemInstant", + "plugin": "Midas" + }, + "0xbfc2d46a": { + "erc20OfInterest": [ + "tokenOut" + ], + "method": "redeemRequest", + "plugin": "Midas" + }, + "0xd5f73f5c": { + "erc20OfInterest": [], + "method": "redeemFiatRequest", + "plugin": "Midas" + } + } + } + ], + "name": "Midas" +} \ No newline at end of file