fsl-js-sdk
Version:
sdk for web
1,018 lines (1,017 loc) • 26.1 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.aggABI = void 0;
exports.aggABI = [
{
inputs: [],
name: 'AccessControlBadConfirmation',
type: 'error',
},
{
inputs: [
{
internalType: 'address',
name: 'account',
type: 'address',
},
{
internalType: 'bytes32',
name: 'neededRole',
type: 'bytes32',
},
],
name: 'AccessControlUnauthorizedAccount',
type: 'error',
},
{
inputs: [],
name: 'InvalidInitialization',
type: 'error',
},
{
inputs: [],
name: 'NotInitializing',
type: 'error',
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'address',
name: '_tokenIn',
type: 'address',
},
{
indexed: true,
internalType: 'address',
name: '_tokenOut',
type: 'address',
},
{
indexed: false,
internalType: 'uint256',
name: '_amountIn',
type: 'uint256',
},
{
indexed: false,
internalType: 'uint256',
name: '_amountOut',
type: 'uint256',
},
],
name: 'DOOARSwap',
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: '_asset',
type: 'address',
},
{
indexed: false,
internalType: 'uint256',
name: 'amount',
type: 'uint256',
},
],
name: 'Recovered',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'bytes32',
name: 'role',
type: 'bytes32',
},
{
indexed: true,
internalType: 'bytes32',
name: 'previousAdminRole',
type: 'bytes32',
},
{
indexed: true,
internalType: 'bytes32',
name: 'newAdminRole',
type: 'bytes32',
},
],
name: 'RoleAdminChanged',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'bytes32',
name: 'role',
type: 'bytes32',
},
{
indexed: true,
internalType: 'address',
name: 'account',
type: 'address',
},
{
indexed: true,
internalType: 'address',
name: 'sender',
type: 'address',
},
],
name: 'RoleGranted',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'bytes32',
name: 'role',
type: 'bytes32',
},
{
indexed: true,
internalType: 'address',
name: 'account',
type: 'address',
},
{
indexed: true,
internalType: 'address',
name: 'sender',
type: 'address',
},
],
name: 'RoleRevoked',
type: 'event',
},
{
inputs: [
{
internalType: 'uint256',
name: '',
type: 'uint256',
},
],
name: 'ADAPTERS',
outputs: [
{
internalType: 'address',
name: '',
type: 'address',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'DEFAULT_ADMIN_ROLE',
outputs: [
{
internalType: 'bytes32',
name: '',
type: 'bytes32',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'FEE_CLAIMER',
outputs: [
{
internalType: 'address',
name: '',
type: 'address',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'FEE_DENOMINATOR',
outputs: [
{
internalType: 'uint256',
name: '',
type: 'uint256',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'MAINTAINER_ROLE',
outputs: [
{
internalType: 'bytes32',
name: '',
type: 'bytes32',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'MIN_FEE',
outputs: [
{
internalType: 'uint256',
name: '',
type: 'uint256',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'NAME',
outputs: [
{
internalType: 'string',
name: '',
type: 'string',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'NATIVE',
outputs: [
{
internalType: 'address',
name: '',
type: 'address',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{
internalType: 'uint256',
name: '',
type: 'uint256',
},
],
name: 'TRUSTED_TOKENS',
outputs: [
{
internalType: 'address',
name: '',
type: 'address',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'WNATIVE',
outputs: [
{
internalType: 'address',
name: '',
type: 'address',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'adaptersCount',
outputs: [
{
internalType: 'uint256',
name: '',
type: 'uint256',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{
internalType: 'address',
name: 'addedMaintainer',
type: 'address',
},
],
name: 'addMaintainer',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
internalType: 'bytes32',
name: 'role',
type: 'bytes32',
},
],
name: 'getRoleAdmin',
outputs: [
{
internalType: 'bytes32',
name: '',
type: 'bytes32',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{
internalType: 'bytes32',
name: 'role',
type: 'bytes32',
},
{
internalType: 'address',
name: 'account',
type: 'address',
},
],
name: 'grantRole',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
internalType: 'bytes32',
name: 'role',
type: 'bytes32',
},
{
internalType: 'address',
name: 'account',
type: 'address',
},
],
name: 'hasRole',
outputs: [
{
internalType: 'bool',
name: '',
type: 'bool',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{
internalType: 'address[]',
name: '_adapters',
type: 'address[]',
},
{
internalType: 'address[]',
name: '_trustedTokens',
type: 'address[]',
},
{
internalType: 'address',
name: '_feeClaimer',
type: 'address',
},
{
internalType: 'address',
name: '_wrapped_native',
type: 'address',
},
{
internalType: 'address',
name: 'maintainer',
type: 'address',
},
],
name: 'initialize',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
internalType: 'uint256',
name: '_amountIn',
type: 'uint256',
},
{
internalType: 'address',
name: '_tokenIn',
type: 'address',
},
{
internalType: 'address',
name: '_tokenOut',
type: 'address',
},
{
internalType: 'uint256',
name: '_maxSteps',
type: 'uint256',
},
],
name: 'quoteExactInput',
outputs: [
{
components: [
{
internalType: 'uint256[]',
name: 'amounts',
type: 'uint256[]',
},
{
internalType: 'address[]',
name: 'adapters',
type: 'address[]',
},
{
internalType: 'address[]',
name: 'path',
type: 'address[]',
},
{
internalType: 'uint256',
name: 'gasEstimate',
type: 'uint256',
},
{
internalType: 'int24',
name: 'fee',
type: 'int24',
},
{
internalType: 'int24',
name: 'priceImpact',
type: 'int24',
},
],
internalType: 'struct FormattedOffer',
name: '',
type: 'tuple',
},
],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
internalType: 'uint256',
name: '_amountIn',
type: 'uint256',
},
{
internalType: 'address',
name: '_tokenIn',
type: 'address',
},
{
internalType: 'address',
name: '_tokenOut',
type: 'address',
},
],
name: 'quoteExactInputSingle',
outputs: [
{
components: [
{
internalType: 'address',
name: 'adapter',
type: 'address',
},
{
internalType: 'address',
name: 'tokenIn',
type: 'address',
},
{
internalType: 'address',
name: 'tokenOut',
type: 'address',
},
{
internalType: 'uint256',
name: 'amountOut',
type: 'uint256',
},
{
internalType: 'int24',
name: 'fee',
type: 'int24',
},
{
internalType: 'int24',
name: 'priceImpact',
type: 'int24',
},
],
internalType: 'struct Query',
name: '',
type: 'tuple',
},
],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
internalType: 'uint256',
name: '_amountOut',
type: 'uint256',
},
{
internalType: 'address',
name: '_tokenIn',
type: 'address',
},
{
internalType: 'address',
name: '_tokenOut',
type: 'address',
},
{
internalType: 'uint256',
name: '_maxSteps',
type: 'uint256',
},
],
name: 'quoteExactOutput',
outputs: [
{
components: [
{
internalType: 'uint256[]',
name: 'amounts',
type: 'uint256[]',
},
{
internalType: 'address[]',
name: 'adapters',
type: 'address[]',
},
{
internalType: 'address[]',
name: 'path',
type: 'address[]',
},
{
internalType: 'uint256',
name: 'gasEstimate',
type: 'uint256',
},
{
internalType: 'int24',
name: 'fee',
type: 'int24',
},
{
internalType: 'int24',
name: 'priceImpact',
type: 'int24',
},
],
internalType: 'struct FormattedOffer',
name: '',
type: 'tuple',
},
],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
internalType: 'uint256',
name: '_amountOut',
type: 'uint256',
},
{
internalType: 'address',
name: '_tokenIn',
type: 'address',
},
{
internalType: 'address',
name: '_tokenOut',
type: 'address',
},
],
name: 'quoteExactOutputSingle',
outputs: [
{
components: [
{
internalType: 'address',
name: 'adapter',
type: 'address',
},
{
internalType: 'address',
name: 'tokenIn',
type: 'address',
},
{
internalType: 'address',
name: 'tokenOut',
type: 'address',
},
{
internalType: 'uint256',
name: 'amountOut',
type: 'uint256',
},
{
internalType: 'int24',
name: 'fee',
type: 'int24',
},
{
internalType: 'int24',
name: 'priceImpact',
type: 'int24',
},
],
internalType: 'struct Query',
name: '',
type: 'tuple',
},
],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
internalType: 'address',
name: '_tokenAddress',
type: 'address',
},
{
internalType: 'uint256',
name: '_tokenAmount',
type: 'uint256',
},
],
name: 'recoverERC20',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
internalType: 'uint256',
name: '_amount',
type: 'uint256',
},
],
name: 'recoverNative',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
internalType: 'address',
name: 'removedMaintainer',
type: 'address',
},
],
name: 'removeMaintainer',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
internalType: 'bytes32',
name: 'role',
type: 'bytes32',
},
{
internalType: 'address',
name: 'callerConfirmation',
type: 'address',
},
],
name: 'renounceRole',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
internalType: 'bytes32',
name: 'role',
type: 'bytes32',
},
],
name: 'renounceRole',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
internalType: 'bytes32',
name: 'role',
type: 'bytes32',
},
{
internalType: 'address',
name: 'account',
type: 'address',
},
],
name: 'revokeRole',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
internalType: 'address[]',
name: '_adapters',
type: 'address[]',
},
],
name: 'setAdapters',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
internalType: 'address',
name: '_wnative',
type: 'address',
},
],
name: 'setAllowanceForWrapping',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
internalType: 'address',
name: '_claimer',
type: 'address',
},
],
name: 'setFeeClaimer',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
internalType: 'uint256',
name: '_fee',
type: 'uint256',
},
],
name: 'setMinFee',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
internalType: 'address[]',
name: '_trustedTokens',
type: 'address[]',
},
],
name: 'setTrustedTokens',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
internalType: 'bytes4',
name: 'interfaceId',
type: 'bytes4',
},
],
name: 'supportsInterface',
outputs: [
{
internalType: 'bool',
name: '',
type: 'bool',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{
components: [
{
internalType: 'uint256',
name: 'amountIn',
type: 'uint256',
},
{
internalType: 'uint256',
name: 'amountOut',
type: 'uint256',
},
{
internalType: 'address[]',
name: 'path',
type: 'address[]',
},
{
internalType: 'address[]',
name: 'adapters',
type: 'address[]',
},
],
internalType: 'struct Trade',
name: '_trade',
type: 'tuple',
},
{
internalType: 'address',
name: '_to',
type: 'address',
},
],
name: 'swap',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
components: [
{
internalType: 'uint256',
name: 'amountIn',
type: 'uint256',
},
{
internalType: 'uint256',
name: 'amountOut',
type: 'uint256',
},
{
internalType: 'address[]',
name: 'path',
type: 'address[]',
},
{
internalType: 'address[]',
name: 'adapters',
type: 'address[]',
},
],
internalType: 'struct Trade',
name: '_trade',
type: 'tuple',
},
{
internalType: 'address',
name: '_to',
type: 'address',
},
],
name: 'swapFromNative',
outputs: [],
stateMutability: 'payable',
type: 'function',
},
{
inputs: [
{
components: [
{
internalType: 'uint256',
name: 'amountIn',
type: 'uint256',
},
{
internalType: 'uint256',
name: 'amountOut',
type: 'uint256',
},
{
internalType: 'address[]',
name: 'path',
type: 'address[]',
},
{
internalType: 'address[]',
name: 'adapters',
type: 'address[]',
},
],
internalType: 'struct Trade',
name: '_trade',
type: 'tuple',
},
{
internalType: 'address',
name: '_to',
type: 'address',
},
],
name: 'swapToNative',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
internalType: 'address',
name: 'newOwner',
type: 'address',
},
],
name: 'transferOwnership',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'trustedTokensCount',
outputs: [
{
internalType: 'uint256',
name: '',
type: 'uint256',
},
],
stateMutability: 'view',
type: 'function',
},
{
stateMutability: 'payable',
type: 'receive',
},
];