@malda-protocol/protocol-config
Version:
Centralized contract addresses, constants, and token configurations for Malda Protocol
695 lines (694 loc) • 25.3 kB
JavaScript
export const OPERATOR_ABI = [
{ inputs: [], stateMutability: 'nonpayable', type: 'constructor' },
{ inputs: [], name: 'InvalidInitialization', type: 'error' },
{ inputs: [], name: 'NotInitializing', type: 'error' },
{ inputs: [], name: 'Operator_AssetNotFound', type: 'error' },
{ inputs: [], name: 'Operator_Deactivate_MarketBalanceOwed', type: 'error' },
{ inputs: [], name: 'Operator_EmptyPrice', type: 'error' },
{ inputs: [], name: 'Operator_InsufficientLiquidity', type: 'error' },
{ inputs: [], name: 'Operator_InvalidCollateralFactor', type: 'error' },
{ inputs: [], name: 'Operator_InvalidInput', type: 'error' },
{ inputs: [], name: 'Operator_InvalidRewardDistributor', type: 'error' },
{ inputs: [], name: 'Operator_InvalidRolesOperator', type: 'error' },
{ inputs: [], name: 'Operator_MarketAlreadyListed', type: 'error' },
{ inputs: [], name: 'Operator_MarketBorrowCapReached', type: 'error' },
{ inputs: [], name: 'Operator_MarketNotListed', type: 'error' },
{ inputs: [], name: 'Operator_MarketSupplyReached', type: 'error' },
{ inputs: [], name: 'Operator_Mismatch', type: 'error' },
{ inputs: [], name: 'Operator_OnlyAdmin', type: 'error' },
{ inputs: [], name: 'Operator_OnlyAdminOrRole', type: 'error' },
{ inputs: [], name: 'Operator_OracleUnderlyingFetchError', type: 'error' },
{ inputs: [], name: 'Operator_OutflowVolumeReached', type: 'error' },
{ inputs: [], name: 'Operator_Paused', type: 'error' },
{ inputs: [], name: 'Operator_PriceFetchFailed', type: 'error' },
{ inputs: [], name: 'Operator_RepayAmountNotValid', type: 'error' },
{ inputs: [], name: 'Operator_RepayingTooMuch', type: 'error' },
{ inputs: [], name: 'Operator_SenderMustBeToken', type: 'error' },
{ inputs: [], name: 'Operator_UserNotWhitelisted', type: 'error' },
{ inputs: [], name: 'Operator_WrongMarket', type: 'error' },
{ inputs: [{ internalType: 'address', name: 'owner', type: 'address' }], name: 'OwnableInvalidOwner', type: 'error' },
{
inputs: [{ internalType: 'address', name: 'account', type: 'address' }],
name: 'OwnableUnauthorizedAccount',
type: 'error',
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: 'address', name: 'mToken', type: 'address' },
{ indexed: false, internalType: 'enum ImTokenOperationTypes.OperationType', name: '_type', type: 'uint8' },
{ indexed: false, internalType: 'bool', name: 'state', type: 'bool' },
],
name: 'ActionPaused',
type: 'event',
},
{
anonymous: false,
inputs: [{ indexed: false, internalType: 'uint64', name: 'version', type: 'uint64' }],
name: 'Initialized',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: 'address', name: 'mToken', type: 'address' },
{ indexed: true, internalType: 'address', name: 'account', type: 'address' },
],
name: 'MarketEntered',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: 'address', name: 'mToken', type: 'address' },
{ indexed: true, internalType: 'address', name: 'account', type: 'address' },
],
name: 'MarketExited',
type: 'event',
},
{
anonymous: false,
inputs: [{ indexed: false, internalType: 'address', name: 'mToken', type: 'address' }],
name: 'MarketListed',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: 'address', name: 'mToken', type: 'address' },
{ indexed: false, internalType: 'uint256', name: 'newBorrowCap', type: 'uint256' },
],
name: 'NewBorrowCap',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: false, internalType: 'uint256', name: 'oldCloseFactorMantissa', type: 'uint256' },
{ indexed: false, internalType: 'uint256', name: 'newCloseFactorMantissa', type: 'uint256' },
],
name: 'NewCloseFactor',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: 'address', name: 'mToken', type: 'address' },
{ indexed: false, internalType: 'uint256', name: 'oldCollateralFactorMantissa', type: 'uint256' },
{ indexed: false, internalType: 'uint256', name: 'newCollateralFactorMantissa', type: 'uint256' },
],
name: 'NewCollateralFactor',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: false, internalType: 'address', name: 'market', type: 'address' },
{ indexed: false, internalType: 'uint256', name: 'oldLiquidationIncentiveMantissa', type: 'uint256' },
{ indexed: false, internalType: 'uint256', name: 'newLiquidationIncentiveMantissa', type: 'uint256' },
],
name: 'NewLiquidationIncentive',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: 'address', name: 'oldPriceOracle', type: 'address' },
{ indexed: true, internalType: 'address', name: 'newPriceOracle', type: 'address' },
],
name: 'NewPriceOracle',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: 'address', name: 'oldRewardDistributor', type: 'address' },
{ indexed: true, internalType: 'address', name: 'newRewardDistributor', type: 'address' },
],
name: 'NewRewardDistributor',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: 'address', name: 'oldRoles', type: 'address' },
{ indexed: true, internalType: 'address', name: 'newRoles', type: 'address' },
],
name: 'NewRolesOperator',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: 'address', name: 'mToken', type: 'address' },
{ indexed: false, internalType: 'uint256', name: 'newBorrowCap', type: 'uint256' },
],
name: 'NewSupplyCap',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: 'address', name: 'sender', type: 'address' },
{ indexed: false, internalType: 'uint256', name: 'oldLimit', type: 'uint256' },
{ indexed: false, internalType: 'uint256', name: 'newLimit', type: 'uint256' },
],
name: 'OutflowLimitUpdated',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: false, internalType: 'uint256', name: 'oldWindow', type: 'uint256' },
{ indexed: false, internalType: 'uint256', name: 'newWindow', type: 'uint256' },
],
name: 'OutflowTimeWindowUpdated',
type: 'event',
},
{ anonymous: false, inputs: [], name: 'OutflowVolumeReset', type: 'event' },
{
anonymous: false,
inputs: [
{ indexed: true, internalType: 'address', name: 'previousOwner', type: 'address' },
{ indexed: true, internalType: 'address', name: 'newOwner', type: 'address' },
],
name: 'OwnershipTransferred',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: 'address', name: 'user', type: 'address' },
{ indexed: false, internalType: 'bool', name: 'state', type: 'bool' },
],
name: 'UserWhitelisted',
type: 'event',
},
{ anonymous: false, inputs: [], name: 'WhitelistDisabled', type: 'event' },
{ anonymous: false, inputs: [], name: 'WhitelistEnabled', type: 'event' },
{
inputs: [
{ internalType: 'address', name: '', type: 'address' },
{ internalType: 'uint256', name: '', type: 'uint256' },
],
name: 'accountAssets',
outputs: [{ internalType: 'address', name: '', type: 'address' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: 'mToken', type: 'address' }],
name: 'afterMTokenMint',
outputs: [],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
name: 'allMarkets',
outputs: [{ internalType: 'address', name: '', type: 'address' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: 'mToken', type: 'address' },
{ internalType: 'address', name: 'borrower', type: 'address' },
{ internalType: 'uint256', name: 'borrowAmount', type: 'uint256' },
],
name: 'beforeMTokenBorrow',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: 'mTokenBorrowed', type: 'address' },
{ internalType: 'address', name: 'mTokenCollateral', type: 'address' },
{ internalType: 'address', name: 'borrower', type: 'address' },
{ internalType: 'uint256', name: 'repayAmount', type: 'uint256' },
],
name: 'beforeMTokenLiquidate',
outputs: [],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: 'mToken', type: 'address' },
{ internalType: 'address', name: 'minter', type: 'address' },
],
name: 'beforeMTokenMint',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: 'mToken', type: 'address' },
{ internalType: 'address', name: 'redeemer', type: 'address' },
{ internalType: 'uint256', name: 'redeemTokens', type: 'uint256' },
],
name: 'beforeMTokenRedeem',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: 'mToken', type: 'address' },
{ internalType: 'address', name: 'borrower', type: 'address' },
],
name: 'beforeMTokenRepay',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: 'mTokenCollateral', type: 'address' },
{ internalType: 'address', name: 'mTokenBorrowed', type: 'address' },
{ internalType: 'address', name: 'liquidator', type: 'address' },
{ internalType: 'address', name: 'borrower', type: 'address' },
],
name: 'beforeMTokenSeize',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: 'mToken', type: 'address' },
{ internalType: 'address', name: 'src', type: 'address' },
{ internalType: 'address', name: 'dst', type: 'address' },
{ internalType: 'uint256', name: 'transferTokens', type: 'uint256' },
],
name: 'beforeMTokenTransfer',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: 'mToken', type: 'address' }],
name: 'beforeRebalancing',
outputs: [],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: '', type: 'address' }],
name: 'borrowCaps',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: 'account', type: 'address' },
{ internalType: 'address', name: 'mToken', type: 'address' },
],
name: 'checkMembership',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'uint256', name: 'amount', type: 'uint256' }],
name: 'checkOutflowVolumeLimit',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: 'holder', type: 'address' },
{ internalType: 'address[]', name: 'mTokens', type: 'address[]' },
],
name: 'claimMalda',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'address[]', name: 'holders', type: 'address[]' },
{ internalType: 'address[]', name: 'mTokens', type: 'address[]' },
{ internalType: 'bool', name: 'borrowers', type: 'bool' },
{ internalType: 'bool', name: 'suppliers', type: 'bool' },
],
name: 'claimMalda',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: 'holder', type: 'address' }],
name: 'claimMalda',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'closeFactorMantissa',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'cumulativeOutflowVolume',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{ inputs: [], name: 'disableWhitelist', outputs: [], stateMutability: 'nonpayable', type: 'function' },
{ inputs: [], name: 'enableWhitelist', outputs: [], stateMutability: 'nonpayable', type: 'function' },
{
inputs: [{ internalType: 'address[]', name: '_mTokens', type: 'address[]' }],
name: 'enterMarkets',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: '_account', type: 'address' }],
name: 'enterMarketsWithSender',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: '_mToken', type: 'address' }],
name: 'exitMarket',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: 'account', type: 'address' }],
name: 'getAccountLiquidity',
outputs: [
{ internalType: 'uint256', name: '', type: 'uint256' },
{ internalType: 'uint256', name: '', type: 'uint256' },
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'getAllMarkets',
outputs: [{ internalType: 'address[]', name: 'mTokens', type: 'address[]' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: '_user', type: 'address' }],
name: 'getAssetsIn',
outputs: [{ internalType: 'address[]', name: 'mTokens', type: 'address[]' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: 'account', type: 'address' },
{ internalType: 'address', name: 'mTokenModify', type: 'address' },
{ internalType: 'uint256', name: 'redeemTokens', type: 'uint256' },
{ internalType: 'uint256', name: 'borrowAmount', type: 'uint256' },
],
name: 'getHypotheticalAccountLiquidity',
outputs: [
{ internalType: 'uint256', name: '', type: 'uint256' },
{ internalType: 'uint256', name: '', type: 'uint256' },
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'getUSDValueForAllMarkets',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: '_rolesOperator', type: 'address' },
{ internalType: 'address', name: '_rewardDistributor', type: 'address' },
{ internalType: 'address', name: '_admin', type: 'address' },
],
name: 'initialize',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: 'mToken', type: 'address' }],
name: 'isDeprecated',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: 'mToken', type: 'address' }],
name: 'isMarketListed',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'isOperator',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'pure',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: 'mToken', type: 'address' },
{ internalType: 'enum ImTokenOperationTypes.OperationType', name: '_type', type: 'uint8' },
],
name: 'isPaused',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'lastOutflowResetTimestamp',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'limitPerTimePeriod',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: 'mTokenBorrowed', type: 'address' },
{ internalType: 'address', name: 'mTokenCollateral', type: 'address' },
{ internalType: 'uint256', name: 'actualRepayAmount', type: 'uint256' },
],
name: 'liquidateCalculateSeizeTokens',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: '', type: 'address' }],
name: 'liquidationIncentiveMantissa',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: '', type: 'address' }],
name: 'markets',
outputs: [
{ internalType: 'bool', name: 'isListed', type: 'bool' },
{ internalType: 'uint256', name: 'collateralFactorMantissa', type: 'uint256' },
{ internalType: 'bool', name: 'isMalded', type: 'bool' },
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'oracleOperator',
outputs: [{ internalType: 'address', name: '', type: 'address' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'outflowResetTimeWindow',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'owner',
outputs: [{ internalType: 'address', name: '', type: 'address' }],
stateMutability: 'view',
type: 'function',
},
{ inputs: [], name: 'renounceOwnership', outputs: [], stateMutability: 'nonpayable', type: 'function' },
{ inputs: [], name: 'resetOutflowVolume', outputs: [], stateMutability: 'nonpayable', type: 'function' },
{
inputs: [],
name: 'rewardDistributor',
outputs: [{ internalType: 'address', name: '', type: 'address' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'rolesOperator',
outputs: [{ internalType: 'contract IRoles', name: '', type: 'address' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'uint256', name: 'newCloseFactorMantissa', type: 'uint256' }],
name: 'setCloseFactor',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: 'mToken', type: 'address' },
{ internalType: 'uint256', name: 'newCollateralFactorMantissa', type: 'uint256' },
],
name: 'setCollateralFactor',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: 'market', type: 'address' },
{ internalType: 'uint256', name: 'newLiquidationIncentiveMantissa', type: 'uint256' },
],
name: 'setLiquidationIncentive',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'address[]', name: 'mTokens', type: 'address[]' },
{ internalType: 'uint256[]', name: 'newBorrowCaps', type: 'uint256[]' },
],
name: 'setMarketBorrowCaps',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'address[]', name: 'mTokens', type: 'address[]' },
{ internalType: 'uint256[]', name: 'newSupplyCaps', type: 'uint256[]' },
],
name: 'setMarketSupplyCaps',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'uint256', name: 'amount', type: 'uint256' }],
name: 'setOutflowTimeLimitInUSD',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'uint256', name: 'newTimeWindow', type: 'uint256' }],
name: 'setOutflowVolumeTimeWindow',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: 'mToken', type: 'address' },
{ internalType: 'enum ImTokenOperationTypes.OperationType', name: '_type', type: 'uint8' },
{ internalType: 'bool', name: 'state', type: 'bool' },
],
name: 'setPaused',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: 'newOracle', type: 'address' }],
name: 'setPriceOracle',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: 'newRewardDistributor', type: 'address' }],
name: 'setRewardDistributor',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: '_roles', type: 'address' }],
name: 'setRolesOperator',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: 'user', type: 'address' },
{ internalType: 'bool', name: 'state', type: 'bool' },
],
name: 'setWhitelistedUser',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: '', type: 'address' }],
name: 'supplyCaps',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: 'mToken', type: 'address' }],
name: 'supportMarket',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: 'newOwner', type: 'address' }],
name: 'transferOwnership',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: '', type: 'address' }],
name: 'userWhitelisted',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'whitelistEnabled',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'view',
type: 'function',
},
];