UNPKG

@skalenetwork/metaport

Version:

SKALE Metaport Widget

29 lines (28 loc) 1.89 kB
/** * @license * SKALE Metaport * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. */ import { Contract } from 'ethers'; import { MainnetChain, SChain } from '@skalenetwork/ima-js'; import { TokenData } from '../dataclasses/TokenData'; import * as interfaces from '../interfaces'; export declare function checkEthBalance(// TODO: optimize balance checks chain: MainnetChain | SChain, address: string, amount: string, tokenData: TokenData): Promise<interfaces.CheckRes>; export declare function checkERC20Balance(address: string, amount: string, tokenData: TokenData, tokenContract: Contract): Promise<interfaces.CheckRes>; export declare function checkSFuelBalance(address: string, amount: string, sChain: SChain): Promise<interfaces.CheckRes>; export declare function checkERC20Allowance(address: string, approvalAddress: string, amount: string, tokenData: TokenData, tokenContract: Contract): Promise<interfaces.CheckRes>; export declare function checkERC721(address: string, approvalAddress: string, tokenId: number, tokenContract: Contract): Promise<interfaces.CheckRes>; export declare function checkERC1155(address: string, approvalAddress: string, tokenId: number, amount: string, tokenData: TokenData, tokenContract: Contract): Promise<interfaces.CheckRes>;