@malda-protocol/protocol-config
Version:
Centralized contract addresses, constants, and token configurations for Malda Protocol
359 lines (358 loc) • 14.3 kB
JavaScript
export const MTOKEN_GATEWAY_ABI = [
{ inputs: [], stateMutability: 'nonpayable', type: 'constructor' },
{ inputs: [{ internalType: 'address', name: 'target', type: 'address' }], name: 'AddressEmptyCode', type: 'error' },
{
inputs: [{ internalType: 'address', name: 'account', type: 'address' }],
name: 'AddressInsufficientBalance',
type: 'error',
},
{ inputs: [], name: 'FailedInnerCall', type: 'error' },
{ inputs: [], name: 'InvalidInitialization', type: 'error' },
{ inputs: [], name: 'NotInitializing', type: 'error' },
{ inputs: [{ internalType: 'address', name: 'owner', type: 'address' }], name: 'OwnableInvalidOwner', type: 'error' },
{
inputs: [{ internalType: 'address', name: 'account', type: 'address' }],
name: 'OwnableUnauthorizedAccount',
type: 'error',
},
{
inputs: [{ internalType: 'address', name: 'token', type: 'address' }],
name: 'SafeERC20FailedOperation',
type: 'error',
},
{ inputs: [], name: 'mTokenGateway_AddressNotValid', type: 'error' },
{ inputs: [], name: 'mTokenGateway_AmountNotValid', type: 'error' },
{ inputs: [], name: 'mTokenGateway_AmountTooBig', type: 'error' },
{ inputs: [], name: 'mTokenGateway_CallerNotAllowed', type: 'error' },
{ inputs: [], name: 'mTokenGateway_ChainNotValid', type: 'error' },
{ inputs: [], name: 'mTokenGateway_JournalNotValid', type: 'error' },
{ inputs: [], name: 'mTokenGateway_L1InclusionRequired', type: 'error' },
{ inputs: [], name: 'mTokenGateway_LengthNotValid', type: 'error' },
{ inputs: [], name: 'mTokenGateway_NonTransferable', type: 'error' },
{ inputs: [], name: 'mTokenGateway_NotEnoughGasFee', type: 'error' },
{ inputs: [], name: 'mTokenGateway_NotRebalancer', type: 'error' },
{
inputs: [{ internalType: 'enum ImTokenOperationTypes.OperationType', name: '_type', type: 'uint8' }],
name: 'mTokenGateway_Paused',
type: 'error',
},
{ inputs: [], name: 'mTokenGateway_ReleaseCashNotAvailable', type: 'error' },
{ inputs: [], name: 'mTokenGateway_UserNotWhitelisted', type: 'error' },
{ inputs: [], name: 'mTokenProofDecoderLib_InvalidInclusion', type: 'error' },
{ inputs: [], name: 'mTokenProofDecoderLib_InvalidLength', type: 'error' },
{
anonymous: false,
inputs: [
{ indexed: true, internalType: 'address', name: 'sender', type: 'address' },
{ indexed: true, internalType: 'address', name: 'caller', type: 'address' },
{ indexed: false, internalType: 'bool', name: 'status', type: 'bool' },
],
name: 'AllowedCallerUpdated',
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: 'previousOwner', type: 'address' },
{ indexed: true, internalType: 'address', name: 'newOwner', type: 'address' },
],
name: 'OwnershipTransferred',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: 'address', name: 'oldVerifier', type: 'address' },
{ indexed: true, internalType: 'address', name: 'newVerifier', type: 'address' },
],
name: 'ZkVerifierUpdated',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: 'address', name: 'msgSender', type: 'address' },
{ indexed: true, internalType: 'address', name: 'srcSender', type: 'address' },
{ indexed: true, internalType: 'address', name: 'receiver', type: 'address' },
{ indexed: false, internalType: 'uint256', name: 'accAmountIn', type: 'uint256' },
{ indexed: false, internalType: 'uint256', name: 'accAmountOut', type: 'uint256' },
{ indexed: false, internalType: 'uint256', name: 'amount', type: 'uint256' },
{ indexed: false, internalType: 'uint32', name: 'srcChainId', type: 'uint32' },
{ indexed: false, internalType: 'uint32', name: 'dstChainId', type: 'uint32' },
],
name: 'mTokenGateway_Extracted',
type: 'event',
},
{
anonymous: false,
inputs: [{ indexed: false, internalType: 'uint256', name: 'amount', type: 'uint256' }],
name: 'mTokenGateway_GasFeeUpdated',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: 'enum ImTokenOperationTypes.OperationType', name: '_type', type: 'uint8' },
{ indexed: false, internalType: 'bool', name: '_status', type: 'bool' },
],
name: 'mTokenGateway_PausedState',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: 'address', name: 'msgSender', type: 'address' },
{ indexed: true, internalType: 'address', name: 'srcSender', type: 'address' },
{ indexed: true, internalType: 'address', name: 'receiver', type: 'address' },
{ indexed: false, internalType: 'uint256', name: 'accAmountIn', type: 'uint256' },
{ indexed: false, internalType: 'uint256', name: 'accAmountOut', type: 'uint256' },
{ indexed: false, internalType: 'uint256', name: 'amount', type: 'uint256' },
{ indexed: false, internalType: 'uint32', name: 'srcChainId', type: 'uint32' },
{ indexed: false, internalType: 'uint32', name: 'dstChainId', type: 'uint32' },
],
name: 'mTokenGateway_Skipped',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: 'address', name: 'from', type: 'address' },
{ indexed: true, internalType: 'address', name: 'receiver', type: 'address' },
{ indexed: false, internalType: 'uint256', name: 'accAmountIn', type: 'uint256' },
{ indexed: false, internalType: 'uint256', name: 'accAmountOut', type: 'uint256' },
{ indexed: false, internalType: 'uint256', name: 'amount', type: 'uint256' },
{ indexed: false, internalType: 'uint32', name: 'srcChainId', type: 'uint32' },
{ indexed: false, internalType: 'uint32', name: 'dstChainId', type: 'uint32' },
{ indexed: false, internalType: 'bytes4', name: 'lineaMethodSelector', type: 'bytes4' },
],
name: 'mTokenGateway_Supplied',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: 'address', name: 'user', type: 'address' },
{ indexed: false, internalType: 'bool', name: 'status', type: 'bool' },
],
name: 'mTokenGateway_UserWhitelisted',
type: 'event',
},
{ anonymous: false, inputs: [], name: 'mTokenGateway_WhitelistDisabled', type: 'event' },
{ anonymous: false, inputs: [], name: 'mTokenGateway_WhitelistEnabled', type: 'event' },
{
inputs: [{ internalType: 'address', name: '', type: 'address' }],
name: 'accAmountIn',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: '', type: 'address' }],
name: 'accAmountOut',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: '', type: 'address' },
{ internalType: 'address', name: '', type: 'address' },
],
name: 'allowedCallers',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'view',
type: 'function',
},
{ inputs: [], name: 'disableWhitelist', outputs: [], stateMutability: 'nonpayable', type: 'function' },
{ inputs: [], name: 'enableWhitelist', outputs: [], stateMutability: 'nonpayable', type: 'function' },
{
inputs: [{ internalType: 'uint256', name: 'amount', type: 'uint256' }],
name: 'extractForRebalancing',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'gasFee',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: 'user', type: 'address' },
{ internalType: 'uint32', name: '', type: 'uint32' },
],
name: 'getProofData',
outputs: [
{ internalType: 'uint256', name: '', type: 'uint256' },
{ internalType: 'uint256', name: '', type: 'uint256' },
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'address payable', name: '_owner', type: 'address' },
{ internalType: 'address', name: '_underlying', type: 'address' },
{ internalType: 'address', name: '_roles', type: 'address' },
{ internalType: 'address', name: 'zkVerifier_', type: 'address' },
],
name: 'initialize',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'enum ImTokenOperationTypes.OperationType', name: '_type', type: 'uint8' }],
name: 'isPaused',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'bytes', name: 'journalData', type: 'bytes' },
{ internalType: 'bytes', name: 'seal', type: 'bytes' },
{ internalType: 'uint256[]', name: 'amounts', type: 'uint256[]' },
{ internalType: 'address', name: 'receiver', type: 'address' },
],
name: 'outHere',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'owner',
outputs: [{ internalType: 'address', name: '', type: 'address' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'enum ImTokenOperationTypes.OperationType', name: '', type: 'uint8' }],
name: 'paused',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'view',
type: 'function',
},
{ inputs: [], name: 'renounceOwnership', outputs: [], stateMutability: 'nonpayable', type: 'function' },
{
inputs: [],
name: 'rolesOperator',
outputs: [{ internalType: 'contract IRoles', name: '', type: 'address' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'uint256', name: 'amount', type: 'uint256' }],
name: 'setGasFee',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ 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: '_addr', type: 'address' }],
name: 'setUnderlying',
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: 'uint256', name: 'amount', type: 'uint256' },
{ internalType: 'address', name: 'receiver', type: 'address' },
{ internalType: 'bytes4', name: 'lineaSelector', type: 'bytes4' },
],
name: 'supplyOnHost',
outputs: [],
stateMutability: 'payable',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: 'newOwner', type: 'address' }],
name: 'transferOwnership',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'underlying',
outputs: [{ internalType: 'address', name: '', type: 'address' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: 'caller', type: 'address' },
{ internalType: 'bool', name: 'status', type: 'bool' },
],
name: 'updateAllowedCallerStatus',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: '_zkVerifier', type: 'address' }],
name: 'updateZkVerifier',
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: 'verifier',
outputs: [{ internalType: 'contract IZkVerifier', name: '', type: 'address' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'whitelistEnabled',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'address payable', name: 'receiver', type: 'address' }],
name: 'withdrawGasFees',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
];