dequanto 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vscode/settings.json +11 -0
- package/actions/gen.act.ts +38 -0
- package/actions/tokens.act.ts +12 -0
- package/configs/dequanto.yml +51 -0
- package/contracts/abi/erc20.abi.json +222 -0
- package/contracts/gen/amm/AmmFactoryV2ContractBase.ts +66 -0
- package/contracts/gen/amm/AmmMasterChefV2ContractBase.ts +158 -0
- package/contracts/gen/amm/AmmPairContractV2Base.ts +158 -0
- package/contracts/gen/amm/AmmPairContractV3Base.ts +125 -0
- package/contracts/gen/amm/AmmRouterV2ContractBase.ts +124 -0
- package/contracts/gen/amm/AmmVaultV2ContractBase.ts +214 -0
- package/contracts/gen/base/ERC20Base.ts +90 -0
- package/contracts/gen/bsc/OneInchRouterV3Base.ts +57 -0
- package/contracts/gen/eth/WETHBase/WETHBase.sol +756 -0
- package/contracts/gen/eth/WETHBase.ts +136 -0
- package/contracts/gen/polygon/ERC20PolygonBase.ts +305 -0
- package/contracts/gen/polygon/WormholeBridgeContractBase/Address.sol +216 -0
- package/contracts/gen/polygon/WormholeBridgeContractBase/BeaconProxy.sol +61 -0
- package/contracts/gen/polygon/WormholeBridgeContractBase/Bridge.sol +437 -0
- package/contracts/gen/polygon/WormholeBridgeContractBase/BridgeGetters.sol +70 -0
- package/contracts/gen/polygon/WormholeBridgeContractBase/BridgeGovernance.sol +142 -0
- package/contracts/gen/polygon/WormholeBridgeContractBase/BridgeImplementation.sol +34 -0
- package/contracts/gen/polygon/WormholeBridgeContractBase/BridgeSetters.sol +57 -0
- package/contracts/gen/polygon/WormholeBridgeContractBase/BridgeState.sol +52 -0
- package/contracts/gen/polygon/WormholeBridgeContractBase/BridgeStructs.sol +66 -0
- package/contracts/gen/polygon/WormholeBridgeContractBase/BytesLib.sol +510 -0
- package/contracts/gen/polygon/WormholeBridgeContractBase/Context.sol +23 -0
- package/contracts/gen/polygon/WormholeBridgeContractBase/ERC1967Proxy.sol +32 -0
- package/contracts/gen/polygon/WormholeBridgeContractBase/ERC1967Upgrade.sol +193 -0
- package/contracts/gen/polygon/WormholeBridgeContractBase/IBeacon.sol +15 -0
- package/contracts/gen/polygon/WormholeBridgeContractBase/IERC20.sol +81 -0
- package/contracts/gen/polygon/WormholeBridgeContractBase/IWormhole.sol +42 -0
- package/contracts/gen/polygon/WormholeBridgeContractBase/Ownable.sol +71 -0
- package/contracts/gen/polygon/WormholeBridgeContractBase/Proxy.sol +85 -0
- package/contracts/gen/polygon/WormholeBridgeContractBase/SafeERC20.sol +98 -0
- package/contracts/gen/polygon/WormholeBridgeContractBase/StorageSlot.sol +83 -0
- package/contracts/gen/polygon/WormholeBridgeContractBase/Structs.sol +40 -0
- package/contracts/gen/polygon/WormholeBridgeContractBase/Token.sol +12 -0
- package/contracts/gen/polygon/WormholeBridgeContractBase/TokenBridge.sol +15 -0
- package/contracts/gen/polygon/WormholeBridgeContractBase/TokenImplementation.sol +177 -0
- package/contracts/gen/polygon/WormholeBridgeContractBase/TokenState.sol +31 -0
- package/contracts/gen/polygon/WormholeBridgeContractBase.ts +231 -0
- package/contracts/gen/xdai/WXDaiTokenContractBase.ts +136 -0
- package/data/cex/eth.csv +356 -0
- package/data/tokens/1inch.json +16557 -0
- package/data/tokens/arbitrum.json +1 -0
- package/data/tokens/sushi.json +56388 -0
- package/dist/contracts/gen/amm/AmmFactoryV2ContractBase.js +53 -0
- package/dist/contracts/gen/amm/AmmMasterChefV2ContractBase.js +122 -0
- package/dist/contracts/gen/amm/AmmPairContractV2Base.js +122 -0
- package/dist/contracts/gen/amm/AmmPairContractV3Base.js +98 -0
- package/dist/contracts/gen/amm/AmmRouterV2ContractBase.js +95 -0
- package/dist/contracts/gen/amm/AmmVaultV2ContractBase.js +164 -0
- package/dist/contracts/gen/base/ERC20Base.js +64 -0
- package/dist/contracts/gen/bsc/OneInchRouterV3Base.js +47 -0
- package/dist/contracts/gen/eth/WETHBase.js +96 -0
- package/dist/contracts/gen/polygon/ERC20PolygonBase.js +233 -0
- package/dist/contracts/gen/polygon/WormholeBridgeContractBase.js +172 -0
- package/dist/contracts/gen/xdai/WXDaiTokenContractBase.js +96 -0
- package/dist/src/BlockchainExplorer/BlockChainExplorerFactory.js +227 -0
- package/dist/src/BlockchainExplorer/BlockChainExplorerProvider.js +32 -0
- package/dist/src/BlockchainExplorer/BlockNumberCache.js +33 -0
- package/dist/src/BlockchainExplorer/Bscscan.js +27 -0
- package/dist/src/BlockchainExplorer/Etherscan.js +27 -0
- package/dist/src/BlockchainExplorer/IAbiProvider.js +2 -0
- package/dist/src/BlockchainExplorer/IBlockChainExplorer.js +2 -0
- package/dist/src/BlockchainExplorer/Polyscan.js +27 -0
- package/dist/src/ChainAccounts.js +69 -0
- package/dist/src/ChainAccountsService.js +75 -0
- package/dist/src/Config.js +7 -0
- package/dist/src/blocks/BlockDateResolver.js +125 -0
- package/dist/src/bridges/BridgeFactory.js +19 -0
- package/dist/src/bridges/hop/HopAddresses.js +520 -0
- package/dist/src/bridges/hop/HopBridge.js +327 -0
- package/dist/src/bridges/hop/contracts/gen.act.js +43 -0
- package/dist/src/bridges/hop/contracts/polygon/Dai_l2AmmWrapperContract.js +52 -0
- package/dist/src/bridges/hop/contracts/polygon/Dai_l2BridgeContract.js +319 -0
- package/dist/src/bridges/hop/contracts/polygon/Dai_l2SaddleSwapContract.js +178 -0
- package/dist/src/bridges/hop/contracts/polygon/Eth_l2AmmWrapperContract.js +52 -0
- package/dist/src/bridges/hop/contracts/polygon/Eth_l2BridgeContract.js +319 -0
- package/dist/src/bridges/hop/contracts/polygon/Eth_l2SaddleSwapContract.js +178 -0
- package/dist/src/bridges/hop/contracts/polygon/Matic_l2AmmWrapperContract.js +52 -0
- package/dist/src/bridges/hop/contracts/polygon/Matic_l2BridgeContract.js +319 -0
- package/dist/src/bridges/hop/contracts/polygon/Matic_l2SaddleSwapContract.js +178 -0
- package/dist/src/bridges/hop/contracts/polygon/Usdc_l2AmmWrapperContract.js +52 -0
- package/dist/src/bridges/hop/contracts/polygon/Usdc_l2BridgeContract.js +319 -0
- package/dist/src/bridges/hop/contracts/polygon/Usdc_l2SaddleSwapContract.js +178 -0
- package/dist/src/bridges/hop/contracts/polygon/Usdt_l2AmmWrapperContract.js +52 -0
- package/dist/src/bridges/hop/contracts/polygon/Usdt_l2BridgeContract.js +319 -0
- package/dist/src/bridges/hop/contracts/polygon/Usdt_l2SaddleSwapContract.js +178 -0
- package/dist/src/bridges/hop/contracts/polygon/Wbtc_l2AmmWrapperContract.js +52 -0
- package/dist/src/bridges/hop/contracts/polygon/Wbtc_l2BridgeContract.js +319 -0
- package/dist/src/bridges/hop/contracts/polygon/Wbtc_l2SaddleSwapContract.js +178 -0
- package/dist/src/bridges/models/IBridge.js +2 -0
- package/dist/src/bridges/wormhole/contracts/WormholeBridgeContract.js +15 -0
- package/dist/src/chains/PlatformFactory.js +42 -0
- package/dist/src/chains/arbitrum/ArbTokenProvider.js +40 -0
- package/dist/src/chains/arbitrum/ArbWeb3Client.js +39 -0
- package/dist/src/chains/arbitrum/Arbiscan.js +27 -0
- package/dist/src/chains/boba/BobaWeb3Client.js +47 -0
- package/dist/src/chains/boba/Bobascan.js +28 -0
- package/dist/src/chains/xdai/XDaiWeb3Client.js +87 -0
- package/dist/src/chains/xdai/XDaiscan.js +27 -0
- package/dist/src/chains/xdai/tokens/WXDaiTokenContract.js +15 -0
- package/dist/src/clients/BscWeb3Client.js +38 -0
- package/dist/src/clients/ClientEventsStream.js +34 -0
- package/dist/src/clients/ClientPool.js +560 -0
- package/dist/src/clients/ClientPoolStats.js +52 -0
- package/dist/src/clients/EthWeb3Client.js +35 -0
- package/dist/src/clients/HardhatWeb3Client.js +56 -0
- package/dist/src/clients/PolyWeb3Client.js +77 -0
- package/dist/src/clients/Web3Client.js +186 -0
- package/dist/src/clients/Web3ClientFactory.js +32 -0
- package/dist/src/clients/interfaces/IWeb3Client.js +2 -0
- package/dist/src/clients/interfaces/IWeb3ClientStatus.js +2 -0
- package/dist/src/clients/interfaces/IWeb3EndpointOptions.js +2 -0
- package/dist/src/clients/model/ClientStatus.js +9 -0
- package/dist/src/clients/model/PromiEventWrap.js +52 -0
- package/dist/src/clients/model/SubscriptionWrap.js +42 -0
- package/dist/src/clients/utils/ClientEndpoints.js +27 -0
- package/dist/src/clients/utils/ClientErrorUtil.js +30 -0
- package/dist/src/clients/utils/TxFactory.js +14 -0
- package/dist/src/contracts/BscContract.js +30 -0
- package/dist/src/contracts/Contract.js +90 -0
- package/dist/src/contracts/ContractBase.js +139 -0
- package/dist/src/contracts/ContractFactory.js +17 -0
- package/dist/src/contracts/ContractProvider.js +40 -0
- package/dist/src/contracts/ContractReader.js +76 -0
- package/dist/src/contracts/ContractStream.js +20 -0
- package/dist/src/contracts/ContractWriter.js +62 -0
- package/dist/src/contracts/EthContract.js +31 -0
- package/dist/src/contracts/TxContract.js +37 -0
- package/dist/src/contracts/common/ERC20.js +14 -0
- package/dist/src/contracts/common/ERC20Polygon.js +14 -0
- package/dist/src/contracts/common/PoolPair.js +23 -0
- package/dist/src/contracts/utils/AbiDeserializer.js +89 -0
- package/dist/src/contracts/utils/ConvertUtils.js +21 -0
- package/dist/src/contracts/utils/InputDataUtils.js +87 -0
- package/dist/src/contracts/utils/TypeUtils.js +24 -0
- package/dist/src/defi/OneInch/OneInchRouter.js +14 -0
- package/dist/src/env/BigIntSerializer.js +19 -0
- package/dist/src/gen/Ast.js +12 -0
- package/dist/src/gen/ContractTemplate.js +27 -0
- package/dist/src/gen/Generator.js +180 -0
- package/dist/src/gen/GeneratorFromAbi.js +361 -0
- package/dist/src/handlers/TokenHandler.js +69 -0
- package/dist/src/indexer/BlocksTxIndexer.js +52 -0
- package/dist/src/indexer/PendingTxIndexer.js +96 -0
- package/dist/src/indexer/handlers/BlocksWalker.js +306 -0
- package/dist/src/indexer/handlers/TxQueueLoader.js +117 -0
- package/dist/src/json/JsonArrayStore.js +296 -0
- package/dist/src/json/JsonObjectStore.js +214 -0
- package/dist/src/json/JsonStore.spec.js +83 -0
- package/dist/src/loggers/ILogger.js +2 -0
- package/dist/src/loggers/LoggerService.js +34 -0
- package/dist/src/loggers/TxLoggerService.js +122 -0
- package/dist/src/models/IContractDetails.js +2 -0
- package/dist/src/models/IToken.js +2 -0
- package/dist/src/models/ITokenGlob.js +6 -0
- package/dist/src/models/ITransactionDetails.js +2 -0
- package/dist/src/models/TAddress.js +2 -0
- package/dist/src/models/TBufferLike.js +2 -0
- package/dist/src/models/THex.js +2 -0
- package/dist/src/models/TPlatform.js +2 -0
- package/dist/src/models/TResult.js +2 -0
- package/dist/src/ns/NameService.js +19 -0
- package/dist/src/ns/providers/EnsProvider.js +41 -0
- package/dist/src/ns/providers/INsProvider.js +2 -0
- package/dist/src/ns/providers/UDProvider.js +39 -0
- package/dist/src/ns/utils/$ns.js +17 -0
- package/dist/src/structs/PackedRanges.js +186 -0
- package/dist/src/structs/PackedRanges.spec.js +30 -0
- package/dist/src/tokens/TokenExchangeService.js +110 -0
- package/dist/src/tokens/TokenExchanges/AmmBase/AmmUtilts.js +17 -0
- package/dist/src/tokens/TokenExchanges/AmmBase/V2/AmmFactoryV2Contract.js +15 -0
- package/dist/src/tokens/TokenExchanges/AmmBase/V2/AmmMasterChefV2Contract.js +15 -0
- package/dist/src/tokens/TokenExchanges/AmmBase/V2/AmmPairV2Contract.js +16 -0
- package/dist/src/tokens/TokenExchanges/AmmBase/V2/AmmPairV2Service.js +144 -0
- package/dist/src/tokens/TokenExchanges/AmmBase/V2/AmmRouterV2Contract.js +15 -0
- package/dist/src/tokens/TokenExchanges/AmmBase/V2/AmmVaultV2Contract.js +15 -0
- package/dist/src/tokens/TokenExchanges/AmmBase/V3/AmmPairV3Contract.js +22 -0
- package/dist/src/tokens/TokenExchanges/AmmV2ExchangeBase.js +194 -0
- package/dist/src/tokens/TokenExchanges/OneInchExchange.js +92 -0
- package/dist/src/tokens/TokenExchanges/PancakeswapExchange.js +28 -0
- package/dist/src/tokens/TokenExchanges/SushiswapPolygonExchange.js +28 -0
- package/dist/src/tokens/TokenExchanges/UniswapExchange.js +28 -0
- package/dist/src/tokens/TokenOracles/AmmPriceV2Oracle.js +319 -0
- package/dist/src/tokens/TokenOracles/TokenPriceStore.js +108 -0
- package/dist/src/tokens/TokenPriceService.js +196 -0
- package/dist/src/tokens/TokenPriceServiceProvider.js +31 -0
- package/dist/src/tokens/TokenProviders/ATokenProvider.js +38 -0
- package/dist/src/tokens/TokenProviders/ITokenProvider.js +2 -0
- package/dist/src/tokens/TokenProviders/TPChain.js +35 -0
- package/dist/src/tokens/TokenProviders/TPCoinmarketcap.js +63 -0
- package/dist/src/tokens/TokenProviders/TPOneInch.js +65 -0
- package/dist/src/tokens/TokenProviders/TPSushiswap.js +89 -0
- package/dist/src/tokens/TokenProviders/TPUniswap.js +84 -0
- package/dist/src/tokens/TokenService.js +115 -0
- package/dist/src/tokens/TokenSwapService.js +37 -0
- package/dist/src/tokens/TokenTransferService.js +189 -0
- package/dist/src/tokens/TokensService.js +236 -0
- package/dist/src/tokens/TokensServiceBsc.js +18 -0
- package/dist/src/tokens/TokensServiceEth.js +15 -0
- package/dist/src/tokens/TokensServiceFactory.js +29 -0
- package/dist/src/tokens/TokensServicePolygon.js +18 -0
- package/dist/src/tokens/TokensServiceXDai.js +24 -0
- package/dist/src/tokens/defi/ISwapService.js +2 -0
- package/dist/src/tokens/defi/paraswap/Paraswap.js +135 -0
- package/dist/src/tokens/erc20/eth/WETH.js +14 -0
- package/dist/src/tokens/utils/TokenUtils.js +66 -0
- package/dist/src/txs/ITxConfig.js +2 -0
- package/dist/src/txs/TxDataBuilder.js +159 -0
- package/dist/src/txs/TxLogger.js +119 -0
- package/dist/src/txs/TxProvider.js +73 -0
- package/dist/src/txs/TxService.js +19 -0
- package/dist/src/txs/TxWriter.js +287 -0
- package/dist/src/txs/conditional/GasWatcherLogger.js +61 -0
- package/dist/src/txs/conditional/GasWatcherService.js +103 -0
- package/dist/src/txs/conditional/GasWatcherStore.js +25 -0
- package/dist/src/txs/conditional/GasWatcherTx.js +126 -0
- package/dist/src/txs/receipt/ITxLogItem.js +2 -0
- package/dist/src/txs/receipt/TxLogParser.js +27 -0
- package/dist/src/txs/receipt/TxLogsTransfer.js +50 -0
- package/dist/src/txs/receipt/TxTopicInMemoryProvider.js +41 -0
- package/dist/src/txs/receipt/TxTopicProvider.js +25 -0
- package/dist/src/utils/$abiParser.js +159 -0
- package/dist/src/utils/$abiType.js +77 -0
- package/dist/src/utils/$abiUtils.js +43 -0
- package/dist/src/utils/$address.js +41 -0
- package/dist/src/utils/$array.js +60 -0
- package/dist/src/utils/$bigint.js +130 -0
- package/dist/src/utils/$block.js +10 -0
- package/dist/src/utils/$class.js +13 -0
- package/dist/src/utils/$config.js +18 -0
- package/dist/src/utils/$contract.js +67 -0
- package/dist/src/utils/$csv.js +79 -0
- package/dist/src/utils/$date.js +496 -0
- package/dist/src/utils/$fn.js +117 -0
- package/dist/src/utils/$is.js +40 -0
- package/dist/src/utils/$logger.js +15 -0
- package/dist/src/utils/$number.js +95 -0
- package/dist/src/utils/$object.js +82 -0
- package/dist/src/utils/$path.js +33 -0
- package/dist/src/utils/$promise.js +13 -0
- package/dist/src/utils/$require.js +127 -0
- package/dist/src/utils/$sign.js +35 -0
- package/dist/src/utils/$signSerializer.js +264 -0
- package/dist/src/utils/$wallet.js +13 -0
- package/dist/src/utils/types.js +2 -0
- package/dist/src/wallets/Wallet.js +26 -0
- package/dist/src/wallets/WalletBsc.js +17 -0
- package/dist/src/wallets/WalletService.js +35 -0
- package/dist/src/www/utils/BlockChainExplorerFormatter.js +15 -0
- package/hardhat.config.js +6 -0
- package/package.json +52 -0
- package/readme.md +76 -0
- package/src/BlockchainExplorer/BlockChainExplorerFactory.ts +273 -0
- package/src/BlockchainExplorer/BlockChainExplorerProvider.ts +26 -0
- package/src/BlockchainExplorer/BlockNumberCache.ts +46 -0
- package/src/BlockchainExplorer/Bscscan.ts +23 -0
- package/src/BlockchainExplorer/Etherscan.ts +25 -0
- package/src/BlockchainExplorer/IAbiProvider.ts +5 -0
- package/src/BlockchainExplorer/IBlockChainExplorer.ts +37 -0
- package/src/BlockchainExplorer/Polyscan.ts +23 -0
- package/src/ChainAccounts.ts +72 -0
- package/src/ChainAccountsService.ts +74 -0
- package/src/Config.ts +34 -0
- package/src/blocks/BlockDateResolver.ts +149 -0
- package/src/bridges/BridgeFactory.ts +16 -0
- package/src/bridges/hop/HopAddresses.ts +518 -0
- package/src/bridges/hop/HopBridge.ts +430 -0
- package/src/bridges/hop/contracts/gen.act.ts +50 -0
- package/src/bridges/hop/contracts/polygon/Dai_l2AmmWrapperContract.ts +69 -0
- package/src/bridges/hop/contracts/polygon/Dai_l2BridgeContract.ts +453 -0
- package/src/bridges/hop/contracts/polygon/Dai_l2SaddleSwapContract.ts +264 -0
- package/src/bridges/hop/contracts/polygon/Eth_l2AmmWrapperContract.ts +69 -0
- package/src/bridges/hop/contracts/polygon/Eth_l2BridgeContract.ts +453 -0
- package/src/bridges/hop/contracts/polygon/Eth_l2SaddleSwapContract.ts +264 -0
- package/src/bridges/hop/contracts/polygon/Matic_l2AmmWrapperContract.ts +69 -0
- package/src/bridges/hop/contracts/polygon/Matic_l2BridgeContract.ts +453 -0
- package/src/bridges/hop/contracts/polygon/Matic_l2SaddleSwapContract.ts +264 -0
- package/src/bridges/hop/contracts/polygon/Usdc_l2AmmWrapperContract.ts +69 -0
- package/src/bridges/hop/contracts/polygon/Usdc_l2BridgeContract.ts +453 -0
- package/src/bridges/hop/contracts/polygon/Usdc_l2SaddleSwapContract.ts +264 -0
- package/src/bridges/hop/contracts/polygon/Usdt_l2AmmWrapperContract.ts +69 -0
- package/src/bridges/hop/contracts/polygon/Usdt_l2BridgeContract.ts +453 -0
- package/src/bridges/hop/contracts/polygon/Usdt_l2SaddleSwapContract.ts +264 -0
- package/src/bridges/hop/contracts/polygon/Wbtc_l2AmmWrapperContract.ts +69 -0
- package/src/bridges/hop/contracts/polygon/Wbtc_l2BridgeContract.ts +453 -0
- package/src/bridges/hop/contracts/polygon/Wbtc_l2SaddleSwapContract.ts +264 -0
- package/src/bridges/models/IBridge.ts +43 -0
- package/src/bridges/wormhole/contracts/WormholeBridgeContract.ts +14 -0
- package/src/chains/PlatformFactory.ts +45 -0
- package/src/chains/arbitrum/ArbTokenProvider.ts +39 -0
- package/src/chains/arbitrum/ArbWeb3Client.ts +39 -0
- package/src/chains/arbitrum/Arbiscan.ts +24 -0
- package/src/chains/boba/BobaWeb3Client.ts +49 -0
- package/src/chains/boba/Bobascan.ts +25 -0
- package/src/chains/xdai/XDaiWeb3Client.ts +82 -0
- package/src/chains/xdai/XDaiscan.ts +24 -0
- package/src/chains/xdai/tokens/WXDaiTokenContract.json +279 -0
- package/src/chains/xdai/tokens/WXDaiTokenContract.ts +14 -0
- package/src/clients/BscWeb3Client.ts +38 -0
- package/src/clients/ClientEventsStream.ts +33 -0
- package/src/clients/ClientPool.ts +673 -0
- package/src/clients/ClientPoolStats.ts +64 -0
- package/src/clients/EthWeb3Client.ts +36 -0
- package/src/clients/HardhatWeb3Client.ts +60 -0
- package/src/clients/PolyWeb3Client.ts +91 -0
- package/src/clients/Web3Client.ts +228 -0
- package/src/clients/Web3ClientFactory.ts +28 -0
- package/src/clients/interfaces/IWeb3Client.ts +14 -0
- package/src/clients/interfaces/IWeb3ClientStatus.ts +23 -0
- package/src/clients/interfaces/IWeb3EndpointOptions.ts +9 -0
- package/src/clients/model/ClientStatus.ts +5 -0
- package/src/clients/model/PromiEventWrap.ts +61 -0
- package/src/clients/model/SubscriptionWrap.ts +53 -0
- package/src/clients/utils/ClientEndpoints.ts +26 -0
- package/src/clients/utils/ClientErrorUtil.ts +26 -0
- package/src/clients/utils/TxFactory.ts +17 -0
- package/src/contracts/BscContract.ts +28 -0
- package/src/contracts/Contract.ts +126 -0
- package/src/contracts/ContractBase.ts +158 -0
- package/src/contracts/ContractFactory.ts +19 -0
- package/src/contracts/ContractProvider.ts +55 -0
- package/src/contracts/ContractReader.ts +87 -0
- package/src/contracts/ContractStream.ts +18 -0
- package/src/contracts/ContractWriter.ts +97 -0
- package/src/contracts/EthContract.ts +29 -0
- package/src/contracts/TxContract.ts +43 -0
- package/src/contracts/common/ERC20.ts +13 -0
- package/src/contracts/common/ERC20Polygon.ts +13 -0
- package/src/contracts/common/PoolPair.ts +22 -0
- package/src/contracts/utils/AbiDeserializer.ts +98 -0
- package/src/contracts/utils/ConvertUtils.ts +16 -0
- package/src/contracts/utils/InputDataUtils.ts +93 -0
- package/src/contracts/utils/TypeUtils.ts +21 -0
- package/src/defi/OneInch/OneInchRouter.ts +13 -0
- package/src/env/BigIntSerializer.ts +18 -0
- package/src/gen/Ast.ts +12 -0
- package/src/gen/ContractTemplate.ts +36 -0
- package/src/gen/Generator.ts +227 -0
- package/src/gen/GeneratorFromAbi.ts +402 -0
- package/src/handlers/TokenHandler.ts +78 -0
- package/src/indexer/BlocksTxIndexer.ts +69 -0
- package/src/indexer/PendingTxIndexer.ts +124 -0
- package/src/indexer/handlers/BlocksWalker.ts +390 -0
- package/src/indexer/handlers/TxQueueLoader.ts +143 -0
- package/src/json/JsonArrayStore.ts +310 -0
- package/src/json/JsonObjectStore.ts +239 -0
- package/src/json/JsonStore.spec.ts +98 -0
- package/src/loggers/ILogger.ts +3 -0
- package/src/loggers/LoggerService.ts +39 -0
- package/src/loggers/TxLoggerService.ts +146 -0
- package/src/models/IContractDetails.ts +8 -0
- package/src/models/IToken.ts +11 -0
- package/src/models/ITokenGlob.ts +14 -0
- package/src/models/ITransactionDetails.ts +11 -0
- package/src/models/TAddress.ts +1 -0
- package/src/models/TBufferLike.ts +2 -0
- package/src/models/THex.ts +1 -0
- package/src/models/TPlatform.ts +1 -0
- package/src/models/TResult.ts +6 -0
- package/src/ns/NameService.ts +21 -0
- package/src/ns/providers/EnsProvider.ts +45 -0
- package/src/ns/providers/INsProvider.ts +6 -0
- package/src/ns/providers/UDProvider.ts +49 -0
- package/src/ns/utils/$ns.ts +15 -0
- package/src/structs/PackedRanges.spec.ts +38 -0
- package/src/structs/PackedRanges.ts +207 -0
- package/src/tokens/TokenExchangeService.ts +126 -0
- package/src/tokens/TokenExchanges/AmmBase/AmmUtilts.ts +16 -0
- package/src/tokens/TokenExchanges/AmmBase/V2/AmmFactoryV2Contract.ts +15 -0
- package/src/tokens/TokenExchanges/AmmBase/V2/AmmMasterChefV2Contract.ts +15 -0
- package/src/tokens/TokenExchanges/AmmBase/V2/AmmPairV2Contract.ts +17 -0
- package/src/tokens/TokenExchanges/AmmBase/V2/AmmPairV2Service.ts +208 -0
- package/src/tokens/TokenExchanges/AmmBase/V2/AmmRouterV2Contract.ts +15 -0
- package/src/tokens/TokenExchanges/AmmBase/V2/AmmVaultV2Contract.ts +15 -0
- package/src/tokens/TokenExchanges/AmmBase/V3/AmmPairV3Contract.ts +24 -0
- package/src/tokens/TokenExchanges/AmmV2ExchangeBase.ts +242 -0
- package/src/tokens/TokenExchanges/OneInchExchange.ts +111 -0
- package/src/tokens/TokenExchanges/PancakeswapExchange.ts +30 -0
- package/src/tokens/TokenExchanges/SushiswapPolygonExchange.ts +30 -0
- package/src/tokens/TokenExchanges/UniswapExchange.ts +31 -0
- package/src/tokens/TokenOracles/AmmPriceV2Oracle.ts +440 -0
- package/src/tokens/TokenOracles/TokenPriceStore.ts +129 -0
- package/src/tokens/TokenPriceService.ts +276 -0
- package/src/tokens/TokenPriceServiceProvider.ts +36 -0
- package/src/tokens/TokenProviders/ATokenProvider.ts +42 -0
- package/src/tokens/TokenProviders/ITokenProvider.ts +9 -0
- package/src/tokens/TokenProviders/TPChain.ts +41 -0
- package/src/tokens/TokenProviders/TPCoinmarketcap.ts +82 -0
- package/src/tokens/TokenProviders/TPOneInch.ts +71 -0
- package/src/tokens/TokenProviders/TPSushiswap.ts +96 -0
- package/src/tokens/TokenProviders/TPUniswap.ts +85 -0
- package/src/tokens/TokenService.ts +128 -0
- package/src/tokens/TokenSwapService.ts +47 -0
- package/src/tokens/TokenTransferService.ts +216 -0
- package/src/tokens/TokensService.ts +252 -0
- package/src/tokens/TokensServiceBsc.ts +17 -0
- package/src/tokens/TokensServiceEth.ts +9 -0
- package/src/tokens/TokensServiceFactory.ts +24 -0
- package/src/tokens/TokensServicePolygon.ts +17 -0
- package/src/tokens/TokensServiceXDai.ts +26 -0
- package/src/tokens/defi/ISwapService.ts +12 -0
- package/src/tokens/defi/paraswap/Paraswap.ts +244 -0
- package/src/tokens/erc20/eth/WETH.ts +13 -0
- package/src/tokens/utils/TokenUtils.ts +63 -0
- package/src/txs/ITxConfig.ts +27 -0
- package/src/txs/TxDataBuilder.ts +207 -0
- package/src/txs/TxLogger.ts +121 -0
- package/src/txs/TxProvider.ts +68 -0
- package/src/txs/TxService.ts +19 -0
- package/src/txs/TxWriter.ts +370 -0
- package/src/txs/conditional/GasWatcherLogger.ts +57 -0
- package/src/txs/conditional/GasWatcherService.ts +117 -0
- package/src/txs/conditional/GasWatcherStore.ts +40 -0
- package/src/txs/conditional/GasWatcherTx.ts +143 -0
- package/src/txs/receipt/ITxLogItem.ts +25 -0
- package/src/txs/receipt/TxLogParser.ts +29 -0
- package/src/txs/receipt/TxLogsTransfer.ts +61 -0
- package/src/txs/receipt/TxTopicInMemoryProvider.ts +45 -0
- package/src/txs/receipt/TxTopicProvider.ts +29 -0
- package/src/utils/$abiParser.ts +179 -0
- package/src/utils/$abiType.ts +85 -0
- package/src/utils/$abiUtils.ts +38 -0
- package/src/utils/$address.ts +37 -0
- package/src/utils/$array.ts +57 -0
- package/src/utils/$bigint.ts +127 -0
- package/src/utils/$block.ts +7 -0
- package/src/utils/$class.ts +8 -0
- package/src/utils/$config.ts +17 -0
- package/src/utils/$contract.ts +67 -0
- package/src/utils/$csv.ts +54 -0
- package/src/utils/$date.ts +473 -0
- package/src/utils/$fn.ts +134 -0
- package/src/utils/$is.ts +37 -0
- package/src/utils/$logger.ts +10 -0
- package/src/utils/$number.ts +89 -0
- package/src/utils/$object.ts +95 -0
- package/src/utils/$path.ts +32 -0
- package/src/utils/$promise.ts +7 -0
- package/src/utils/$require.ts +118 -0
- package/src/utils/$sign.ts +36 -0
- package/src/utils/$signSerializer.ts +339 -0
- package/src/utils/$wallet.ts +10 -0
- package/src/utils/types.ts +29 -0
- package/src/wallets/Wallet.ts +33 -0
- package/src/wallets/WalletBsc.ts +13 -0
- package/src/wallets/WalletService.ts +43 -0
- package/src/www/utils/BlockChainExplorerFormatter.ts +13 -0
- package/test/ChainAccount.spec.ts +9 -0
- package/test/client.spec.ts +59 -0
- package/test/fixtures/DaiTokenContract.ts +13 -0
- package/test/fixtures/receipts/swap.json +94 -0
- package/test/generate/class.spec.ts +27 -0
- package/test/hardhat/TestNode.ts +61 -0
- package/test/ns.spec.ts +30 -0
- package/test/receipt.spec.ts +27 -0
- package/test/utils/abi-parser.spec.ts +117 -0
- package/test/utils/bigint.spec.ts +40 -0
- package/test/utils/date.spec.ts +8 -0
- package/test/utils/fn.spec.ts +39 -0
- package/test/utils/number.spec.ts +41 -0
- package/test/utils/sign.spec.ts +22 -0
- package/tsconfig-build.json +24 -0
- package/tsconfig-src.json +36 -0
- package/tsconfig.json +27 -0
- package/typings/globals/assertion/index.d.ts +159 -0
- package/typings/globals/assertion/typings.json +10 -0
- package/typings/globals/atma-utest/index.d.ts +53 -0
- package/typings/globals/atma-utest/typings.json +10 -0
- package/typings/globals/axios/index.d.ts +6 -0
- package/typings/globals/mask/index.d.ts +6 -0
- package/typings/globals/mask/typings.json +9 -0
- package/typings/index.d.ts +6 -0
- package/typings.json +6 -0
|
@@ -0,0 +1,453 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AUTO-Generated Class: 2022-01-08 23:50
|
|
3
|
+
* Implementation: https://polygonscan.com/address/0x6c9a1ACF73bd85463A46B0AFc076FBdf602b690B#code
|
|
4
|
+
*/
|
|
5
|
+
import di from 'a-di';
|
|
6
|
+
import { TAddress } from '@dequanto/models/TAddress';
|
|
7
|
+
import { ClientEventsStream } from '@dequanto/clients/ClientEventsStream';
|
|
8
|
+
import { ContractBase } from '@dequanto/contracts/ContractBase';
|
|
9
|
+
import { AbiItem } from 'web3-utils';
|
|
10
|
+
import { TransactionReceipt } from 'web3-core';
|
|
11
|
+
import { EventData } from 'web3-eth-contract';
|
|
12
|
+
import { TxWriter } from '@dequanto/txs/TxWriter';
|
|
13
|
+
import { Web3Client } from '@dequanto/clients/Web3Client';
|
|
14
|
+
import { IBlockChainExplorer } from '@dequanto/BlockchainExplorer/IBlockChainExplorer';
|
|
15
|
+
|
|
16
|
+
import { Polyscan } from '@dequanto/BlockchainExplorer/Polyscan'
|
|
17
|
+
import { PolyWeb3Client } from '@dequanto/clients/PolyWeb3Client'
|
|
18
|
+
export class Usdt_l2BridgeContract extends ContractBase {
|
|
19
|
+
constructor(
|
|
20
|
+
public address: TAddress = '0x6c9a1ACF73bd85463A46B0AFc076FBdf602b690B',
|
|
21
|
+
public client: Web3Client = di.resolve(PolyWeb3Client),
|
|
22
|
+
public explorer: IBlockChainExplorer = di.resolve(Polyscan)
|
|
23
|
+
) {
|
|
24
|
+
super(address, client, explorer)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// 0xc97d172e
|
|
28
|
+
async activeChainIds (input0: bigint): Promise<boolean> {
|
|
29
|
+
return this.$read('function activeChainIds(uint256) returns bool', input0);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// 0xf8398fa4
|
|
33
|
+
async addActiveChainIds (eoa: {address: TAddress, key: string, value?: string | number | bigint }, chainIds: bigint[]): Promise<TxWriter> {
|
|
34
|
+
return this.$write(this.$getAbiItem('function', 'addActiveChainIds'), eoa, chainIds);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// 0x5325937f
|
|
38
|
+
async addBonder (eoa: {address: TAddress, key: string, value?: string | number | bigint }, bonder: TAddress): Promise<TxWriter> {
|
|
39
|
+
return this.$write(this.$getAbiItem('function', 'addBonder'), eoa, bonder);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// 0xe9cdfe51
|
|
43
|
+
async ammWrapper (): Promise<TAddress> {
|
|
44
|
+
return this.$read('function ammWrapper() returns address');
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// 0x23c452cd
|
|
48
|
+
async bondWithdrawal (eoa: {address: TAddress, key: string, value?: string | number | bigint }, recipient: TAddress, amount: bigint, transferNonce: Buffer | string, bonderFee: bigint): Promise<TxWriter> {
|
|
49
|
+
return this.$write(this.$getAbiItem('function', 'bondWithdrawal'), eoa, recipient, amount, transferNonce, bonderFee);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// 0x3d12a85a
|
|
53
|
+
async bondWithdrawalAndDistribute (eoa: {address: TAddress, key: string, value?: string | number | bigint }, recipient: TAddress, amount: bigint, transferNonce: Buffer | string, bonderFee: bigint, amountOutMin: bigint, deadline: bigint): Promise<TxWriter> {
|
|
54
|
+
return this.$write(this.$getAbiItem('function', 'bondWithdrawalAndDistribute'), eoa, recipient, amount, transferNonce, bonderFee, amountOutMin, deadline);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// 0x32b949a2
|
|
58
|
+
async commitTransfers (eoa: {address: TAddress, key: string, value?: string | number | bigint }, destinationChainId: bigint): Promise<TxWriter> {
|
|
59
|
+
return this.$write(this.$getAbiItem('function', 'commitTransfers'), eoa, destinationChainId);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// 0xcc29a306
|
|
63
|
+
async distribute (eoa: {address: TAddress, key: string, value?: string | number | bigint }, recipient: TAddress, amount: bigint, amountOutMin: bigint, deadline: bigint, relayer: TAddress, relayerFee: bigint): Promise<TxWriter> {
|
|
64
|
+
return this.$write(this.$getAbiItem('function', 'distribute'), eoa, recipient, amount, amountOutMin, deadline, relayer, relayerFee);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// 0x302830ab
|
|
68
|
+
async getBondedWithdrawalAmount (bonder: TAddress, transferId: Buffer | string): Promise<bigint> {
|
|
69
|
+
return this.$read('function getBondedWithdrawalAmount(address, bytes32) returns uint256', bonder, transferId);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// 0x3408e470
|
|
73
|
+
async getChainId (): Promise<bigint> {
|
|
74
|
+
return this.$read('function getChainId() returns uint256');
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// 0x57344e6f
|
|
78
|
+
async getCredit (bonder: TAddress): Promise<bigint> {
|
|
79
|
+
return this.$read('function getCredit(address) returns uint256', bonder);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// 0xffa9286c
|
|
83
|
+
async getDebitAndAdditionalDebit (bonder: TAddress): Promise<bigint> {
|
|
84
|
+
return this.$read('function getDebitAndAdditionalDebit(address) returns uint256', bonder);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// 0xd5ef7551
|
|
88
|
+
async getIsBonder (maybeBonder: TAddress): Promise<boolean> {
|
|
89
|
+
return this.$read('function getIsBonder(address) returns bool', maybeBonder);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// 0x051e7216
|
|
93
|
+
async getNextTransferNonce (): Promise<Buffer | string> {
|
|
94
|
+
return this.$read('function getNextTransferNonce() returns bytes32');
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// 0x13948c76
|
|
98
|
+
async getRawDebit (bonder: TAddress): Promise<bigint> {
|
|
99
|
+
return this.$read('function getRawDebit(address) returns uint256', bonder);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// 0xaf215f94
|
|
103
|
+
async getTransferId (chainId: bigint, recipient: TAddress, amount: bigint, transferNonce: Buffer | string, bonderFee: bigint, amountOutMin: bigint, deadline: bigint): Promise<Buffer | string> {
|
|
104
|
+
return this.$read('function getTransferId(uint256, address, uint256, bytes32, uint256, uint256, uint256) returns bytes32', chainId, recipient, amount, transferNonce, bonderFee, amountOutMin, deadline);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// 0xce803b4f
|
|
108
|
+
async getTransferRoot (rootHash: Buffer | string, totalAmount: bigint): Promise<{ total: bigint, amountWithdrawn: bigint, createdAt: bigint }> {
|
|
109
|
+
return this.$read('function getTransferRoot(bytes32, uint256) returns [uint256,uint256,uint256]', rootHash, totalAmount);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// 0x960a7afa
|
|
113
|
+
async getTransferRootId (rootHash: Buffer | string, totalAmount: bigint): Promise<Buffer | string> {
|
|
114
|
+
return this.$read('function getTransferRootId(bytes32, uint256) returns bytes32', rootHash, totalAmount);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// 0xfc6e3b3b
|
|
118
|
+
async hToken (): Promise<TAddress> {
|
|
119
|
+
return this.$read('function hToken() returns address');
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// 0x3a7af631
|
|
123
|
+
async isTransferIdSpent (transferId: Buffer | string): Promise<boolean> {
|
|
124
|
+
return this.$read('function isTransferIdSpent(bytes32) returns bool', transferId);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// 0x5ab2a558
|
|
128
|
+
async l1BridgeAddress (): Promise<TAddress> {
|
|
129
|
+
return this.$read('function l1BridgeAddress() returns address');
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// 0xd2442783
|
|
133
|
+
async l1BridgeCaller (): Promise<TAddress> {
|
|
134
|
+
return this.$read('function l1BridgeCaller() returns address');
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// 0x3ef23f7f
|
|
138
|
+
async l1Governance (): Promise<TAddress> {
|
|
139
|
+
return this.$read('function l1Governance() returns address');
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// 0xd4e54c47
|
|
143
|
+
async lastCommitTimeForChainId (input0: bigint): Promise<bigint> {
|
|
144
|
+
return this.$read('function lastCommitTimeForChainId(uint256) returns uint256', input0);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// 0xbed93c84
|
|
148
|
+
async maxPendingTransfers (): Promise<bigint> {
|
|
149
|
+
return this.$read('function maxPendingTransfers() returns uint256');
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// 0xce2d280e
|
|
153
|
+
async messengerProxy (): Promise<TAddress> {
|
|
154
|
+
return this.$read('function messengerProxy() returns address');
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// 0x35e2c4af
|
|
158
|
+
async minBonderBps (): Promise<bigint> {
|
|
159
|
+
return this.$read('function minBonderBps() returns uint256');
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// 0xc3035261
|
|
163
|
+
async minBonderFeeAbsolute (): Promise<bigint> {
|
|
164
|
+
return this.$read('function minBonderFeeAbsolute() returns uint256');
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// 0x8f658198
|
|
168
|
+
async minimumForceCommitDelay (): Promise<bigint> {
|
|
169
|
+
return this.$read('function minimumForceCommitDelay() returns uint256');
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// 0x0f5e09e7
|
|
173
|
+
async pendingAmountForChainId (input0: bigint): Promise<bigint> {
|
|
174
|
+
return this.$read('function pendingAmountForChainId(uint256) returns uint256', input0);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// 0x98445caf
|
|
178
|
+
async pendingTransferIdsForChainId (input0: bigint, input1: bigint): Promise<Buffer | string> {
|
|
179
|
+
return this.$read('function pendingTransferIdsForChainId(uint256, uint256) returns bytes32', input0, input1);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// 0x9f600a0b
|
|
183
|
+
async removeActiveChainIds (eoa: {address: TAddress, key: string, value?: string | number | bigint }, chainIds: bigint[]): Promise<TxWriter> {
|
|
184
|
+
return this.$write(this.$getAbiItem('function', 'removeActiveChainIds'), eoa, chainIds);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// 0x04e6c2c0
|
|
188
|
+
async removeBonder (eoa: {address: TAddress, key: string, value?: string | number | bigint }, bonder: TAddress): Promise<TxWriter> {
|
|
189
|
+
return this.$write(this.$getAbiItem('function', 'removeBonder'), eoa, bonder);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// 0xcbd1642e
|
|
193
|
+
async rescueTransferRoot (eoa: {address: TAddress, key: string, value?: string | number | bigint }, rootHash: Buffer | string, originalAmount: bigint, recipient: TAddress): Promise<TxWriter> {
|
|
194
|
+
return this.$write(this.$getAbiItem('function', 'rescueTransferRoot'), eoa, rootHash, originalAmount, recipient);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// 0xa6bd1b33
|
|
198
|
+
async send (eoa: {address: TAddress, key: string, value?: string | number | bigint }, chainId: bigint, recipient: TAddress, amount: bigint, bonderFee: bigint, amountOutMin: bigint, deadline: bigint): Promise<TxWriter> {
|
|
199
|
+
return this.$write(this.$getAbiItem('function', 'send'), eoa, chainId, recipient, amount, bonderFee, amountOutMin, deadline);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
// 0x64c6fdb4
|
|
203
|
+
async setAmmWrapper (eoa: {address: TAddress, key: string, value?: string | number | bigint }, _ammWrapper: TAddress): Promise<TxWriter> {
|
|
204
|
+
return this.$write(this.$getAbiItem('function', 'setAmmWrapper'), eoa, _ammWrapper);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
// 0x8295f258
|
|
208
|
+
async setHopBridgeTokenOwner (eoa: {address: TAddress, key: string, value?: string | number | bigint }, newOwner: TAddress): Promise<TxWriter> {
|
|
209
|
+
return this.$write(this.$getAbiItem('function', 'setHopBridgeTokenOwner'), eoa, newOwner);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// 0xe1825d06
|
|
213
|
+
async setL1BridgeAddress (eoa: {address: TAddress, key: string, value?: string | number | bigint }, _l1BridgeAddress: TAddress): Promise<TxWriter> {
|
|
214
|
+
return this.$write(this.$getAbiItem('function', 'setL1BridgeAddress'), eoa, _l1BridgeAddress);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// 0xaf33ae69
|
|
218
|
+
async setL1BridgeCaller (eoa: {address: TAddress, key: string, value?: string | number | bigint }, _l1BridgeCaller: TAddress): Promise<TxWriter> {
|
|
219
|
+
return this.$write(this.$getAbiItem('function', 'setL1BridgeCaller'), eoa, _l1BridgeCaller);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// 0xe40272d7
|
|
223
|
+
async setL1Governance (eoa: {address: TAddress, key: string, value?: string | number | bigint }, _l1Governance: TAddress): Promise<TxWriter> {
|
|
224
|
+
return this.$write(this.$getAbiItem('function', 'setL1Governance'), eoa, _l1Governance);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// 0x4742bbfb
|
|
228
|
+
async setMaxPendingTransfers (eoa: {address: TAddress, key: string, value?: string | number | bigint }, _maxPendingTransfers: bigint): Promise<TxWriter> {
|
|
229
|
+
return this.$write(this.$getAbiItem('function', 'setMaxPendingTransfers'), eoa, _maxPendingTransfers);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
// 0x3b1c54fa
|
|
233
|
+
async setMessengerProxy (eoa: {address: TAddress, key: string, value?: string | number | bigint }, _messengerProxy: TAddress): Promise<TxWriter> {
|
|
234
|
+
return this.$write(this.$getAbiItem('function', 'setMessengerProxy'), eoa, _messengerProxy);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
// 0xa9fa4ed5
|
|
238
|
+
async setMinimumBonderFeeRequirements (eoa: {address: TAddress, key: string, value?: string | number | bigint }, _minBonderBps: bigint, _minBonderFeeAbsolute: bigint): Promise<TxWriter> {
|
|
239
|
+
return this.$write(this.$getAbiItem('function', 'setMinimumBonderFeeRequirements'), eoa, _minBonderBps, _minBonderFeeAbsolute);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
// 0x9bf43028
|
|
243
|
+
async setMinimumForceCommitDelay (eoa: {address: TAddress, key: string, value?: string | number | bigint }, _minimumForceCommitDelay: bigint): Promise<TxWriter> {
|
|
244
|
+
return this.$write(this.$getAbiItem('function', 'setMinimumForceCommitDelay'), eoa, _minimumForceCommitDelay);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
// 0xfd31c5ba
|
|
248
|
+
async setTransferRoot (eoa: {address: TAddress, key: string, value?: string | number | bigint }, rootHash: Buffer | string, totalAmount: bigint): Promise<TxWriter> {
|
|
249
|
+
return this.$write(this.$getAbiItem('function', 'setTransferRoot'), eoa, rootHash, totalAmount);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
// 0xc7525dd3
|
|
253
|
+
async settleBondedWithdrawal (eoa: {address: TAddress, key: string, value?: string | number | bigint }, bonder: TAddress, transferId: Buffer | string, rootHash: Buffer | string, transferRootTotalAmount: bigint, transferIdTreeIndex: bigint, siblings: Buffer | string[], totalLeaves: bigint): Promise<TxWriter> {
|
|
254
|
+
return this.$write(this.$getAbiItem('function', 'settleBondedWithdrawal'), eoa, bonder, transferId, rootHash, transferRootTotalAmount, transferIdTreeIndex, siblings, totalLeaves);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
// 0xb162717e
|
|
258
|
+
async settleBondedWithdrawals (eoa: {address: TAddress, key: string, value?: string | number | bigint }, bonder: TAddress, transferIds: Buffer | string[], totalAmount: bigint): Promise<TxWriter> {
|
|
259
|
+
return this.$write(this.$getAbiItem('function', 'settleBondedWithdrawals'), eoa, bonder, transferIds, totalAmount);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
// 0xadc9772e
|
|
263
|
+
async stake (eoa: {address: TAddress, key: string, value?: string | number | bigint }, bonder: TAddress, amount: bigint): Promise<TxWriter> {
|
|
264
|
+
return this.$write(this.$getAbiItem('function', 'stake'), eoa, bonder, amount);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
// 0x82c69f9d
|
|
268
|
+
async transferNonceIncrementer (): Promise<bigint> {
|
|
269
|
+
return this.$read('function transferNonceIncrementer() returns uint256');
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
// 0x2e17de78
|
|
273
|
+
async unstake (eoa: {address: TAddress, key: string, value?: string | number | bigint }, amount: bigint): Promise<TxWriter> {
|
|
274
|
+
return this.$write(this.$getAbiItem('function', 'unstake'), eoa, amount);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
// 0x0f7aadb7
|
|
278
|
+
async withdraw (eoa: {address: TAddress, key: string, value?: string | number | bigint }, recipient: TAddress, amount: bigint, transferNonce: Buffer | string, bonderFee: bigint, amountOutMin: bigint, deadline: bigint, rootHash: Buffer | string, transferRootTotalAmount: bigint, transferIdTreeIndex: bigint, siblings: Buffer | string[], totalLeaves: bigint): Promise<TxWriter> {
|
|
279
|
+
return this.$write(this.$getAbiItem('function', 'withdraw'), eoa, recipient, amount, transferNonce, bonderFee, amountOutMin, deadline, rootHash, transferRootTotalAmount, transferIdTreeIndex, siblings, totalLeaves);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
onBonderAdded (fn: (event: EventData, newBonder: TAddress) => void): ClientEventsStream<any> {
|
|
283
|
+
return this.$on('BonderAdded', fn);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
onBonderRemoved (fn: (event: EventData, previousBonder: TAddress) => void): ClientEventsStream<any> {
|
|
287
|
+
return this.$on('BonderRemoved', fn);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
onL1_BridgeMessage (fn: (event: EventData, data: Buffer | string) => void): ClientEventsStream<any> {
|
|
291
|
+
return this.$on('L1_BridgeMessage', fn);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
onMultipleWithdrawalsSettled (fn: (event: EventData, bonder: TAddress, rootHash: Buffer | string, totalBondsSettled: bigint) => void): ClientEventsStream<any> {
|
|
295
|
+
return this.$on('MultipleWithdrawalsSettled', fn);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
onStake (fn: (event: EventData, account: TAddress, amount: bigint) => void): ClientEventsStream<any> {
|
|
299
|
+
return this.$on('Stake', fn);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
onTransferFromL1Completed (fn: (event: EventData, recipient: TAddress, amount: bigint, amountOutMin: bigint, deadline: bigint, relayer: TAddress, relayerFee: bigint) => void): ClientEventsStream<any> {
|
|
303
|
+
return this.$on('TransferFromL1Completed', fn);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
onTransferRootSet (fn: (event: EventData, rootHash: Buffer | string, totalAmount: bigint) => void): ClientEventsStream<any> {
|
|
307
|
+
return this.$on('TransferRootSet', fn);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
onTransferSent (fn: (event: EventData, transferId: Buffer | string, chainId: bigint, recipient: TAddress, amount: bigint, transferNonce: Buffer | string, bonderFee: bigint, index: bigint, amountOutMin: bigint, deadline: bigint) => void): ClientEventsStream<any> {
|
|
311
|
+
return this.$on('TransferSent', fn);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
onTransfersCommitted (fn: (event: EventData, destinationChainId: bigint, rootHash: Buffer | string, totalAmount: bigint, rootCommittedAt: bigint) => void): ClientEventsStream<any> {
|
|
315
|
+
return this.$on('TransfersCommitted', fn);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
onUnstake (fn: (event: EventData, account: TAddress, amount: bigint) => void): ClientEventsStream<any> {
|
|
319
|
+
return this.$on('Unstake', fn);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
onWithdrawalBondSettled (fn: (event: EventData, bonder: TAddress, transferId: Buffer | string, rootHash: Buffer | string) => void): ClientEventsStream<any> {
|
|
323
|
+
return this.$on('WithdrawalBondSettled', fn);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
onWithdrawalBonded (fn: (event: EventData, transferId: Buffer | string, amount: bigint) => void): ClientEventsStream<any> {
|
|
327
|
+
return this.$on('WithdrawalBonded', fn);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
onWithdrew (fn: (event: EventData, transferId: Buffer | string, recipient: TAddress, amount: bigint, transferNonce: Buffer | string) => void): ClientEventsStream<any> {
|
|
331
|
+
return this.$on('Withdrew', fn);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
extractLogsBonderAdded (tx: TransactionReceipt): TLogBonderAdded[] {
|
|
335
|
+
let abi = this.$getAbiItem('event', 'BonderAdded');
|
|
336
|
+
return this.$extractLogs(tx, abi) as any as TLogBonderAdded[];
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
extractLogsBonderRemoved (tx: TransactionReceipt): TLogBonderRemoved[] {
|
|
340
|
+
let abi = this.$getAbiItem('event', 'BonderRemoved');
|
|
341
|
+
return this.$extractLogs(tx, abi) as any as TLogBonderRemoved[];
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
extractLogsL1_BridgeMessage (tx: TransactionReceipt): TLogL1_BridgeMessage[] {
|
|
345
|
+
let abi = this.$getAbiItem('event', 'L1_BridgeMessage');
|
|
346
|
+
return this.$extractLogs(tx, abi) as any as TLogL1_BridgeMessage[];
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
extractLogsMultipleWithdrawalsSettled (tx: TransactionReceipt): TLogMultipleWithdrawalsSettled[] {
|
|
350
|
+
let abi = this.$getAbiItem('event', 'MultipleWithdrawalsSettled');
|
|
351
|
+
return this.$extractLogs(tx, abi) as any as TLogMultipleWithdrawalsSettled[];
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
extractLogsStake (tx: TransactionReceipt): TLogStake[] {
|
|
355
|
+
let abi = this.$getAbiItem('event', 'Stake');
|
|
356
|
+
return this.$extractLogs(tx, abi) as any as TLogStake[];
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
extractLogsTransferFromL1Completed (tx: TransactionReceipt): TLogTransferFromL1Completed[] {
|
|
360
|
+
let abi = this.$getAbiItem('event', 'TransferFromL1Completed');
|
|
361
|
+
return this.$extractLogs(tx, abi) as any as TLogTransferFromL1Completed[];
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
extractLogsTransferRootSet (tx: TransactionReceipt): TLogTransferRootSet[] {
|
|
365
|
+
let abi = this.$getAbiItem('event', 'TransferRootSet');
|
|
366
|
+
return this.$extractLogs(tx, abi) as any as TLogTransferRootSet[];
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
extractLogsTransferSent (tx: TransactionReceipt): TLogTransferSent[] {
|
|
370
|
+
let abi = this.$getAbiItem('event', 'TransferSent');
|
|
371
|
+
return this.$extractLogs(tx, abi) as any as TLogTransferSent[];
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
extractLogsTransfersCommitted (tx: TransactionReceipt): TLogTransfersCommitted[] {
|
|
375
|
+
let abi = this.$getAbiItem('event', 'TransfersCommitted');
|
|
376
|
+
return this.$extractLogs(tx, abi) as any as TLogTransfersCommitted[];
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
extractLogsUnstake (tx: TransactionReceipt): TLogUnstake[] {
|
|
380
|
+
let abi = this.$getAbiItem('event', 'Unstake');
|
|
381
|
+
return this.$extractLogs(tx, abi) as any as TLogUnstake[];
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
extractLogsWithdrawalBondSettled (tx: TransactionReceipt): TLogWithdrawalBondSettled[] {
|
|
385
|
+
let abi = this.$getAbiItem('event', 'WithdrawalBondSettled');
|
|
386
|
+
return this.$extractLogs(tx, abi) as any as TLogWithdrawalBondSettled[];
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
extractLogsWithdrawalBonded (tx: TransactionReceipt): TLogWithdrawalBonded[] {
|
|
390
|
+
let abi = this.$getAbiItem('event', 'WithdrawalBonded');
|
|
391
|
+
return this.$extractLogs(tx, abi) as any as TLogWithdrawalBonded[];
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
extractLogsWithdrew (tx: TransactionReceipt): TLogWithdrew[] {
|
|
395
|
+
let abi = this.$getAbiItem('event', 'Withdrew');
|
|
396
|
+
return this.$extractLogs(tx, abi) as any as TLogWithdrew[];
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
abi = [{"inputs":[{"internalType":"contract I_L2_PolygonMessengerProxy","name":"_messengerProxy","type":"address"},{"internalType":"address","name":"l1Governance","type":"address"},{"internalType":"contract HopBridgeToken","name":"hToken","type":"address"},{"internalType":"address","name":"l1BridgeAddress","type":"address"},{"internalType":"uint256[]","name":"activeChainIds","type":"uint256[]"},{"internalType":"address[]","name":"bonders","type":"address[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newBonder","type":"address"}],"name":"BonderAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousBonder","type":"address"}],"name":"BonderRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"L1_BridgeMessage","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"bonder","type":"address"},{"indexed":true,"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"totalBondsSettled","type":"uint256"}],"name":"MultipleWithdrawalsSettled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Stake","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"deadline","type":"uint256"},{"indexed":true,"internalType":"address","name":"relayer","type":"address"},{"indexed":false,"internalType":"uint256","name":"relayerFee","type":"uint256"}],"name":"TransferFromL1Completed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"TransferRootSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"transferId","type":"bytes32"},{"indexed":true,"internalType":"uint256","name":"chainId","type":"uint256"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"transferNonce","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"bonderFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"TransferSent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"indexed":true,"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"totalAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rootCommittedAt","type":"uint256"}],"name":"TransfersCommitted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Unstake","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"bonder","type":"address"},{"indexed":true,"internalType":"bytes32","name":"transferId","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"rootHash","type":"bytes32"}],"name":"WithdrawalBondSettled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"transferId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawalBonded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"transferId","type":"bytes32"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"transferNonce","type":"bytes32"}],"name":"Withdrew","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"activeChainIds","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"chainIds","type":"uint256[]"}],"name":"addActiveChainIds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"}],"name":"addBonder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ammWrapper","outputs":[{"internalType":"contract L2_AmmWrapper","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32","name":"transferNonce","type":"bytes32"},{"internalType":"uint256","name":"bonderFee","type":"uint256"}],"name":"bondWithdrawal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32","name":"transferNonce","type":"bytes32"},{"internalType":"uint256","name":"bonderFee","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"bondWithdrawalAndDistribute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"destinationChainId","type":"uint256"}],"name":"commitTransfers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"address","name":"relayer","type":"address"},{"internalType":"uint256","name":"relayerFee","type":"uint256"}],"name":"distribute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"},{"internalType":"bytes32","name":"transferId","type":"bytes32"}],"name":"getBondedWithdrawalAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getChainId","outputs":[{"internalType":"uint256","name":"chainId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"}],"name":"getCredit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"}],"name":"getDebitAndAdditionalDebit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"maybeBonder","type":"address"}],"name":"getIsBonder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNextTransferNonce","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"}],"name":"getRawDebit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32","name":"transferNonce","type":"bytes32"},{"internalType":"uint256","name":"bonderFee","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"getTransferId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"getTransferRoot","outputs":[{"components":[{"internalType":"uint256","name":"total","type":"uint256"},{"internalType":"uint256","name":"amountWithdrawn","type":"uint256"},{"internalType":"uint256","name":"createdAt","type":"uint256"}],"internalType":"struct Bridge.TransferRoot","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"getTransferRootId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"hToken","outputs":[{"internalType":"contract HopBridgeToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"transferId","type":"bytes32"}],"name":"isTransferIdSpent","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"l1BridgeAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"l1BridgeCaller","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"l1Governance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"lastCommitTimeForChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPendingTransfers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"messengerProxy","outputs":[{"internalType":"contract I_L2_PolygonMessengerProxy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minBonderBps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minBonderFeeAbsolute","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minimumForceCommitDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"pendingAmountForChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"pendingTransferIdsForChainId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"chainIds","type":"uint256[]"}],"name":"removeActiveChainIds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"}],"name":"removeBonder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"originalAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"rescueTransferRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"bonderFee","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"send","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract L2_AmmWrapper","name":"_ammWrapper","type":"address"}],"name":"setAmmWrapper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"setHopBridgeTokenOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_l1BridgeAddress","type":"address"}],"name":"setL1BridgeAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_l1BridgeCaller","type":"address"}],"name":"setL1BridgeCaller","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_l1Governance","type":"address"}],"name":"setL1Governance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxPendingTransfers","type":"uint256"}],"name":"setMaxPendingTransfers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract I_L2_PolygonMessengerProxy","name":"_messengerProxy","type":"address"}],"name":"setMessengerProxy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minBonderBps","type":"uint256"},{"internalType":"uint256","name":"_minBonderFeeAbsolute","type":"uint256"}],"name":"setMinimumBonderFeeRequirements","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minimumForceCommitDelay","type":"uint256"}],"name":"setMinimumForceCommitDelay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"setTransferRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"},{"internalType":"bytes32","name":"transferId","type":"bytes32"},{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"transferRootTotalAmount","type":"uint256"},{"internalType":"uint256","name":"transferIdTreeIndex","type":"uint256"},{"internalType":"bytes32[]","name":"siblings","type":"bytes32[]"},{"internalType":"uint256","name":"totalLeaves","type":"uint256"}],"name":"settleBondedWithdrawal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"},{"internalType":"bytes32[]","name":"transferIds","type":"bytes32[]"},{"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"settleBondedWithdrawals","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"transferNonceIncrementer","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32","name":"transferNonce","type":"bytes32"},{"internalType":"uint256","name":"bonderFee","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"transferRootTotalAmount","type":"uint256"},{"internalType":"uint256","name":"transferIdTreeIndex","type":"uint256"},{"internalType":"bytes32[]","name":"siblings","type":"bytes32[]"},{"internalType":"uint256","name":"totalLeaves","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
type TLogBonderAdded = {
|
|
403
|
+
contract: TAddress,
|
|
404
|
+
newBonder: TAddress
|
|
405
|
+
}
|
|
406
|
+
type TLogBonderRemoved = {
|
|
407
|
+
contract: TAddress,
|
|
408
|
+
previousBonder: TAddress
|
|
409
|
+
}
|
|
410
|
+
type TLogL1_BridgeMessage = {
|
|
411
|
+
contract: TAddress,
|
|
412
|
+
data: Buffer | string
|
|
413
|
+
}
|
|
414
|
+
type TLogMultipleWithdrawalsSettled = {
|
|
415
|
+
contract: TAddress,
|
|
416
|
+
bonder: TAddress, rootHash: Buffer | string, totalBondsSettled: bigint
|
|
417
|
+
}
|
|
418
|
+
type TLogStake = {
|
|
419
|
+
contract: TAddress,
|
|
420
|
+
account: TAddress, amount: bigint
|
|
421
|
+
}
|
|
422
|
+
type TLogTransferFromL1Completed = {
|
|
423
|
+
contract: TAddress,
|
|
424
|
+
recipient: TAddress, amount: bigint, amountOutMin: bigint, deadline: bigint, relayer: TAddress, relayerFee: bigint
|
|
425
|
+
}
|
|
426
|
+
type TLogTransferRootSet = {
|
|
427
|
+
contract: TAddress,
|
|
428
|
+
rootHash: Buffer | string, totalAmount: bigint
|
|
429
|
+
}
|
|
430
|
+
type TLogTransferSent = {
|
|
431
|
+
contract: TAddress,
|
|
432
|
+
transferId: Buffer | string, chainId: bigint, recipient: TAddress, amount: bigint, transferNonce: Buffer | string, bonderFee: bigint, index: bigint, amountOutMin: bigint, deadline: bigint
|
|
433
|
+
}
|
|
434
|
+
type TLogTransfersCommitted = {
|
|
435
|
+
contract: TAddress,
|
|
436
|
+
destinationChainId: bigint, rootHash: Buffer | string, totalAmount: bigint, rootCommittedAt: bigint
|
|
437
|
+
}
|
|
438
|
+
type TLogUnstake = {
|
|
439
|
+
contract: TAddress,
|
|
440
|
+
account: TAddress, amount: bigint
|
|
441
|
+
}
|
|
442
|
+
type TLogWithdrawalBondSettled = {
|
|
443
|
+
contract: TAddress,
|
|
444
|
+
bonder: TAddress, transferId: Buffer | string, rootHash: Buffer | string
|
|
445
|
+
}
|
|
446
|
+
type TLogWithdrawalBonded = {
|
|
447
|
+
contract: TAddress,
|
|
448
|
+
transferId: Buffer | string, amount: bigint
|
|
449
|
+
}
|
|
450
|
+
type TLogWithdrew = {
|
|
451
|
+
contract: TAddress,
|
|
452
|
+
transferId: Buffer | string, recipient: TAddress, amount: bigint, transferNonce: Buffer | string
|
|
453
|
+
}
|