diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml new file mode 100644 index 0000000..6776a71 --- /dev/null +++ b/.github/workflows/copilot-setup-steps.yml @@ -0,0 +1,42 @@ +name: "Copilot Setup Steps" + +# Automatically run the setup steps when they are changed to allow for easy validation, +# and allow manual testing through the repository's "Actions" tab. +on: + workflow_dispatch: + push: + paths: + - .github/workflows/copilot-setup-steps.yml + pull_request: + paths: + - .github/workflows/copilot-setup-steps.yml + +jobs: + # The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot. + copilot-setup-steps: + runs-on: ubuntu-latest + + permissions: + contents: read + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: "18" + + - name: Install dependencies + run: yarn install --immutable + env: + YARN_NODE_LINKER: node-modules + + # Compile contracts so the Solidity compiler binaries (0.8.22 and 0.8.10) are + # downloaded and cached in ~/.cache/hardhat-nodejs before Copilot starts working. + # Without this step, hardhat cannot compile or test because compiler downloads + # are blocked by the agent's network firewall. + - name: Pre-download Solidity compilers + working-directory: packages/bridge-contracts + run: yarn build diff --git a/packages/bridge-contracts/.env.sample b/packages/bridge-contracts/.env.sample new file mode 100644 index 0000000..125f63c --- /dev/null +++ b/packages/bridge-contracts/.env.sample @@ -0,0 +1,4 @@ +PRIVATE_KEY= +PUBLIC_KEY= + +ETHERSCAN_KEY= diff --git a/packages/bridge-contracts/deploy/deployOFT.ts b/packages/bridge-contracts/deploy/deployOFT.ts new file mode 100644 index 0000000..b58c616 --- /dev/null +++ b/packages/bridge-contracts/deploy/deployOFT.ts @@ -0,0 +1,256 @@ +/*** + * Hardhat-deploy script for GoodDollar OFT (Omnichain Fungible Token) contracts + * + * Deploys (same pattern as MessageBridge: deterministic proxy + implementation + execute initialize): + * 1. GoodDollarOFTMinterBurner - DAO-upgradeable contract that handles minting and burning of GoodDollar tokens for OFT + * 2. GoodDollarOFTAdapter - Upgradeable LayerZero OFT adapter that wraps GoodDollar token for cross-chain transfers + * + * Steps: + * 1. Deploy ERC1967Proxy (deterministic) for GoodDollarOFTMinterBurner, deploy implementation + * then execute initialize(nameService, adapter) once the adapter proxy address is known + * 2. Deploy ERC1967Proxy (deterministic) for GoodDollarOFTAdapter, deploy implementation (constructor: token, lzEndpoint), execute initialize(token, minterBurner, owner, feeRecipient) + * + * Note: GoodDollarOFTMinterBurner.initialize wires the adapter as operator. + */ + +import { DeployFunction } from 'hardhat-deploy/types'; +import { ethers } from 'hardhat'; +import Contracts from '@gooddollar/goodprotocol/releases/deployment.json'; +import { getImplementationAddress } from '@openzeppelin/upgrades-core'; +import { verifyContract } from './utils/verifyContract'; + +// Network-specific LayerZero endpoints +const lzEndpoints: { [key: string]: string } = { + 'development-celo': '0x1a44076050125825900e736c501f859c50fE728c', + 'production-celo': '0x1a44076050125825900e736c501f859c50fE728c', + 'development-xdc': '0xcb566e3B6934Fa77258d68ea18E931fa75e1aaAa', + 'production-xdc': '0xcb566e3B6934Fa77258d68ea18E931fa75e1aaAa', +}; + +const func: DeployFunction = async function (hre) { + const { deployments, network } = hre; + const [root] = await ethers.getSigners(); + + const networkName = network.name; + + console.log('Deployment signer:', { + networkName, + root: root.address, + balance: await ethers.provider.getBalance(root.address).then((_) => _.toString()), + }); + + // Get contract addresses from GoodProtocol deployment + const goodProtocolContracts = Contracts[networkName as keyof typeof Contracts] as any; + if (!goodProtocolContracts) { + throw new Error( + `No GoodProtocol contracts found for network ${networkName}. Please check @gooddollar/goodprotocol/releases/deployment.json`, + ); + } + + // Get token address from GoodProtocol + const tokenAddress = goodProtocolContracts.GoodDollar; + if (!tokenAddress) { + throw new Error( + `Token address not found in GoodProtocol deployment for network ${networkName}. Please deploy SuperGoodDollar or GoodDollar first.`, + ); + } + + // Get NameService for DAO integration from GoodProtocol + const nameServiceAddress = goodProtocolContracts.NameService; + if (!nameServiceAddress) { + throw new Error( + `NameService address not found in GoodProtocol deployment for network ${networkName}. Please deploy NameService first.`, + ); + } + + // Get Controller address directly from GoodProtocol contracts (or via NameService if needed) + let controllerAddress = goodProtocolContracts.Controller; + if (!controllerAddress) { + // Fallback: try to get Controller via NameService interface + const INameService = await ethers.getContractAt( + '@gooddollar/goodprotocol/contracts/Interfaces.sol:INameService', + nameServiceAddress, + ); + controllerAddress = await INameService.getAddress('CONTROLLER'); + if (!controllerAddress || controllerAddress === ethers.constants.AddressZero) { + throw new Error(`Controller address not found in GoodProtocol deployment for network ${networkName}`); + } + } + + // Get LayerZero endpoint + const lzEndpoint = lzEndpoints[networkName] || process.env.LAYERZERO_ENDPOINT; + if (!lzEndpoint) { + throw new Error( + `LayerZero endpoint not found. Please set LAYERZERO_ENDPOINT environment variable or add default for network ${networkName}`, + ); + } + + console.log('Deployment parameters:', { + tokenAddress, + nameServiceAddress, + controllerAddress, + lzEndpoint, + networkName, + }); + + // Get Controller and Avatar addresses (used for OFT adapter owner) + const Controller = await ethers.getContractAt('Controller', controllerAddress); + const avatarAddress = await Controller.avatar(); + + if (!avatarAddress || avatarAddress === ethers.constants.AddressZero) { + throw new Error(`Avatar address is invalid: ${avatarAddress}`); + } + console.log('✅ Verified Avatar address:', avatarAddress); + + let isDevelopment = false; + if (network.name.includes('development')) { + isDevelopment = true; + } + + // CREATE2 salt for implementations: + // hardhat-deploy uses `deterministicDeployment` as the CREATE2 salt. + // We derive it from the contract's compiled bytecode so version changes + // map to different deterministic implementation addresses. + const minterBurnerArtifact = await hre.artifacts.readArtifact('GoodDollarOFTMinterBurner'); + const minterBurnerImplSalt = ethers.utils.keccak256(minterBurnerArtifact.bytecode); + const oftAdapterArtifact = await hre.artifacts.readArtifact('GoodDollarOFTAdapter'); + const oftAdapterImplSalt = ethers.utils.keccak256(oftAdapterArtifact.bytecode); + + // --- GoodDollarOFTMinterBurner (hardhat-deploy: deterministic proxy + implementation + execute initialize) --- + const minterBurnerProxySalt = ethers.utils.keccak256( + ethers.utils.toUtf8Bytes( + isDevelopment ? 'Development-GoodDollarOFTMinterBurnerV1' : 'Production-GoodDollarOFTMinterBurnerV1' + ), + ); + const minterBurnerProxyDeploy = await deployments.deterministic('GoodDollarOFTMinterBurner', { + contract: 'ERC1967Proxy', + from: root.address, + salt: minterBurnerProxySalt, + log: true, + }); + const minterBurnerProxy = await minterBurnerProxyDeploy.deploy(); + const minterBurnerAddress = minterBurnerProxy.address; + console.log('GoodDollarOFTMinterBurner proxy', minterBurnerAddress); + + const minterBurnerImpl = await deployments.deploy('GoodDollarOFTMinterBurner_Implementation', { + contract: 'GoodDollarOFTMinterBurner', + from: root.address, + deterministicDeployment: minterBurnerImplSalt, + log: true, + }); + console.log('GoodDollarOFTMinterBurner implementation', minterBurnerImpl.address); + + const minterBurnerContract = await ethers.getContractAt('GoodDollarOFTMinterBurner', minterBurnerAddress); + const minterBurnerInitialized = await minterBurnerContract + .token() + .then((addr: string) => addr !== ethers.constants.AddressZero) + .catch(() => false); + + if (!minterBurnerInitialized) { + console.log('GoodDollarOFTMinterBurner not initialized yet; will initialize after deploying adapter...'); + } else { + console.log('GoodDollarOFTMinterBurner already initialized'); + } + + // Verify GoodDollarOFTMinterBurner implementation (no constructor args) on non-local networks (skip: 'hardhat', 'localhost') + if (!['hardhat', 'localhost'].includes(networkName)) { + await verifyContract(hre as any, minterBurnerImpl.address, [], 'GoodDollarOFTMinterBurner'); + } + + // --- GoodDollarOFTAdapter (hardhat-deploy: deterministic proxy + implementation with constructor + execute initialize) --- + const oftAdapterProxySalt = ethers.utils.keccak256( + ethers.utils.toUtf8Bytes(isDevelopment ? 'Development-GoodDollarOFTAdapterV1' : 'Production-GoodDollarOFTAdapterV1'), + ); + const oftAdapterProxyDeploy = await deployments.deterministic('GoodDollarOFTAdapter', { + contract: 'ERC1967Proxy', + from: root.address, + salt: oftAdapterProxySalt, + log: true, + }); + const oftAdapterProxy = await oftAdapterProxyDeploy.deploy(); + const oftAdapterAddress = oftAdapterProxy.address; + console.log('GoodDollarOFTAdapter proxy', oftAdapterAddress); + + // Initialize minter/burner after we know the adapter address + if (!minterBurnerInitialized) { + console.log('Initializing GoodDollarOFTMinterBurner with adapter address...'); + const minterBurnerInitData = minterBurnerContract.interface.encodeFunctionData('initialize', [ + nameServiceAddress, + oftAdapterAddress, + ]); + await deployments.execute( + 'GoodDollarOFTMinterBurner', + { from: root.address }, + 'initialize', + minterBurnerImpl.address, + minterBurnerInitData, + ); + console.log('GoodDollarOFTMinterBurner initialized'); + } + + const oftAdapterImpl = await deployments.deploy('GoodDollarOFTAdapter_Implementation', { + contract: 'GoodDollarOFTAdapter', + from: root.address, + deterministicDeployment: oftAdapterImplSalt, + log: true, + args: [tokenAddress, lzEndpoint], + }); + console.log('GoodDollarOFTAdapter implementation', oftAdapterImpl.address); + + const oftAdapterContract = await ethers.getContractAt('GoodDollarOFTAdapter', oftAdapterAddress); + const oftAdapterInitialized = await oftAdapterContract + .minterBurner() + .then((addr: string) => addr !== ethers.constants.AddressZero) + .catch(() => false); + + if (!oftAdapterInitialized) { + console.log('Initializing GoodDollarOFTAdapter...'); + const oftAdapterInitData = oftAdapterContract.interface.encodeFunctionData('initialize', [ + tokenAddress, + minterBurnerAddress, + root.address, + root.address, + ]); + await deployments.execute( + 'GoodDollarOFTAdapter', + { from: root.address }, + 'initialize', + oftAdapterImpl.address, + oftAdapterInitData, + ); + console.log('GoodDollarOFTAdapter initialized'); + console.log('Fee recipient:', avatarAddress); + } else { + console.log('GoodDollarOFTAdapter already initialized'); + } + + // Verify GoodDollarOFTAdapter implementation (constructor: tokenAddress, lzEndpoint) on non-local networks (skip: 'hardhat', 'localhost') + if (!['hardhat', 'localhost'].includes(networkName)) { + await verifyContract(hre as any, oftAdapterImpl.address, [tokenAddress, lzEndpoint], 'GoodDollarOFTAdapter'); + } + + const minterBurnerImplAddress = await getImplementationAddress(ethers.provider, minterBurnerAddress).catch( + () => undefined, + ); + const oftAdapterImplAddress = await getImplementationAddress(ethers.provider, oftAdapterAddress).catch( + () => undefined, + ); + + console.log('\n=== Deployment Summary ==='); + console.log('Network:', networkName); + console.log('GoodDollarOFTMinterBurner:', minterBurnerAddress, '(upgradeable)'); + if (minterBurnerImplAddress) { + console.log(' Implementation:', minterBurnerImplAddress); + } + console.log('GoodDollarOFTAdapter:', oftAdapterAddress, '(upgradeable)'); + if (oftAdapterImplAddress) { + console.log(' Implementation:', oftAdapterImplAddress); + } + console.log('Token:', tokenAddress); + console.log('OFT Adapter Owner (Avatar):', avatarAddress); + console.log('LayerZero Endpoint:', lzEndpoint); + console.log('========================\n'); +}; + +export default func; +func.tags = ['OFT', 'GoodDollar']; diff --git a/packages/bridge-contracts/deploy/upgradeOFT.ts b/packages/bridge-contracts/deploy/upgradeOFT.ts new file mode 100644 index 0000000..6b98fdf --- /dev/null +++ b/packages/bridge-contracts/deploy/upgradeOFT.ts @@ -0,0 +1,202 @@ +/*** + * Hardhat-deploy script to upgrade existing GoodDollar OFT contracts. + * + * Same flow as deployOFT.ts (no hardhat-upgrades): + * - Reads proxy addresses from hardhat-deploy artifacts (`deployments/`) for the current network + * - Resolves token and LayerZero endpoint from GoodProtocol deployment (same as deployOFT) + * - Deploys new implementations (OFT adapter with constructor args, MinterBurner with none) + * - Calls upgradeTo(newImplementation) on each proxy (UUPS) + * + * Usage: + * npx hardhat deploy --tags OFT-Upgrade --network development-xdc + * npx hardhat deploy --tags OFT-Upgrade --network development-celo + * npx hardhat deploy --tags OFT-Upgrade --network production-xdc + * npx hardhat deploy --tags OFT-Upgrade --network production-celo + */ + +import { DeployFunction } from "hardhat-deploy/types"; +import { ethers } from "hardhat"; +import Contracts from "@gooddollar/goodprotocol/releases/deployment.json"; +import { getImplementationAddress } from "@openzeppelin/upgrades-core"; +import { getOftDeploymentAddresses } from "./utils/getOftDeploymentAddresses"; + +const lzEndpoints: { [key: string]: string } = { + "development-celo": "0x1a44076050125825900e736c501f859c50fE728c", + "production-celo": "0x1a44076050125825900e736c501f859c50fE728c", + "development-xdc": "0xcb566e3B6934Fa77258d68ea18E931fa75e1aaAa", + "production-xdc": "0xcb566e3B6934Fa77258d68ea18E931fa75e1aaAa", +}; + +const func: DeployFunction = async function (hre) { + const { deployments, network } = hre; + const [root] = await ethers.getSigners(); + const networkName = network.name; + + console.log("=== Upgrade GoodDollar OFT Contracts ==="); + console.log("Network:", networkName); + console.log("Deployer:", root.address); + console.log( + "Deployer balance:", + (await ethers.provider.getBalance(root.address)).toString() + ); + + const { GoodDollarOFTAdapter: oftAdapterProxy, GoodDollarOFTMinterBurner: minterBurnerProxy } = + getOftDeploymentAddresses(networkName); + + console.log("\nExisting proxy addresses (from hardhat-deploy artifacts):"); + console.log("GoodDollarOFTAdapter proxy:", oftAdapterProxy); + console.log("GoodDollarOFTMinterBurner proxy:", minterBurnerProxy); + + const goodProtocolContracts = (Contracts as any)[networkName] as any; + if (!goodProtocolContracts) { + throw new Error( + `No GoodProtocol contracts found for network ${networkName}. Please check @gooddollar/goodprotocol/releases/deployment.json` + ); + } + + const tokenAddress = goodProtocolContracts.GoodDollar as string | undefined; + if (!tokenAddress) { + throw new Error( + `Token address not found in GoodProtocol deployment for network ${networkName}. Please deploy SuperGoodDollar or GoodDollar first.` + ); + } + + const lzEndpoint = lzEndpoints[networkName] || process.env.LAYERZERO_ENDPOINT; + if (!lzEndpoint) { + throw new Error( + `LayerZero endpoint not found. Please set LAYERZERO_ENDPOINT or add default for network ${networkName}` + ); + } + + console.log("\nDeployment parameters (same as deployOFT):"); + console.log("Token:", tokenAddress); + console.log("LayerZero endpoint:", lzEndpoint); + + // Controller / Avatar (same pattern as deployOFT) + const nameServiceAddress = goodProtocolContracts.NameService as string | undefined; + if (!nameServiceAddress) { + throw new Error( + `NameService address not found in GoodProtocol deployment for network ${networkName}. Please deploy NameService first.` + ); + } + + let controllerAddress = goodProtocolContracts.Controller as string | undefined; + if (!controllerAddress) { + const INameService = await ethers.getContractAt( + "@gooddollar/goodprotocol/contracts/Interfaces.sol:INameService", + nameServiceAddress + ); + controllerAddress = await INameService.getAddress("CONTROLLER"); + if (!controllerAddress || controllerAddress === ethers.constants.AddressZero) { + throw new Error( + `Controller address not found in GoodProtocol deployment for network ${networkName}` + ); + } + } + + const Controller = await ethers.getContractAt("Controller", controllerAddress); + const avatarAddress = await Controller.avatar(); + if (!avatarAddress || avatarAddress === ethers.constants.AddressZero) { + throw new Error(`Avatar address is invalid: ${avatarAddress}`); + } + console.log("Controller:", controllerAddress); + console.log("Avatar:", avatarAddress); + + // CREATE2 salt for implementations: + // hardhat-deploy uses `deterministicDeployment` as the CREATE2 salt. + // We derive it from the contract's compiled bytecode. + const minterBurnerArtifact = await hre.artifacts.readArtifact("GoodDollarOFTMinterBurner"); + const minterBurnerImplSalt = ethers.utils.keccak256(minterBurnerArtifact.bytecode); + const oftAdapterArtifact = await hre.artifacts.readArtifact("GoodDollarOFTAdapter"); + const oftAdapterImplSalt = ethers.utils.keccak256(oftAdapterArtifact.bytecode); + + // --- GoodDollarOFTAdapter: deploy new implementation via hardhat-deploy, then upgrade proxy --- + console.log("\nDeploying new GoodDollarOFTAdapter implementation..."); + + const oftAdapterImpl = await deployments.deploy("GoodDollarOFTAdapter_Implementation", { + contract: "GoodDollarOFTAdapter", + from: root.address, + deterministicDeployment: oftAdapterImplSalt, + log: true, + args: [tokenAddress, lzEndpoint], + }); + console.log("GoodDollarOFTAdapter implementation", oftAdapterImpl.address); + + console.log("Upgrading GoodDollarOFTAdapter proxy via upgradeTo..."); + const oftAdapterProxyContract = await ethers.getContractAt( + "GoodDollarOFTAdapter", + oftAdapterProxy + ); + const txOft = await oftAdapterProxyContract.upgradeTo(oftAdapterImpl.address); + await txOft.wait(); + console.log("✅ GoodDollarOFTAdapter upgraded"); + + // --- GoodDollarOFTMinterBurner: deploy new implementation via hardhat-deploy, then upgrade proxy --- + console.log("\nDeploying new GoodDollarOFTMinterBurner implementation..."); + const minterBurnerImpl = await deployments.deploy( + "GoodDollarOFTMinterBurner_Implementation", + { + contract: "GoodDollarOFTMinterBurner", + from: root.address, + deterministicDeployment: minterBurnerImplSalt, + log: true, + } + ); + console.log("GoodDollarOFTMinterBurner implementation", minterBurnerImpl.address); + + console.log("Upgrading GoodDollarOFTMinterBurner proxy via Controller.genericCall (avatar)..."); + const minterBurnerProxyContract = await ethers.getContractAt( + "GoodDollarOFTMinterBurner", + minterBurnerProxy + ); + const upgradeData = minterBurnerProxyContract.interface.encodeFunctionData("upgradeTo", [ + minterBurnerImpl.address, + ]); + const txMb = await Controller.genericCall( + minterBurnerProxy, + upgradeData, + avatarAddress, + 0 + ); + await txMb.wait(); + console.log("✅ GoodDollarOFTMinterBurner upgraded via DAO avatar"); + + const minterBurnerImplAddress = await getImplementationAddress( + ethers.provider, + minterBurnerProxy + ).catch(() => undefined); + const oftAdapterImplAddress = await getImplementationAddress( + ethers.provider, + oftAdapterProxy + ).catch(() => undefined); + + console.log("\n=== Upgrade Summary ==="); + console.log("Network:", networkName); + console.log("GoodDollarOFTMinterBurner:", minterBurnerProxy, "(upgradeable)"); + if (minterBurnerImplAddress) { + console.log(" Implementation:", minterBurnerImplAddress); + } + console.log("GoodDollarOFTAdapter:", oftAdapterProxy, "(upgradeable)"); + if (oftAdapterImplAddress) { + console.log(" Implementation:", oftAdapterImplAddress); + } + console.log("Token:", tokenAddress); + console.log("LayerZero Endpoint:", lzEndpoint); + console.log("\n--- Verify commands (constructor args for GoodDollarOFTAdapter) ---"); + console.log( + "GoodDollarOFTAdapter implementation:\n npx hardhat verify --network", + networkName, + oftAdapterImpl.address, + tokenAddress, + lzEndpoint + ); + console.log( + "GoodDollarOFTMinterBurner implementation (no constructor args):\n npx hardhat verify --network", + networkName, + minterBurnerImpl.address + ); + console.log("========================\n"); +}; + +export default func; +func.tags = ["OFT-Upgrade", "OFT"]; diff --git a/packages/bridge-contracts/deploy/utils/getOftDeploymentAddresses.ts b/packages/bridge-contracts/deploy/utils/getOftDeploymentAddresses.ts new file mode 100644 index 0000000..77474b2 --- /dev/null +++ b/packages/bridge-contracts/deploy/utils/getOftDeploymentAddresses.ts @@ -0,0 +1,50 @@ +import path from 'path'; +import fse from 'fs-extra'; + +export type OftDeploymentAddresses = { + GoodDollarOFTMinterBurner: string; + GoodDollarOFTAdapter: string; +}; + +/** + * Reads OFT proxy addresses from hardhat-deploy's `deployments/` artifacts. + * + * hardhat-deploy writes: + * deployments//GoodDollarOFTMinterBurner.json + * deployments//GoodDollarOFTAdapter.json + */ +export function getOftDeploymentAddresses(networkName: string): OftDeploymentAddresses { + const deploymentsDir = path.resolve(__dirname, '../../deployments'); + + const minterBurnerPath = path.join(deploymentsDir, networkName, 'GoodDollarOFTMinterBurner.json'); + const oftAdapterPath = path.join(deploymentsDir, networkName, 'GoodDollarOFTAdapter.json'); + + if (!fse.existsSync(minterBurnerPath)) { + throw new Error( + `Missing hardhat-deploy artifact for GoodDollarOFTMinterBurner on network "${networkName}". ` + + `Expected: ${minterBurnerPath}. Make sure you've run: hardhat deploy --tags OFT --network ${networkName}` + ); + } + if (!fse.existsSync(oftAdapterPath)) { + throw new Error( + `Missing hardhat-deploy artifact for GoodDollarOFTAdapter on network "${networkName}". ` + + `Expected: ${oftAdapterPath}. Make sure you've run: hardhat deploy --tags OFT --network ${networkName}` + ); + } + + const minterBurnerDeployment = fse.readJSONSync(minterBurnerPath) as { address?: string }; + const oftAdapterDeployment = fse.readJSONSync(oftAdapterPath) as { address?: string }; + + if (!minterBurnerDeployment.address) { + throw new Error(`Invalid deployment file (no "address") for GoodDollarOFTMinterBurner: ${minterBurnerPath}`); + } + if (!oftAdapterDeployment.address) { + throw new Error(`Invalid deployment file (no "address") for GoodDollarOFTAdapter: ${oftAdapterPath}`); + } + + return { + GoodDollarOFTMinterBurner: minterBurnerDeployment.address, + GoodDollarOFTAdapter: oftAdapterDeployment.address, + }; +} + diff --git a/packages/bridge-contracts/deploy/utils/verifyContract.ts b/packages/bridge-contracts/deploy/utils/verifyContract.ts new file mode 100644 index 0000000..e21b710 --- /dev/null +++ b/packages/bridge-contracts/deploy/utils/verifyContract.ts @@ -0,0 +1,92 @@ +import { HardhatRuntimeEnvironment } from 'hardhat/types'; + +/** + * Verify a contract on block explorer (Etherscan, etc.) + * + * @param hre Hardhat runtime environment + * @param contractAddress The address of the contract to verify + * @param constructorArgs Optional constructor arguments array + * @param contractName Optional contract name for logging + * @returns Promise that resolves when verification is complete + */ +export async function verifyContract( + hre: HardhatRuntimeEnvironment, + contractAddress: string, + constructorArgs: any[] = [], + contractName?: string, +): Promise { + const networkName = hre.network.name; + const displayName = contractName || contractAddress; + + // Skip verification for local networks + if (['hardhat', 'localhost'].includes(networkName)) { + console.log(`ℹ️ Skipping verification for ${displayName} on local network: ${networkName}`); + return; + } + + console.log(`\n🔍 Verifying ${displayName}...`); + console.log(` Address: ${contractAddress}`); + if (constructorArgs.length > 0) { + console.log(` Constructor args: ${JSON.stringify(constructorArgs)}`); + } + + try { + await hre.run('verify:verify', { + address: contractAddress, + constructorArguments: constructorArgs, + }); + console.log(`✅ ${displayName} verified successfully`); + } catch (error: any) { + const errorMessage = error.message || error.toString() || ''; + + if (errorMessage.includes('Already Verified') || errorMessage.includes('already verified')) { + console.log(`ℹ️ ${displayName} already verified`); + } else { + console.log(`⚠️ ${displayName} verification error: ${errorMessage}`); + console.log(` You can verify manually using:`); + if (constructorArgs.length > 0) { + console.log(` npx hardhat verify --network ${networkName} ${contractAddress} ${constructorArgs.join(' ')}`); + } else { + console.log(` npx hardhat verify --network ${networkName} ${contractAddress}`); + } + } + } +} + +/** + * Verify multiple contracts in sequence + * + * @param hre Hardhat runtime environment + * @param contracts Array of contract verification configs + */ +export async function verifyContracts( + hre: HardhatRuntimeEnvironment, + contracts: Array<{ + address: string; + constructorArgs?: any[]; + name?: string; + }>, +): Promise { + console.log(`\n=== Starting Contract Verification (${contracts.length} contracts) ===`); + + for (const contract of contracts) { + await verifyContract( + hre, + contract.address, + contract.constructorArgs || [], + contract.name, + ); + } + + // Also verify on Sourcify + console.log('\n🔍 Verifying on Sourcify...'); + try { + await hre.run('sourcify'); + console.log('✅ Sourcify verification completed'); + } catch (error: any) { + console.log('⚠️ Sourcify verification error:', error.message || error.toString()); + } + + console.log('=== Contract Verification Complete ===\n'); +} + diff --git a/packages/bridge-contracts/hardhat.config.ts b/packages/bridge-contracts/hardhat.config.ts index c233478..21040d8 100644 --- a/packages/bridge-contracts/hardhat.config.ts +++ b/packages/bridge-contracts/hardhat.config.ts @@ -149,6 +149,44 @@ const config: HardhatUserConfig = { gasPrice: 2e9, chainId: 5, }, + "development-celo": { + accounts: accounts as HttpNetworkAccountsConfig, + url: "https://forno.celo.org", + gas: 3000000, + gasPrice: 26e9, + chainId: 42220, + eid: EndpointId.CELO_V2_MAINNET, + } as any, + "production-celo": { + accounts: accounts as HttpNetworkAccountsConfig, + url: "https://forno.celo.org", + gas: 8000000, + gasPrice: 26e9, + chainId: 42220 + }, + "production-xdc": { + accounts: accounts as HttpNetworkAccountsConfig, + chainId: 50, + url: 'https://rpc.xdc.org', + verify: { + etherscan: { + apiUrl: 'https://api.etherscan.io/v2/api?chainid=50', + apiKey: process.env.ETHERSCAN_KEY || '', + }, + }, + }, + "development-xdc": { + accounts: accounts as HttpNetworkAccountsConfig, + chainId: 50, + url: 'https://rpc.xdc.org', + eid: EndpointId.XDC_V2_MAINNET, + verify: { + etherscan: { + apiUrl: 'https://api.etherscan.io/v2/api?chainid=50', + apiKey: process.env.ETHERSCAN_KEY || '', + }, + }, + } as any }, sourcify: { enabled: true, @@ -190,6 +228,16 @@ const config: HardhatUserConfig = { contractSizer: { runOnCompile: true, }, + namedAccounts: { + deployer: { + default: 0, // Use the first account as deployer + }, + }, + // hardhat-deploy configuration + // This ensures LayerZero DevTools can detect hardhat-deploy usage + paths: { + deployments: 'deployments', + }, }; export default config; diff --git a/packages/bridge-contracts/layerzero.config.ts b/packages/bridge-contracts/layerzero.config.ts index 7570da1..8f86282 100644 --- a/packages/bridge-contracts/layerzero.config.ts +++ b/packages/bridge-contracts/layerzero.config.ts @@ -14,36 +14,28 @@ import type { OmniPointHardhat } from "@layerzerolabs/toolbox-hardhat"; import { OAppEnforcedOption } from "@layerzerolabs/toolbox-hardhat"; import { ExecutorOptionType } from "@layerzerolabs/lz-v2-utilities"; import { TwoWayConfig, generateConnectionsConfig } from "@layerzerolabs/metadata-tools"; -import dao from "./releases/deployment.json"; +import { getOftDeploymentAddresses } from "./deploy/utils/getOftDeploymentAddresses"; // Network names - adjust these based on your deployment const XDC_NETWORK = "development-xdc"; const CELO_NETWORK = "development-celo"; -// Get contract addresses from deployment.json -const xdcOftAdapterAddress = (dao[XDC_NETWORK] as any)?.GoodDollarOFTAdapter; -const celoOftAdapterAddress = (dao[CELO_NETWORK] as any)?.GoodDollarOFTAdapter; - -if (!xdcOftAdapterAddress || !celoOftAdapterAddress) { - throw new Error( - `OFT Adapter addresses not found in deployment.json. ` + - `XDC: ${xdcOftAdapterAddress || "missing"}, CELO: ${celoOftAdapterAddress || "missing"}. ` + - `Please deploy them first or adjust XDC_NETWORK and CELO_NETWORK constants.` - ); -} +// Get contract addresses from hardhat-deploy artifacts (`deployments/`) +const { GoodDollarOFTAdapter: xdcOftAdapterAddress } = getOftDeploymentAddresses(XDC_NETWORK); +const { GoodDollarOFTAdapter: celoOftAdapterAddress } = getOftDeploymentAddresses(CELO_NETWORK); // XDC Network contract const xdcContract: OmniPointHardhat = { eid: EndpointId.XDC_V2_MAINNET, // XDC endpoint ID contractName: "GoodDollarOFTAdapter", - address: xdcOftAdapterAddress, + address: xdcOftAdapterAddress, // Will be updated after deployment }; // CELO Network contract const celoContract: OmniPointHardhat = { eid: EndpointId.CELO_V2_MAINNET, // CELO endpoint ID contractName: "GoodDollarOFTAdapter", - address: celoOftAdapterAddress, + address: celoOftAdapterAddress, // Will be updated after deployment }; // Enforced execution options for EVM chains diff --git a/packages/bridge-contracts/package.json b/packages/bridge-contracts/package.json index 0426983..4b0d479 100644 --- a/packages/bridge-contracts/package.json +++ b/packages/bridge-contracts/package.json @@ -27,8 +27,11 @@ "@axelar-network/axelarjs-sdk": "^0.13.6", "@chainlink/env-enc": "^1.0.5", "@gooddollar/goodprotocol": "2.1.0", + "@layerzerolabs/devtools-evm-hardhat": "^4.0.4", "@layerzerolabs/lz-definitions": "^3.0.151", "@layerzerolabs/lz-evm-protocol-v2": "^3.0.151", + "@layerzerolabs/lz-v2-utilities": "^3.0.156", + "@layerzerolabs/metadata-tools": "^3.0.3", "@layerzerolabs/oapp-evm": "^0.4.1", "@layerzerolabs/oapp-evm-upgradeable": "^0.1.3", "@layerzerolabs/oft-evm": "^4.0.0", @@ -36,6 +39,7 @@ "@layerzerolabs/scan-client": "^0.0.6", "@layerzerolabs/solidity-examples": "^0.0.13", "@layerzerolabs/toolbox-hardhat": "~0.6.13", + "@layerzerolabs/ua-devtools": "^5.0.2", "@nomicfoundation/hardhat-chai-matchers": "^1.0.5", "@nomicfoundation/hardhat-network-helpers": "^1.0.6", "@nomicfoundation/hardhat-verify": "^2.1.0", @@ -57,7 +61,7 @@ "ethers": "^5.*", "hardhat": "2.26", "hardhat-contract-sizer": "^2.6.1", - "hardhat-deploy": "^1.0.4", + "hardhat-deploy": "^0.12.4", "hardhat-gas-reporter": "^1.0.9", "merkle-patricia-tree": "^2.*", "prettier": "^2.5.1", diff --git a/packages/bridge-contracts/release/deployment.json b/packages/bridge-contracts/release/deployment.json index 24f06f7..a93d348 100644 --- a/packages/bridge-contracts/release/deployment.json +++ b/packages/bridge-contracts/release/deployment.json @@ -1,17 +1,17 @@ { - "fuse": { - "fuseBridge": "0x5B7cEfD0e7d952F7E400416F9c98fE36F1043822", - "celoBridge": "0x165aEb4184A0cc4eFb96Cb6035341Ba2265bA564", - "registry": "0x44a1E0A83821E239F9Cef248CECc3AC5b910aeD2" - }, - "staging": { - "fuseBridge": "0x1CD7a472FF2c6826252932CC8aC40473898d90E8", - "celoBridge": "0x0A6538C9DAc037f5313CaAEb42b19081993e3183", - "registry": "0x44a1E0A83821E239F9Cef248CECc3AC5b910aeD2" - }, - "production": { - "fuseBridge": "0x08fdf766694C353401350c225cAEB9C631dC3288", - "celoBridge": "0xfb152Fc469A3E9154f8AA60bbD6700EcBC357A54", - "registry": "0x44a1E0A83821E239F9Cef248CECc3AC5b910aeD2" - } -} \ No newline at end of file + "fuse": { + "fuseBridge": "0x5B7cEfD0e7d952F7E400416F9c98fE36F1043822", + "celoBridge": "0x165aEb4184A0cc4eFb96Cb6035341Ba2265bA564", + "registry": "0x44a1E0A83821E239F9Cef248CECc3AC5b910aeD2" + }, + "staging": { + "fuseBridge": "0x1CD7a472FF2c6826252932CC8aC40473898d90E8", + "celoBridge": "0x0A6538C9DAc037f5313CaAEb42b19081993e3183", + "registry": "0x44a1E0A83821E239F9Cef248CECc3AC5b910aeD2" + }, + "production": { + "fuseBridge": "0x08fdf766694C353401350c225cAEB9C631dC3288", + "celoBridge": "0xfb152Fc469A3E9154f8AA60bbD6700EcBC357A54", + "registry": "0x44a1E0A83821E239F9Cef248CECc3AC5b910aeD2" + } +} diff --git a/packages/bridge-contracts/test/oft/OFT_CONFIGURING_GUIDE.md b/packages/bridge-contracts/test/oft/OFT_CONFIGURING_GUIDE.md new file mode 100644 index 0000000..005d389 --- /dev/null +++ b/packages/bridge-contracts/test/oft/OFT_CONFIGURING_GUIDE.md @@ -0,0 +1,153 @@ +# OFT (Omnichain Fungible Token) Configuration Guide + +This guide explains how to configure the GoodDollar OFT bridge between XDC and CELO networks using LayerZero. + +## Overview + +The OFT bridge enables cross-chain transfers of GoodDollar (G$) tokens between XDC and CELO networks. The setup involves deploying contracts, configuring permissions, setting up LayerZero connections, and configuring bridge limits. + + +## Configuration File + +All configuration values are stored in `test/oft/oft.config.json`. Each network has its own configuration entry. + +### Configuration Structure + +```json +{ + "development-xdc": { + "skipTransferOwnership": false, + "skipWiring": false, + "skipLimits": false, + "skipBridgeTest": true, + "limits": { + "dailyLimit": "5000", + "txLimit": "1000", + "accountDailyLimit": "1000", + "minAmount": "1", + "onlyWhitelisted": false + } + }, + "development-celo": { + // ... same structure + }, + "production-xdc": { + // ... same structure + }, + "production-celo": { + // ... same structure + } +} +``` + +## Manual Configuration: Step-by-Step + +If you prefer to configure each network individually or need more control, follow these steps: + +### Step 1: Deploy OFT Contracts + +Deploy the GoodDollarOFTMinterBurner and GoodDollarOFTAdapter contracts on each network using hardhat-deploy: + +```bash +# Deploy on XDC +npx hardhat deploy --tags OFT --network development-xdc + +# Deploy on CELO +npx hardhat deploy --tags OFT --network development-celo +``` + +This deployment script will: +- Deploy `GoodDollarOFTMinterBurner` (upgradeable proxy) +- Deploy `GoodDollarOFTAdapter` (upgradeable proxy) +- Save contract addresses to hardhat-deploy's `deployments/` artifacts +- Save deployments to hardhat-deploy's deployment system + +**Note**: The deployment uses hardhat-deploy for better deployment management and tracking. + +### Step 2: Grant MINTER_ROLE + +`GoodDollarOFTMinterBurner.initialize(nameService, adapter)` automatically sets the OFT adapter as an operator, +so there is no separate “set operator” step required. + +Grant the MINTER_ROLE to GoodDollarOFTMinterBurner on the GoodDollar token: + +```bash +# Grant on XDC +yarn hardhat run test/oft/grant-minter-role.ts --network development-xdc + +# Grant on CELO +yarn hardhat run test/oft/grant-minter-role.ts --network development-celo +``` + +This executes via DAO governance (Controller/Avatar) to grant the minter role. + +### Step 3: Wire LayerZero Connections + +Configure LayerZero messaging libraries, DVNs, executors, and enforced options: + +```bash +# Wire on XDC +yarn hardhat lz:oapp:wire --oapp-config ./layerzero.config.ts --network development-xdc + +# Wire on CELO +yarn hardhat lz:oapp:wire --oapp-config ./layerzero.config.ts --network development-celo +``` + +**Important**: +- Wiring may fail with permission errors (0xc4c52593) if the OApp owner doesn't have delegate permissions on the LayerZero endpoint +- If wiring fails, you may need to manually configure enforced options or contact LayerZero support + +### Step 4: Set Bridge Limits (Optional) + +Configure bridge limits using values from `oft.config.json` (only needed if you want to set the bridge limits): + +```bash +# Set limits on XDC +yarn hardhat run test/oft/set-bridge-limits.ts --network development-xdc + +# Set limits on CELO +yarn hardhat run test/oft/set-bridge-limits.ts --network development-celo +``` + +The script reads limit values from `oft.config.json` for the specified network and sets them on the OFT adapter. + +### Step 5: Test Bridge Functionality (Optional) + +Test the bridge by sending tokens from one chain to another: + +```bash +# Bridge from XDC to CELO +yarn hardhat run test/oft/bridge-oft-token.ts --network development-xdc + +# Bridge from CELO to XDC +yarn hardhat run test/oft/bridge-oft-token.ts --network development-celo +``` + +**Requirements**: +- Sufficient G$ balance on the source chain +- Sufficient native token (XDC/CELO) for gas and LayerZero fees +- GoodDollarOFTMinterBurner approval for token burning + +### Step 6: Transfer Ownership (Optional) + +Transfer OFT adapter ownership to DAO Avatar. This should be done as the final step: + +```bash +# Transfer on XDC +yarn hardhat run test/oft/transfer-oft-adapter-ownership.ts --network development-xdc + +# Transfer on CELO +yarn hardhat run test/oft/transfer-oft-adapter-ownership.ts --network development-celo +``` + +**Note**: Only transfer ownership if you want the DAO Avatar to be the long-term owner (recommended for production). This must be done by the current owner of the OFT adapter (usually the deployer), and is performed after all other configuration. + +## Configuration Verification + +After configuration, verify the setup: + +1. **Check contract deployments**: Verify addresses in hardhat-deploy's `deployments/` artifacts +2. **Check MINTER_ROLE**: Verify GoodDollarOFTMinterBurner has minter role on GoodDollar token +3. **Check ownership**: Verify OFT adapter is owned by DAO Avatar +4. **Check LayerZero peers**: Verify peer connections are set between chains +5. **Check limits**: Verify bridge limits are set correctly diff --git a/packages/bridge-contracts/test/oft/bridge-oft-token.ts b/packages/bridge-contracts/test/oft/bridge-oft-token.ts new file mode 100644 index 0000000..45ad1ee --- /dev/null +++ b/packages/bridge-contracts/test/oft/bridge-oft-token.ts @@ -0,0 +1,400 @@ +/*** + * Script to bridge 1 G$ token between XDC and CELO using LayerZero OFT adapter + * + * Usage: + * # Bridge from XDC to CELO: + * npx hardhat run test/oft/bridge-oft-token.ts --network production-xdc + * # or + * npx hardhat run test/oft/bridge-oft-token.ts --network development-xdc + * + * # Bridge from CELO to XDC: + * npx hardhat run test/oft/bridge-oft-token.ts --network production-celo + * # or + * npx hardhat run test/oft/bridge-oft-token.ts --network development-celo + * + * Note: Make sure you have: + * - GoodDollarOFTAdapter deployed on both XDC and CELO + * - Sufficient G$ balance on the source chain + * - Sufficient native token (XDC or CELO) for gas and LayerZero fees + */ + +import { network, ethers } from "hardhat"; +import { Contract } from "ethers"; +import { EndpointId } from "@layerzerolabs/lz-definitions"; +import Contracts from "@gooddollar/goodprotocol/releases/deployment.json"; +import { getOftDeploymentAddresses } from "../../deploy/utils/getOftDeploymentAddresses"; + +// IERC20 interface for token operations +const IERC20_ABI = [ + "function balanceOf(address owner) view returns (uint256)", + "function allowance(address owner, address spender) view returns (uint256)", + "function approve(address spender, uint256 amount) returns (bool)", + "function transfer(address to, uint256 amount) returns (bool)", +]; + +// LayerZero Endpoint IDs (eid) +// These are LayerZero v2 endpoint IDs, not chain IDs +const XDC_ENDPOINT_ID = EndpointId.XDC_V2_MAINNET; +const CELO_ENDPOINT_ID = process.env.CELO_LZ_ENDPOINT_ID + ? parseInt(process.env.CELO_LZ_ENDPOINT_ID) + : EndpointId.CELO_V2_MAINNET; // Default CELO LayerZero endpoint ID + +const main = async () => { + const networkName = network.name; + const [sender] = await ethers.getSigners(); + + // Detect source and destination networks + const isXDC = networkName.includes("xdc"); + const isCELO = networkName.includes("celo"); + + if (!isXDC && !isCELO) { + throw new Error( + `Network must be XDC or CELO. Current network: ${networkName}\n` + + `Supported networks: production-xdc, development-xdc, production-celo, development-celo` + ); + } + + const sourceNetwork = isXDC ? "XDC" : "CELO"; + const destNetwork = isXDC ? "CELO" : "XDC"; + const sourceEndpointId = isXDC ? XDC_ENDPOINT_ID : CELO_ENDPOINT_ID; + const destEndpointId = isXDC ? CELO_ENDPOINT_ID : XDC_ENDPOINT_ID; + const nativeTokenName = isXDC ? "XDC" : "CELO"; + + console.log("=== Bridge G$ ==="); + console.log(`Bridging from ${sourceNetwork} to ${destNetwork}`); + console.log("Source Network:", networkName); + console.log("Sender:", sender.address); + console.log(`Sender balance: ${ethers.utils.formatEther(await ethers.provider.getBalance(sender.address))} ${nativeTokenName}`); + + // Get deployment info for source network + const { GoodDollarOFTAdapter: oftAdapterAddress, GoodDollarOFTMinterBurner: minterBurnerAddress } = + getOftDeploymentAddresses(networkName); + const goodProtocolContracts = Contracts[networkName as keyof typeof Contracts] as any; + + if (!goodProtocolContracts) { + throw new Error(`No GoodProtocol contracts found for network: ${networkName}`); + } + + const tokenAddress = goodProtocolContracts.GoodDollar || goodProtocolContracts.SuperGoodDollar; + + if (!tokenAddress) { + throw new Error(`GoodDollar token not found in GoodProtocol deployment.json for ${networkName}`); + } + + + console.log("\nSource chain contract addresses:"); + console.log("OFT Adapter:", oftAdapterAddress); + console.log("Token:", tokenAddress); + console.log("MinterBurner:", minterBurnerAddress); + + // Get contracts + const token = new ethers.Contract(tokenAddress, IERC20_ABI, sender); + const oftAdapter = await ethers.getContractAt("GoodDollarOFTAdapter", oftAdapterAddress); + + // Amount to bridge: 1 G$ = 1e18 + const amount = ethers.utils.parseEther("90"); + console.log("\nAmount to bridge:", ethers.utils.formatEther(amount), "G$"); + + // Check token balance + const balance = await token.balanceOf(sender.address); + console.log("Current G$ balance:", ethers.utils.formatEther(balance), "G$"); + + if (balance.lt(amount)) { + throw new Error(`Insufficient balance. Need ${ethers.utils.formatEther(amount)} G$, have ${ethers.utils.formatEther(balance)} G$`); + } + + // Check and approve MinterBurner if needed (required for burning tokens) + // The OFT adapter calls minterBurner.burn(), which calls token.burnFrom() requiring approval + // Note: OFT adapter itself doesn't need approval since approvalRequired() returns false + const minterBurnerAllowance = await token.allowance(sender.address, minterBurnerAddress); + console.log("\nChecking MinterBurner allowance..."); + console.log("Current MinterBurner allowance:", ethers.utils.formatEther(minterBurnerAllowance), "G$"); + + if (minterBurnerAllowance.lt(amount)) { + console.log("\nApproving MinterBurner to burn tokens..."); + const approveMinterBurnerTx = await token.approve(minterBurnerAddress, amount); + await approveMinterBurnerTx.wait(); + console.log("MinterBurner approval confirmed:", approveMinterBurnerTx.hash); + } else { + console.log("Sufficient MinterBurner allowance already set"); + } + + // Recipient address (same address on destination chain) + const recipient = sender.address; + console.log(`\nRecipient on ${destNetwork}:`, recipient); + + // Get destination network OFT adapter address + let destNetworkName: string; + if (isXDC) { + // Bridging to CELO - try production-celo first, then development-celo + destNetworkName = "development-celo"; + } else { + // Bridging to XDC - try production-xdc first, then development-xdc + destNetworkName = "development-xdc"; + } + + const { GoodDollarOFTAdapter: destOFTAdapter } = getOftDeploymentAddresses(destNetworkName); + + console.log(`\nDestination chain (${destNetwork}):`); + console.log(`OFT Adapter: ${destOFTAdapter}`); + console.log(`Network name: ${destNetworkName}`); + + // Check if peer is set for destination chain + console.log(`\nChecking if ${destNetwork} peer is configured...`); + const destPeer = await oftAdapter.peers(destEndpointId); + console.log(`Current ${destNetwork} peer:`, destPeer); + + const expectedPeer = ethers.utils.hexZeroPad(destOFTAdapter, 32); + console.log(`Expected ${destNetwork} peer (OFT adapter on ${destNetwork}):`, destOFTAdapter); + console.log("Expected peer (bytes32):", expectedPeer); + + // Compare case-insensitively (addresses can have different case) + const destPeerLower = destPeer.toLowerCase(); + const expectedPeerLower = expectedPeer.toLowerCase(); + + if (destPeerLower === ethers.constants.HashZero.toLowerCase() || destPeerLower !== expectedPeerLower) { + console.log(`\n⚠️ WARNING: ${destNetwork} peer is not configured correctly!`); + console.log("You need to set the peer before bridging. Run this command:"); + console.log(` oftAdapter.setPeer(${destEndpointId}, "${expectedPeer}")`); + console.log("\nOr use the LayerZero wire command:"); + console.log(` npx hardhat lz:oapp:wire --oapp-config layerzero.config.ts --network ${networkName}`); + throw new Error(`NoPeer: ${destNetwork} peer (endpoint ${destEndpointId}) is not set. Expected: ${destOFTAdapter}`); + } + + console.log(`✅ ${destNetwork} peer is configured correctly`); + + await token.approve(minterBurnerAddress, amount); + // Double-check MinterBurner approval before calling quoteSend + console.log("\nVerifying MinterBurner approval before quoteSend..."); + const finalMinterBurnerAllowance = await token.allowance(sender.address, minterBurnerAddress); + console.log("Final MinterBurner allowance:", ethers.utils.formatEther(finalMinterBurnerAllowance), "G$"); + + if (finalMinterBurnerAllowance.lt(amount)) { + throw new Error( + `MinterBurner allowance insufficient. Need ${ethers.utils.formatEther(amount)} G$, have ${ethers.utils.formatEther(finalMinterBurnerAllowance)} G$` + ); + } + + // Check send library configuration before attempting quoteSend + console.log("\nChecking send library configuration..."); + try { + // Get the endpoint address from the OFT adapter (OApp has endpoint() function) + let endpointAddress: string; + try { + endpointAddress = await oftAdapter.endpoint(); + } catch { + // Fallback: try to get from the deployment config + const lzEndpoints: { [key: string]: string } = { + "development-celo": "0x1a44076050125825900e736c501f859c50fE728c", + "production-celo": "0x1a44076050125825900e736c501f859c50fE728c", + "development-xdc": "0xcb566e3B6934Fa77258d68ea18E931fa75e1aaAa", + "production-xdc": "0xcb566e3B6934Fa77258d68ea18E931fa75e1aaAa", + }; + endpointAddress = lzEndpoints[networkName] || ""; + if (!endpointAddress) { + throw new Error(`Could not determine endpoint address for ${networkName}`); + } + } + console.log("LayerZero Endpoint:", endpointAddress); + + // Check if send library is configured + // The endpoint's MessageLibManager has getSendLibrary function + const endpointABI = [ + "function getSendLibrary(address _sender, uint32 _dstEid) external view returns (address lib)", + "function defaultSendLibrary(uint32 _dstEid) external view returns (address lib)", + "function defaultReceiveLibrary(uint32 _srcEid) external view returns (address lib)", + "function getReceiveLibrary(address _receiver, uint32 _srcEid) external view returns (address lib)", + ]; + const endpoint = new ethers.Contract(endpointAddress, endpointABI, sender); + + try { + const sendLib = await endpoint.getSendLibrary(oftAdapterAddress, destEndpointId); + console.log(`Send library for ${destNetwork} (eid ${destEndpointId}):`, sendLib); + + if (sendLib === ethers.constants.AddressZero) { + console.log("⚠️ WARNING: No send library configured!"); + try { + const defaultSendLib = await endpoint.defaultSendLibrary(destEndpointId); + console.log(`Default send library for ${destNetwork}:`, defaultSendLib); + if (defaultSendLib === ethers.constants.AddressZero) { + throw new Error( + `No send library configured for ${destNetwork} (eid ${destEndpointId}). ` + + `You need to run the LayerZero wiring command: ` + + `yarn hardhat lz:oapp:wire --oapp-config ./layerzero.config.ts --network ${networkName}` + ); + } else { + console.log("ℹ️ Using default send library. Consider configuring a specific send library for better control."); + } + } catch (e: any) { + throw new Error( + `Send library not configured for ${destNetwork} (eid ${destEndpointId}). ` + + `Error: ${e.message}. ` + + `You need to run the LayerZero wiring command: ` + + `yarn hardhat lz:oapp:wire --oapp-config ./layerzero.config.ts --network ${networkName}` + ); + } + } else { + console.log("✅ Send library is configured"); + + // Note: We can't check receive library on destination chain from here (cross-chain calls not supported) + // The error 0x6592671c likely indicates missing DVN/executor configuration from wiring + console.log(`\nℹ️ Note: Cannot check receive library on ${destNetwork} from ${sourceNetwork} network.`); + console.log(` If quoteSend fails, ensure wiring is completed on BOTH networks.`); + } + } catch (e: any) { + console.log("⚠️ Could not check send library configuration:", e.message); + console.log("Proceeding with quoteSend - will fail if send library is not configured..."); + } + } catch (e: any) { + console.log("⚠️ Could not check endpoint configuration:", e.message); + console.log("Proceeding with quoteSend..."); + } + + // Estimate LayerZero fee using quoteSend + console.log("\nEstimating LayerZero fee..."); + try { + // LayerZero v2 OFT uses quoteSend with SendParam struct + // SendParam: { dstEid, to, amountLD, minAmountLD, extraOptions, composeMsg, oftCmd } + // + // For extraOptions: Use combineOptions to build proper options, or use empty bytes + // Since wiring failed, we'll try using the OApp's combineOptions if available, + // otherwise use empty options (but this might fail if enforced options are required) + let extraOptions = "0x"; + + try { + // Try to use combineOptions to build proper options + // combineOptions(msgType, extraOptions) - msgType 1 = SEND + const combineOptionsResult = await oftAdapter.combineOptions(destEndpointId, 1, extraOptions); + if (combineOptionsResult && combineOptionsResult !== "0x") { + extraOptions = combineOptionsResult; + console.log("Using combined options from OApp"); + } + } catch (e: any) { + console.log("Note: Could not use combineOptions, using empty options"); + console.log("If quoteSend fails, enforced options may need to be configured via wiring"); + } + + const sendParam = { + dstEid: destEndpointId, // destination endpoint ID + to: ethers.utils.hexZeroPad(recipient, 32), // recipient address (bytes32 encoded) + amountLD: amount, // amount to send in local decimals + minAmountLD: amount, // minimum amount to receive (slippage protection) + extraOptions: extraOptions, // extra options (may need to be properly encoded) + composeMsg: "0x", // compose message (empty for simple send) + oftCmd: "0x" // OFT command (unused in default) + }; + + // Quote the fee (payInLzToken = false means pay in native token) + const msgFee = await oftAdapter.quoteSend(sendParam, false); + + console.log(`Estimated native fee: ${ethers.utils.formatEther(msgFee.nativeFee)} ${nativeTokenName}`); + console.log("Estimated LZ token fee:", ethers.utils.formatEther(msgFee.lzTokenFee), "LZ"); + + // Check if sender has enough native token for fee + const senderBalance = await ethers.provider.getBalance(sender.address); + if (senderBalance.lt(msgFee.nativeFee)) { + throw new Error( + `Insufficient native token for fee. Need ${ethers.utils.formatEther(msgFee.nativeFee)} ${nativeTokenName}, have ${ethers.utils.formatEther(senderBalance)} ${nativeTokenName}` + ); + } + + // Send tokens + console.log("\nSending tokens via LayerZero OFT..."); + console.log("This may take a few minutes..."); + + const sendTx = await oftAdapter.send( + sendParam, // SendParam struct + msgFee, // MessagingFee struct + sender.address, // refund address + { value: msgFee.nativeFee } // send native fee + ); + + console.log("Transaction sent:", sendTx.hash); + console.log("Waiting for confirmation..."); + + const receipt = await sendTx.wait(); + console.log("\n✅ Transaction confirmed!"); + console.log("Block number:", receipt.blockNumber); + console.log("Gas used:", receipt.gasUsed.toString()); + + // Look for Send event + const sendEvent = receipt.events?.find((e: any) => e.event === "Send"); + if (sendEvent) { + console.log("\nSend event found:"); + console.log(" Amount:", ethers.utils.formatEther(sendEvent.args?.amountLD || 0), "G$"); + console.log(" Recipient:", sendEvent.args?.to); + } + + console.log("\n=== Bridge Initiated Successfully ==="); + console.log(`Bridging from ${sourceNetwork} to ${destNetwork}`); + console.log("Transaction hash:", sendTx.hash); + console.log(`Recipient on ${destNetwork}:`, recipient); + console.log("Amount:", ethers.utils.formatEther(amount), "G$"); + console.log("\nYou can track the cross-chain message at:"); + console.log(`https://layerzeroscan.com/tx/${sendTx.hash}`); + console.log(`\nNote: The tokens will arrive on ${destNetwork} after the LayerZero message is delivered.`); + console.log("This typically takes a few minutes."); + + } catch (error: any) { + console.error("\n❌ Error during bridge:"); + + // Provide helpful error messages for common issues + if (error.code === 'CALL_EXCEPTION' || error.reason || error.data) { + const errorData = error.data || error.error?.data || ''; + + // Check for invalid worker options error (error code 0x6592671c = LZ_ULN_InvalidWorkerOptions) + if (errorData.includes('6592671c')) { + console.error("\n🔍 DIAGNOSIS: Invalid Worker Options"); + console.error("The error code 0x6592671c = LZ_ULN_InvalidWorkerOptions indicates invalid extraOptions."); + console.error("This happens when enforced options are required but not properly configured."); + console.error("\nWhat's configured:"); + console.error(" ✅ Send library: Found"); + console.error(" ✅ Peer connection: Set"); + console.error("\nWhat's likely missing:"); + console.error(" ❌ DVN (Data Verification Network) configuration"); + console.error(" ❌ Executor configuration"); + console.error(" ❌ Receive library configuration on destination"); + console.error(" ❌ Complete wiring configuration"); + console.error("\nROOT CAUSE:"); + console.error("The 'lz:oapp:wire' command failed earlier, so enforced options weren't configured."); + console.error("The OApp requires specific worker options (gas limits, etc.) but they're not set."); + console.error("\nSOLUTION:"); + console.error("1. The wiring command MUST succeed to configure enforced options:"); + console.error(` yarn hardhat lz:oapp:wire --oapp-config ./layerzero.config.ts --network ${networkName}`); + console.error(` yarn hardhat lz:oapp:wire --oapp-config ./layerzero.config.ts --network ${destNetworkName}`); + console.error("\n2. If wiring fails with permission errors (0xc4c52593), you need to:"); + console.error(" - Run wiring from an account that has delegate permissions on the endpoint"); + console.error(" - The OApp owner must be set as a delegate on the endpoint"); + console.error(" - Contact LayerZero support if you need help with endpoint permissions"); + console.error("\n3. Alternative: Manually configure enforced options:"); + console.error(" - Use the OApp's setEnforcedOptions function if available"); + console.error(" - Or check LayerZero documentation for manual option configuration"); + console.error("\n4. Check LayerZero Scan for default configurations:"); + console.error(` Visit: https://layerzeroscan.com/tools/defaults?version=V2`); + } else if (error.message?.includes('send library') || error.message?.includes('SendLib') || error.message?.includes('receive library') || error.message?.includes('ReceiveLib')) { + console.error("\n🔍 DIAGNOSIS: LayerZero library configuration issue"); + console.error("Check library configuration using:"); + console.error(` yarn hardhat run test/oft/check-layerzero-config.ts --network ${networkName}`); + } + + // Check for peer errors + if (errorData.includes('NoPeer') || error.message?.includes('peer')) { + console.error("\n🔍 DIAGNOSIS: Peer not configured"); + console.error("The peer connection between chains is not set."); + console.error("\nSOLUTION:"); + console.error(`Run: yarn hardhat run test/oft/set-layerzero-peers.ts --network ${networkName}`); + } + } + + throw error; + } +}; + +if (require.main === module) { + main() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); +} diff --git a/packages/bridge-contracts/test/oft/grant-minter-role.ts b/packages/bridge-contracts/test/oft/grant-minter-role.ts new file mode 100644 index 0000000..3dd3e01 --- /dev/null +++ b/packages/bridge-contracts/test/oft/grant-minter-role.ts @@ -0,0 +1,137 @@ +/*** + * Script to grant MINTER_ROLE to GoodDollarOFTMinterBurner contract on development-celo + * Uses genericCall through Avatar/Controller to execute the transaction + * + * Usage: + * npx hardhat run test/oft/grant-minter-role.ts --network development-celo + * + * Note: This script must be run by a guardian or address with permissions to execute via Controller + */ + +import { network, ethers } from "hardhat"; +import Contracts from "@gooddollar/goodprotocol/releases/deployment.json"; +import { getOftDeploymentAddresses } from "../../deploy/utils/getOftDeploymentAddresses"; + +const main = async () => { + const networkName = network.name; + const [signer] = await ethers.getSigners(); + + console.log("=== Grant MINTER_ROLE to GoodDollarOFTMinterBurner ==="); + console.log("Network:", networkName); + console.log("Signer:", signer.address); + + // Derive native token name from network + const nativeTokenName = networkName.includes("celo") ? "CELO" : networkName.includes("xdc") ? "XDC" : "native token"; + console.log("Signer balance:", ethers.utils.formatEther(await ethers.provider.getBalance(signer.address)), nativeTokenName); + + // Get deployment info from GoodProtocol and GoodBridge + const goodProtocolContracts = Contracts[networkName as keyof typeof Contracts] as any; + if (!goodProtocolContracts) { + throw new Error(`No GoodProtocol contracts found for network: ${networkName}`); + } + + const tokenAddress = goodProtocolContracts.GoodDollar || goodProtocolContracts.SuperGoodDollar; + const { GoodDollarOFTMinterBurner: minterBurnerAddress } = getOftDeploymentAddresses(networkName); + const controllerAddress = goodProtocolContracts.Controller; + const avatarAddress = goodProtocolContracts.Avatar; + + if (!tokenAddress) { + throw new Error(`GoodDollar token not found in GoodProtocol deployment.json for ${networkName}`); + } + + // `getOftDeploymentAddresses` throws if missing + + if (!controllerAddress) { + throw new Error(`Controller not found in GoodProtocol deployment.json for ${networkName}`); + } + + if (!avatarAddress) { + throw new Error(`Avatar not found in GoodProtocol deployment.json for ${networkName}`); + } + + console.log("\nContract addresses:"); + console.log("GoodDollar token:", tokenAddress); + console.log("GoodDollarOFTMinterBurner:", minterBurnerAddress); + console.log("Controller:", controllerAddress); + console.log("Avatar:", avatarAddress); + + // Get token contract to check current status + // Use the local interface file + const token = await ethers.getContractAt( + "contracts/oft/interfaces/ISuperGoodDollar.sol:ISuperGoodDollar", + tokenAddress + ); + + // Check if MinterBurner already has minter role + const isMinter = await token.isMinter(minterBurnerAddress); + console.log("\nCurrent status:"); + console.log("MinterBurner has MINTER_ROLE:", isMinter); + + if (isMinter) { + console.log("\n✅ GoodDollarOFTMinterBurner already has MINTER_ROLE. No action needed."); + return; + } + + // Prepare the generic call through Avatar + // Function signature: addMinter(address) + const functionSignature = "addMinter(address)"; + + // Encode the function input (minterBurnerAddress) + const abiCoder = ethers.utils.defaultAbiCoder; + const functionInputs = abiCoder.encode(["address"], [minterBurnerAddress]); + + console.log("\nPreparing generic call:"); + console.log("Function:", functionSignature); + console.log("Target contract:", tokenAddress); + console.log("Parameter (minterBurner):", minterBurnerAddress); + + // Execute via Controller/Avatar + try { + console.log("\nExecuting via Controller/Avatar..."); + const Controller = await ethers.getContractAt("Controller", controllerAddress); + + // Use genericCall to execute through Avatar + // Encode the function call: function selector + parameters + const functionSelector = ethers.utils.id(functionSignature).slice(0, 10); + const encodedCall = ethers.utils.hexConcat([functionSelector, functionInputs]); + + const tx = await Controller.genericCall( + tokenAddress, + encodedCall, + avatarAddress, + 0 + ); + await tx.wait(); + console.log("Transaction hash:", tx.hash); + + // Verify the role was granted + console.log("\nVerifying role was granted..."); + const isMinterAfter = await token.isMinter(minterBurnerAddress); + console.log("MinterBurner has MINTER_ROLE:", isMinterAfter); + + if (isMinterAfter) { + console.log("\n✅ Successfully granted MINTER_ROLE to GoodDollarOFTMinterBurner via Avatar!"); + } else { + console.log("\n⚠️ Warning: MINTER_ROLE was not granted. Please check the transaction."); + } + + } catch (error: any) { + console.error("\n❌ Error granting MINTER_ROLE:"); + if (error.message) { + console.error("Error message:", error.message); + } + if (error.reason) { + console.error("Reason:", error.reason); + } + throw error; + } +}; + +if (require.main === module) { + main() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); +} diff --git a/packages/bridge-contracts/test/oft/oft.config.json b/packages/bridge-contracts/test/oft/oft.config.json new file mode 100644 index 0000000..712b979 --- /dev/null +++ b/packages/bridge-contracts/test/oft/oft.config.json @@ -0,0 +1,38 @@ +{ + "development-xdc": { + "limits": { + "dailyLimit": "1000", + "txLimit": "100", + "accountDailyLimit": "100", + "minAmount": "1", + "onlyWhitelisted": false + } + }, + "development-celo": { + "limits": { + "dailyLimit": "1000", + "txLimit": "95", + "accountDailyLimit": "200", + "minAmount": "1", + "onlyWhitelisted": false + } + }, + "production-xdc": { + "limits": { + "dailyLimit": "1000000", + "txLimit": "100000", + "accountDailyLimit": "50000", + "minAmount": "10", + "onlyWhitelisted": false + } + }, + "production-celo": { + "limits": { + "dailyLimit": "1000000", + "txLimit": "100000", + "accountDailyLimit": "50000", + "minAmount": "10", + "onlyWhitelisted": false + } + } +} diff --git a/packages/bridge-contracts/test/oft/set-bridge-limits.ts b/packages/bridge-contracts/test/oft/set-bridge-limits.ts new file mode 100644 index 0000000..2e295ea --- /dev/null +++ b/packages/bridge-contracts/test/oft/set-bridge-limits.ts @@ -0,0 +1,172 @@ +/*** + * Script to set bridge limits for GoodDollarOFTAdapter contract + * Calls setBridgeLimits directly on the OFT adapter (not via Controller/Avatar). + * + * Note: Limits are now managed in GoodDollarOFTAdapter, not GoodDollarOFTMinterBurner + * + * Usage: + * npx hardhat run test/oft/set-bridge-limits.ts --network development-celo + * + * Configuration: + * All limit values are read from test/oft/oft.config.json + * Each network/env has its entry in the config file. + * + * Note: This script must be run by the OFT adapter owner (usually the deployer or DAO Avatar) + */ + +import { network, ethers } from "hardhat"; +import { BigNumber } from "ethers"; +import Contracts from "@gooddollar/goodprotocol/releases/deployment.json"; +import { getOftDeploymentAddresses } from "../../deploy/utils/getOftDeploymentAddresses"; +import config from "./oft.config.json"; + +const main = async () => { + const networkName = network.name; + const [signer] = await ethers.getSigners(); + + console.log("=== Set Bridge Limits for GoodDollarOFTAdapter ==="); + console.log("Network:", networkName); + console.log("Signer:", signer.address); + + // Derive native token name from network + const nativeTokenName = networkName.includes("celo") ? "CELO" : networkName.includes("xdc") ? "XDC" : "native token"; + console.log("Signer balance:", ethers.utils.formatEther(await ethers.provider.getBalance(signer.address)), nativeTokenName); + + // Get deployment info (from hardhat-deploy artifacts) + const { GoodDollarOFTAdapter: oftAdapterAddress } = getOftDeploymentAddresses(networkName); + + // Get GoodProtocol contracts for Controller and Avatar + const goodProtocolContracts = Contracts[networkName as keyof typeof Contracts] as any; + if (!goodProtocolContracts) { + throw new Error(`No GoodProtocol contracts found for network: ${networkName}`); + } + + const controllerAddress = goodProtocolContracts.Controller; + const avatarAddress = goodProtocolContracts.Avatar; + + if (!controllerAddress) { + throw new Error(`Controller not found in GoodProtocol deployment.json for ${networkName}`); + } + + if (!avatarAddress) { + throw new Error(`Avatar not found in GoodProtocol deployment.json for ${networkName}`); + } + + console.log("\nContract addresses:"); + console.log("GoodDollarOFTAdapter:", oftAdapterAddress); + console.log("Controller:", controllerAddress); + console.log("Avatar:", avatarAddress); + + // Get current limits from OFTAdapter contract + const oftAdapter = await ethers.getContractAt("GoodDollarOFTAdapter", oftAdapterAddress); + const currentLimits = await oftAdapter.bridgeLimits(); + + console.log("\nCurrent bridge limits:"); + console.log("Daily Limit:", ethers.utils.formatEther(currentLimits.dailyLimit), "G$"); + console.log("Transaction Limit:", ethers.utils.formatEther(currentLimits.txLimit), "G$"); + console.log("Account Daily Limit:", ethers.utils.formatEther(currentLimits.accountDailyLimit), "G$"); + console.log("Min Amount:", ethers.utils.formatEther(currentLimits.minAmount), "G$"); + console.log("Only Whitelisted:", currentLimits.onlyWhitelisted); + + // Get config for this network + const networkConfig = (config as any)[networkName]; + if (!networkConfig || !networkConfig.limits) { + console.log("\n⚠️ No limits configuration found for this network."); + console.log(`Please add a "limits" entry for "${networkName}" in test/oft/oft.config.json`); + return; + } + + const limitsConfig = networkConfig.limits; + + // Parse limit values (values can be in decimal format, e.g., "1000000" for 1M G$) + // The script will automatically convert them to wei (18 decimals) + const parseLimit = (value: string | undefined): BigNumber | null => { + if (!value) return null; + // Check if value contains a decimal point or is a simple number + // If it's a simple number string, treat it as G$ and convert to wei + // If it's already in wei format (very large number), use it as-is + const numValue = value.trim(); + if (numValue.includes('.') || numValue.length < 15) { + // Treat as decimal G$ value and convert to wei + return ethers.utils.parseEther(numValue); + } else { + // Assume it's already in wei format + return ethers.BigNumber.from(numValue); + } + }; + + const dailyLimit = parseLimit(limitsConfig.dailyLimit); + const txLimit = parseLimit(limitsConfig.txLimit); + const accountDailyLimit = parseLimit(limitsConfig.accountDailyLimit); + const minAmount = parseLimit(limitsConfig.minAmount); + const onlyWhitelisted = limitsConfig.onlyWhitelisted !== undefined ? limitsConfig.onlyWhitelisted : null; + + // Prepare new limits struct (use current values if not provided) + const newLimits = { + dailyLimit: dailyLimit !== null ? dailyLimit : currentLimits.dailyLimit, + txLimit: txLimit !== null ? txLimit : currentLimits.txLimit, + accountDailyLimit: accountDailyLimit !== null ? accountDailyLimit : currentLimits.accountDailyLimit, + minAmount: minAmount !== null ? minAmount : currentLimits.minAmount, + onlyWhitelisted: onlyWhitelisted !== null ? onlyWhitelisted : currentLimits.onlyWhitelisted + }; + + // Check if limits are changing + const limitsChanged = + !newLimits.dailyLimit.eq(currentLimits.dailyLimit) || + !newLimits.txLimit.eq(currentLimits.txLimit) || + !newLimits.accountDailyLimit.eq(currentLimits.accountDailyLimit) || + !newLimits.minAmount.eq(currentLimits.minAmount) || + newLimits.onlyWhitelisted !== currentLimits.onlyWhitelisted; + + if (!limitsChanged) { + console.log("\n✅ All limits are already set to the requested values. No transactions needed."); + return; + } + + console.log("\n📝 New bridge limits to set:"); + console.log("Daily Limit:", ethers.utils.formatEther(newLimits.dailyLimit), "G$"); + console.log("Transaction Limit:", ethers.utils.formatEther(newLimits.txLimit), "G$"); + console.log("Account Daily Limit:", ethers.utils.formatEther(newLimits.accountDailyLimit), "G$"); + console.log("Min Amount:", ethers.utils.formatEther(newLimits.minAmount), "G$"); + console.log("Only Whitelisted:", newLimits.onlyWhitelisted); + + // Execute setBridgeLimits directly (signer must be the OFT adapter owner) + try { + console.log("\nExecuting setBridgeLimits..."); + const tx = await oftAdapter.setBridgeLimits(newLimits); + await tx.wait(); + console.log("✅ Transaction confirmed:", tx.hash); + + // Verify the limits were set + console.log("\nVerifying limits were set..."); + const updatedLimits = await oftAdapter.bridgeLimits(); + + console.log("\nUpdated bridge limits:"); + console.log("Daily Limit:", ethers.utils.formatEther(updatedLimits.dailyLimit), "G$"); + console.log("Transaction Limit:", ethers.utils.formatEther(updatedLimits.txLimit), "G$"); + console.log("Account Daily Limit:", ethers.utils.formatEther(updatedLimits.accountDailyLimit), "G$"); + console.log("Min Amount:", ethers.utils.formatEther(updatedLimits.minAmount), "G$"); + console.log("Only Whitelisted:", updatedLimits.onlyWhitelisted); + + console.log("\n✅ Successfully set bridge limits!"); + + } catch (error: any) { + console.error("\n❌ Error setting limits:"); + if (error.message) { + console.error("Error message:", error.message); + } + if (error.reason) { + console.error("Reason:", error.reason); + } + throw error; + } +}; + +if (require.main === module) { + main() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); +} diff --git a/packages/bridge-contracts/test/oft/set-oft-operator.ts b/packages/bridge-contracts/test/oft/set-oft-operator.ts new file mode 100644 index 0000000..8e8d8cc --- /dev/null +++ b/packages/bridge-contracts/test/oft/set-oft-operator.ts @@ -0,0 +1,132 @@ +/*** + * Script to set OFT adapter as operator on GoodDollarOFTMinterBurner via DAO governance + * + * This script must be run after deploying the OFT contracts. + * It sets the GoodDollarOFTAdapter as an operator on GoodDollarOFTMinterBurner, + * which allows the adapter to mint and burn tokens for cross-chain transfers. + * + * This operation requires DAO governance since MinterBurner is DAO-controlled. + */ + +import { network, ethers } from 'hardhat'; +import Contracts from '@gooddollar/goodprotocol/releases/deployment.json'; +import { getOftDeploymentAddresses } from '../../deploy/utils/getOftDeploymentAddresses'; + +const { name: networkName } = network; + +export const setOFTOperator = async () => { + const [root] = await ethers.getSigners(); + + console.log('Setting OFT operator:', { + networkName, + root: root.address, + balance: await ethers.provider.getBalance(root.address).then((_) => _.toString()), + }); + + // Get contract addresses from GoodProtocol deployment + const goodProtocolContracts = Contracts[networkName as keyof typeof Contracts] as any; + if (!goodProtocolContracts) { + throw new Error( + `No GoodProtocol contracts found for network ${networkName}. Please check @gooddollar/goodprotocol/releases/deployment.json`, + ); + } + + // Get Controller address directly from GoodProtocol contracts (or via NameService if needed) + let controllerAddress = goodProtocolContracts.Controller; + if (!controllerAddress) { + // Fallback: try to get Controller via NameService interface + const nameServiceAddress = goodProtocolContracts.NameService; + if (!nameServiceAddress) { + throw new Error( + `NameService address not found in GoodProtocol deployment for network ${networkName}. Please deploy NameService first.`, + ); + } + const INameService = await ethers.getContractAt( + '@gooddollar/goodprotocol/contracts/Interfaces.sol:INameService', + nameServiceAddress, + ); + controllerAddress = await INameService.getAddress('CONTROLLER'); + if (!controllerAddress || controllerAddress === ethers.constants.AddressZero) { + throw new Error(`Controller address not found in GoodProtocol deployment for network ${networkName}`); + } + } + + // Get deployed contract addresses (from hardhat-deploy `deployments/` artifacts) + const { GoodDollarOFTMinterBurner: minterBurnerAddress, GoodDollarOFTAdapter: oftAdapterAddress } = + getOftDeploymentAddresses(networkName); + + console.log('Contract addresses:', { + MinterBurner: minterBurnerAddress, + OFTAdapter: oftAdapterAddress, + }); + + // Get Controller and Avatar addresses + const Controller = await ethers.getContractAt('Controller', controllerAddress); + const avatarAddress = await Controller.avatar(); + + if (!avatarAddress || avatarAddress === ethers.constants.AddressZero) { + throw new Error(`Avatar address is invalid: ${avatarAddress}`); + } + + // Get MinterBurner contract + const MinterBurner = await ethers.getContractAt('GoodDollarOFTMinterBurner', minterBurnerAddress); + + // Check if OFT adapter is already an operator + const isOperator = await MinterBurner.operators(oftAdapterAddress); + + if (!isOperator) { + console.log('Setting OFT adapter as operator on MinterBurner via DAO...'); + console.log(` MinterBurner address: ${minterBurnerAddress}`); + console.log(` OFTAdapter address: ${oftAdapterAddress}`); + + // Encode the setOperator function call + const setOperatorEncoded = MinterBurner.interface.encodeFunctionData('setOperator', [oftAdapterAddress, true]); + + // Execute via Controller/Avatar + try { + const tx = await Controller.genericCall(minterBurnerAddress, setOperatorEncoded, avatarAddress, 0); + await tx.wait(); + console.log('✅ Successfully set OFT adapter as operator on MinterBurner'); + console.log('Transaction hash:', tx.hash); + + // Verify it was set + const isOperatorAfter = await MinterBurner.operators(oftAdapterAddress); + if (isOperatorAfter) { + console.log('✅ Verified: OFT adapter is now an operator'); + } else { + console.log('⚠️ Warning: Operator status not set. Please check the transaction.'); + } + } catch (error: any) { + console.error('❌ Error setting operator:'); + if (error.message) { + console.error('Error message:', error.message); + } + if (error.reason) { + console.error('Reason:', error.reason); + } + throw error; + } + } else { + console.log('✅ OFT adapter is already an operator on MinterBurner'); + } + + console.log('\n=== Operator Setup Summary ==='); + console.log('Network:', networkName); + console.log('GoodDollarOFTMinterBurner:', minterBurnerAddress); + console.log('GoodDollarOFTAdapter:', oftAdapterAddress); + console.log('Operator Status:', isOperator ? 'Already set' : 'Set successfully'); + console.log('==============================\n'); +}; + +export const main = async () => { + await setOFTOperator(); +}; + +if (require.main === module) { + main() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); +} diff --git a/packages/bridge-contracts/test/oft/transfer-oft-adapter-ownership-from-avatar.ts b/packages/bridge-contracts/test/oft/transfer-oft-adapter-ownership-from-avatar.ts new file mode 100644 index 0000000..551a271 --- /dev/null +++ b/packages/bridge-contracts/test/oft/transfer-oft-adapter-ownership-from-avatar.ts @@ -0,0 +1,164 @@ +/*** + * Script to transfer ownership of GoodDollarOFTAdapter from DAO Avatar to current signer + * + * Usage: + * yarn hardhat run test/oft/transfer-oft-adapter-ownership-from-avatar.ts --network development-celo + * yarn hardhat run test/oft/transfer-oft-adapter-ownership-from-avatar.ts --network development-xdc + * + * Note: This script must be run by an account that can execute DAO proposals. + * If the Avatar owns the contract, ownership transfer must go through the Controller. + */ + +import { network, ethers } from "hardhat"; +import Contracts from "@gooddollar/goodprotocol/releases/deployment.json"; +import { getOftDeploymentAddresses } from "../../deploy/utils/getOftDeploymentAddresses"; + +const main = async () => { + const networkName = network.name; + const [signer] = await ethers.getSigners(); + + console.log("=== Transfer GoodDollarOFTAdapter Ownership from Avatar to Signer ==="); + console.log("Network:", networkName); + console.log("Signer:", signer.address); + console.log("Signer balance:", ethers.utils.formatEther(await ethers.provider.getBalance(signer.address)), "ETH/CELO/XDC"); + console.log(""); + + // Get deployment info + const { GoodDollarOFTAdapter: oftAdapterAddress } = getOftDeploymentAddresses(networkName); + const goodProtocolContracts = Contracts[networkName as keyof typeof Contracts] as any; + + if (!goodProtocolContracts) { + throw new Error(`No GoodProtocol contracts found for network: ${networkName}`); + } + + const avatarAddress = goodProtocolContracts.Avatar; + const controllerAddress = goodProtocolContracts.Controller; + + if (!avatarAddress) { + throw new Error(`Avatar not found in GoodProtocol deployment.json for ${networkName}`); + } + + if (!controllerAddress) { + throw new Error(`Controller not found in GoodProtocol deployment.json for ${networkName}`); + } + + console.log("Contract addresses:"); + console.log("GoodDollarOFTAdapter:", oftAdapterAddress); + console.log("Avatar:", avatarAddress); + console.log("Controller:", controllerAddress); + console.log(""); + + // Get OFT adapter contract + const oftAdapter = await ethers.getContractAt("GoodDollarOFTAdapter", oftAdapterAddress); + + // Get current owner + let currentOwner: string; + try { + currentOwner = await oftAdapter.owner(); + console.log("Current owner:", currentOwner); + } catch (e: any) { + throw new Error(`Could not read owner: ${e.message}`); + } + + // Check if already owned by signer + if (currentOwner.toLowerCase() === signer.address.toLowerCase()) { + console.log("\n✅ GoodDollarOFTAdapter is already owned by signer. No action needed."); + return; + } + + // Check if owned by Avatar + const isAvatarOwner = currentOwner.toLowerCase() === avatarAddress.toLowerCase(); + + if (!isAvatarOwner) { + console.log("\n❌ Error: Current owner is not the Avatar."); + console.log(`Current owner: ${currentOwner}`); + console.log(`Expected owner (Avatar): ${avatarAddress}`); + console.log("\nThis script can only transfer ownership FROM the Avatar."); + console.log("If you need to transfer from a different owner, use transferOwnership directly."); + throw new Error("Current owner is not the Avatar"); + } + + console.log("✅ Current owner is Avatar. Proceeding with ownership transfer..."); + console.log("Target owner (signer):", signer.address); + console.log(""); + + // Transfer ownership from Avatar to signer + // Since Avatar is the owner, we need to call through Controller + try { + console.log("Transferring ownership from Avatar to signer through Controller..."); + + const Controller = await ethers.getContractAt("Controller", controllerAddress); + + // Encode transferOwnership(address newOwner) + const functionSignature = "transferOwnership(address)"; + const functionSelector = ethers.utils.id(functionSignature).slice(0, 10); + const encodedParams = ethers.utils.defaultAbiCoder.encode( + ["address"], + [signer.address] + ); + const encodedCall = ethers.utils.hexConcat([functionSelector, encodedParams]); + + console.log("Encoded function call:", encodedCall); + console.log("Calling Controller.genericCall..."); + + const tx = await Controller.genericCall( + oftAdapterAddress, + encodedCall, + avatarAddress, + 0 + ); + + console.log("Transaction hash:", tx.hash); + console.log("Waiting for confirmation..."); + + const receipt = await tx.wait(); + console.log("✅ Transaction confirmed!"); + console.log("Block number:", receipt.blockNumber); + console.log("Gas used:", receipt.gasUsed.toString()); + + // Verify ownership was transferred + console.log("\nVerifying ownership transfer..."); + const newOwner = await oftAdapter.owner(); + console.log("New owner:", newOwner); + + if (newOwner.toLowerCase() === signer.address.toLowerCase()) { + console.log("\n✅ Successfully transferred ownership from Avatar to signer!"); + console.log(`Contract is now owned by: ${signer.address}`); + } else { + console.log("\n⚠️ Warning: Ownership was not transferred correctly."); + console.log("Expected:", signer.address); + console.log("Got:", newOwner); + throw new Error("Ownership transfer verification failed"); + } + + } catch (error: any) { + console.error("\n❌ Error transferring ownership:"); + if (error.message) { + console.error("Error message:", error.message); + } + if (error.reason) { + console.error("Reason:", error.reason); + } + if (error.data) { + console.error("Error data:", error.data); + } + + // Provide helpful error messages + if (error.message?.includes("genericCall") || error.message?.includes("Controller")) { + console.error("\n💡 Tip: Make sure you have permission to execute DAO proposals."); + console.error(" The Controller.genericCall requires proper DAO permissions."); + } + + throw error; + } +}; + +if (require.main === module) { + main() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); +} + diff --git a/packages/bridge-contracts/test/oft/transfer-oft-adapter-ownership.ts b/packages/bridge-contracts/test/oft/transfer-oft-adapter-ownership.ts new file mode 100644 index 0000000..0fe808d --- /dev/null +++ b/packages/bridge-contracts/test/oft/transfer-oft-adapter-ownership.ts @@ -0,0 +1,201 @@ +/*** + * Script to transfer ownership of GoodDollarOFTAdapter to DAO Avatar + * + * Usage: + * npx hardhat run test/oft/transfer-oft-adapter-ownership.ts --network development-celo + * + * Note: This script must be run by the current owner of the OFT adapter. + * If the current owner is not the signer, you'll need to run this script from the owner's account. + */ + +import { network, ethers } from "hardhat"; +import Contracts from "@gooddollar/goodprotocol/releases/deployment.json"; +import { getOftDeploymentAddresses } from "../../deploy/utils/getOftDeploymentAddresses"; + +const main = async () => { + const networkName = network.name; + const [signer] = await ethers.getSigners(); + + console.log("=== Transfer GoodDollarOFTAdapter Ownership to Avatar ==="); + console.log("Network:", networkName); + console.log("Signer:", signer.address); + console.log("Signer balance:", ethers.utils.formatEther(await ethers.provider.getBalance(signer.address)), "ETH/CELO"); + + // Get deployment info + const { GoodDollarOFTAdapter: oftAdapterAddress, GoodDollarOFTMinterBurner: minterBurnerAddress } = + getOftDeploymentAddresses(networkName); + const goodProtocolContracts = Contracts[networkName as keyof typeof Contracts] as any; + + if (!goodProtocolContracts) { + throw new Error(`No GoodProtocol contracts found for network: ${networkName}`); + } + + const avatarAddress = goodProtocolContracts.Avatar; + + + if (!avatarAddress) { + throw new Error(`Avatar not found in GoodProtocol deployment.json for ${networkName}`); + } + + console.log("\nContract addresses:"); + console.log("GoodDollarOFTAdapter:", oftAdapterAddress); + console.log("Avatar:", avatarAddress); + + // Get OFT adapter contract + const oftAdapter = await ethers.getContractAt("GoodDollarOFTAdapter", oftAdapterAddress); + + // Get current owner + let currentOwner: string; + try { + currentOwner = await oftAdapter.owner(); + } catch (e: any) { + // If owner() fails, contract might not be initialized + console.log("⚠️ Warning: Could not read owner. Contract may not be initialized."); + currentOwner = ethers.constants.AddressZero; + } + + console.log("\nCurrent owner:", currentOwner); + console.log("Target owner (Avatar):", avatarAddress); + + // Check if already owned by Avatar + if (currentOwner.toLowerCase() === avatarAddress.toLowerCase()) { + console.log("\n✅ GoodDollarOFTAdapter is already owned by Avatar. No action needed."); + return; + } + + // If owner is zero, try to initialize the contract first + if (currentOwner === ethers.constants.AddressZero) { + console.log("\n⚠️ Owner is zero address. Contract may not be initialized."); + console.log("Attempting to initialize the contract..."); + + // Get required addresses for initialization + const tokenAddress = goodProtocolContracts.GoodDollar || goodProtocolContracts.SuperGoodDollar; + // Loaded from hardhat-deploy artifacts + const nameServiceAddress = goodProtocolContracts.NameService; + const controllerAddress = goodProtocolContracts.Controller; + + if (!tokenAddress || !minterBurnerAddress || !nameServiceAddress) { + throw new Error( + `Cannot initialize: Missing required addresses. ` + + `Token: ${tokenAddress}, MinterBurner: ${minterBurnerAddress}, NameService: ${nameServiceAddress}` + ); + } + + // Get LayerZero endpoint (from network config or environment) + const lzEndpoint = networkName.includes("xdc") + ? "0x9740FF91F1985D8d2B71494aE1A2f723bb3Ed9E4" // XDC endpoint + : "0x3A73033C0b1407574C76BdBAc67f126f6b4a9AA9"; // CELO endpoint + + const feeRecipient = avatarAddress; // Use Avatar as fee recipient + + try { + console.log("Initializing with parameters:"); + console.log(" Token:", tokenAddress); + console.log(" MinterBurner:", minterBurnerAddress); + console.log(" LZ Endpoint:", lzEndpoint); + console.log(" Owner (Avatar):", avatarAddress); + console.log(" Fee Recipient:", feeRecipient); + console.log(" NameService:", nameServiceAddress); + + const initTx = await oftAdapter.initialize( + tokenAddress, + minterBurnerAddress, + lzEndpoint, + avatarAddress, // Set Avatar as owner during initialization + feeRecipient, + ); + await initTx.wait(); + console.log("✅ Contract initialized successfully!"); + console.log("Transaction hash:", initTx.hash); + + // Verify owner was set + const newOwner = await oftAdapter.owner(); + console.log("New owner after initialization:", newOwner); + + if (newOwner.toLowerCase() === avatarAddress.toLowerCase()) { + console.log("\n✅ Contract initialized and ownership set to Avatar!"); + return; + } else { + console.log("\n⚠️ Warning: Initialization completed but owner is not Avatar."); + console.log("Expected:", avatarAddress); + console.log("Got:", newOwner); + // Continue to try transfer ownership below + currentOwner = newOwner; + } + } catch (initError: any) { + const errorMsg = initError.message || initError.reason || ""; + if (errorMsg.includes("already initialized") || errorMsg.includes("Initializable: contract is already initialized")) { + console.log("⚠️ Contract is already initialized (detected via error)"); + } else { + console.error("❌ Initialization failed:", errorMsg); + throw initError; + } + } + } + + // Check if signer is the current owner (after potential initialization) + if (currentOwner !== ethers.constants.AddressZero && currentOwner.toLowerCase() !== signer.address.toLowerCase()) { + console.log("\n❌ Error: Current owner is not the signer."); + console.log(`Current owner: ${currentOwner}`); + console.log(`Signer: ${signer.address}`); + console.log("\nTo transfer ownership, you must run this script from the owner's account."); + console.log("Alternatively, the current owner can manually call:"); + console.log(` oftAdapter.transferOwnership("${avatarAddress}")`); + throw new Error("Signer is not the current owner"); + } + + // If we reach here and owner is still zero, we can't transfer + if (currentOwner === ethers.constants.AddressZero) { + throw new Error( + "Cannot transfer ownership: Contract owner is zero address and initialization failed.\n" + + "The contract may need to be redeployed. Please check the contract deployment and initialization." + ); + } + + console.log("\n✅ Signer is the current owner. Proceeding with ownership transfer..."); + + // Transfer ownership to Avatar + try { + console.log("\nTransferring ownership to Avatar..."); + const tx = await oftAdapter.transferOwnership(avatarAddress); + console.log("Transaction hash:", tx.hash); + console.log("Waiting for confirmation..."); + + const receipt = await tx.wait(); + console.log("✅ Transaction confirmed!"); + console.log("Block number:", receipt.blockNumber); + console.log("Gas used:", receipt.gasUsed.toString()); + + // Verify ownership was transferred + console.log("\nVerifying ownership transfer..."); + const newOwner = await oftAdapter.owner(); + console.log("New owner:", newOwner); + + if (newOwner.toLowerCase() === avatarAddress.toLowerCase()) { + console.log("\n✅ Successfully transferred ownership to Avatar!"); + } else { + console.log("\n⚠️ Warning: Ownership was not transferred correctly."); + console.log("Expected:", avatarAddress); + console.log("Got:", newOwner); + } + + } catch (error: any) { + console.error("\n❌ Error transferring ownership:"); + if (error.message) { + console.error("Error message:", error.message); + } + if (error.reason) { + console.error("Reason:", error.reason); + } + throw error; + } +}; + +if (require.main === module) { + main() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); +} diff --git a/packages/bridge-contracts/typechain-types/common.ts b/packages/bridge-contracts/typechain-types/common.ts deleted file mode 100644 index 4c90b08..0000000 --- a/packages/bridge-contracts/typechain-types/common.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { Listener } from "@ethersproject/providers"; -import type { Event, EventFilter } from "ethers"; - -export interface TypedEvent< - TArgsArray extends Array = any, - TArgsObject = any -> extends Event { - args: TArgsArray & TArgsObject; -} - -export interface TypedEventFilter<_TEvent extends TypedEvent> - extends EventFilter {} - -export interface TypedListener { - (...listenerArg: [...__TypechainArgsArray, TEvent]): void; -} - -type __TypechainArgsArray = T extends TypedEvent ? U : never; - -export interface OnEvent { - ( - eventFilter: TypedEventFilter, - listener: TypedListener - ): TRes; - (eventName: string, listener: Listener): TRes; -} - -export type MinEthersFactory = { - deploy(...a: ARGS[]): Promise; -}; - -export type GetContractTypeFromFactory = F extends MinEthersFactory< - infer C, - any -> - ? C - : never; - -export type GetARGsTypeFromFactory = F extends MinEthersFactory - ? Parameters - : never; - -export type PromiseOrValue = T | Promise; diff --git a/packages/bridge-contracts/typechain-types/contracts/BlockHeaderRegistry.ts b/packages/bridge-contracts/typechain-types/contracts/BlockHeaderRegistry.ts deleted file mode 100644 index 2e2f33a..0000000 --- a/packages/bridge-contracts/typechain-types/contracts/BlockHeaderRegistry.ts +++ /dev/null @@ -1,612 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { - FunctionFragment, - Result, - EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "../common"; - -export declare namespace BlockHeaderRegistry { - export type SignatureStruct = { - r: PromiseOrValue; - vs: PromiseOrValue; - }; - - export type SignatureStructOutput = [string, string] & { - r: string; - vs: string; - }; - - export type BlockStruct = { - rlpHeader: PromiseOrValue; - signature: BlockHeaderRegistry.SignatureStruct; - chainId: PromiseOrValue; - blockHash: PromiseOrValue; - cycleEnd: PromiseOrValue; - validators: PromiseOrValue[]; - }; - - export type BlockStructOutput = [ - string, - BlockHeaderRegistry.SignatureStructOutput, - BigNumber, - string, - BigNumber, - string[] - ] & { - rlpHeader: string; - signature: BlockHeaderRegistry.SignatureStructOutput; - chainId: BigNumber; - blockHash: string; - cycleEnd: BigNumber; - validators: string[]; - }; - - export type BlockchainStruct = { - rpc: PromiseOrValue; - chainId: PromiseOrValue; - }; - - export type BlockchainStructOutput = [string, BigNumber] & { - rpc: string; - chainId: BigNumber; - }; - - export type SignedBlockStruct = { - signatures: PromiseOrValue[]; - cycleEnd: PromiseOrValue; - validators: PromiseOrValue[]; - blockHash: PromiseOrValue; - }; - - export type SignedBlockStructOutput = [ - string[], - BigNumber, - string[], - string - ] & { - signatures: string[]; - cycleEnd: BigNumber; - validators: string[]; - blockHash: string; - }; -} - -export interface BlockHeaderRegistryInterface extends utils.Interface { - functions: { - "addBlockchain(uint256,string)": FunctionFragment; - "addSignedBlocks((bytes,(bytes32,bytes32),uint256,bytes32,uint256,address[])[])": FunctionFragment; - "blockHashes(uint256,uint256,uint256)": FunctionFragment; - "consensus()": FunctionFragment; - "enabledBlockchains(uint256)": FunctionFragment; - "getBlockHashByPayloadHash(bytes32)": FunctionFragment; - "getRPCs()": FunctionFragment; - "getSignedBlock(uint256,uint256)": FunctionFragment; - "hasValidatorSigned(bytes32,address)": FunctionFragment; - "parseRLPBlockNumber(bytes)": FunctionFragment; - "signedBlocks(bytes32)": FunctionFragment; - "voting()": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "addBlockchain" - | "addSignedBlocks" - | "blockHashes" - | "consensus" - | "enabledBlockchains" - | "getBlockHashByPayloadHash" - | "getRPCs" - | "getSignedBlock" - | "hasValidatorSigned" - | "parseRLPBlockNumber" - | "signedBlocks" - | "voting" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "addBlockchain", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "addSignedBlocks", - values: [BlockHeaderRegistry.BlockStruct[]] - ): string; - encodeFunctionData( - functionFragment: "blockHashes", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData(functionFragment: "consensus", values?: undefined): string; - encodeFunctionData( - functionFragment: "enabledBlockchains", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "getBlockHashByPayloadHash", - values: [PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "getRPCs", values?: undefined): string; - encodeFunctionData( - functionFragment: "getSignedBlock", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "hasValidatorSigned", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "parseRLPBlockNumber", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "signedBlocks", - values: [PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "voting", values?: undefined): string; - - decodeFunctionResult( - functionFragment: "addBlockchain", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "addSignedBlocks", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "blockHashes", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "consensus", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "enabledBlockchains", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getBlockHashByPayloadHash", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "getRPCs", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "getSignedBlock", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "hasValidatorSigned", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "parseRLPBlockNumber", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "signedBlocks", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "voting", data: BytesLike): Result; - - events: { - "BlockAdded(address,uint256,bytes32,address[],uint256)": EventFragment; - "BlockchainAdded(uint256,string)": EventFragment; - "BlockchainRemoved(uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "BlockAdded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "BlockchainAdded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "BlockchainRemoved"): EventFragment; -} - -export interface BlockAddedEventObject { - validator: string; - chainId: BigNumber; - rlpHeaderHash: string; - validators: string[]; - cycleEnd: BigNumber; -} -export type BlockAddedEvent = TypedEvent< - [string, BigNumber, string, string[], BigNumber], - BlockAddedEventObject ->; - -export type BlockAddedEventFilter = TypedEventFilter; - -export interface BlockchainAddedEventObject { - chainId: BigNumber; - rpc: string; -} -export type BlockchainAddedEvent = TypedEvent< - [BigNumber, string], - BlockchainAddedEventObject ->; - -export type BlockchainAddedEventFilter = TypedEventFilter; - -export interface BlockchainRemovedEventObject { - chainId: BigNumber; -} -export type BlockchainRemovedEvent = TypedEvent< - [BigNumber], - BlockchainRemovedEventObject ->; - -export type BlockchainRemovedEventFilter = - TypedEventFilter; - -export interface BlockHeaderRegistry extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: BlockHeaderRegistryInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - addBlockchain( - chainId: PromiseOrValue, - rpc: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addSignedBlocks( - blocks: BlockHeaderRegistry.BlockStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - blockHashes( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - arg2: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - consensus(overrides?: CallOverrides): Promise<[string]>; - - enabledBlockchains( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string, BigNumber] & { rpc: string; chainId: BigNumber }>; - - getBlockHashByPayloadHash( - payloadHash: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string] & { blockHash: string }>; - - getRPCs( - overrides?: CallOverrides - ): Promise<[BlockHeaderRegistry.BlockchainStructOutput[]]>; - - getSignedBlock( - chainId: PromiseOrValue, - number: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BlockHeaderRegistry.SignedBlockStructOutput] & { - signedBlock: BlockHeaderRegistry.SignedBlockStructOutput; - } - >; - - hasValidatorSigned( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - parseRLPBlockNumber( - rlpHeader: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { blockNumber: BigNumber }>; - - signedBlocks( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, string] & { cycleEnd: BigNumber; blockHash: string } - >; - - voting(overrides?: CallOverrides): Promise<[string]>; - }; - - addBlockchain( - chainId: PromiseOrValue, - rpc: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addSignedBlocks( - blocks: BlockHeaderRegistry.BlockStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - blockHashes( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - arg2: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - consensus(overrides?: CallOverrides): Promise; - - enabledBlockchains( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string, BigNumber] & { rpc: string; chainId: BigNumber }>; - - getBlockHashByPayloadHash( - payloadHash: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRPCs( - overrides?: CallOverrides - ): Promise; - - getSignedBlock( - chainId: PromiseOrValue, - number: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - hasValidatorSigned( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - parseRLPBlockNumber( - rlpHeader: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - signedBlocks( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber, string] & { cycleEnd: BigNumber; blockHash: string }>; - - voting(overrides?: CallOverrides): Promise; - - callStatic: { - addBlockchain( - chainId: PromiseOrValue, - rpc: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - addSignedBlocks( - blocks: BlockHeaderRegistry.BlockStruct[], - overrides?: CallOverrides - ): Promise; - - blockHashes( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - arg2: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - consensus(overrides?: CallOverrides): Promise; - - enabledBlockchains( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string, BigNumber] & { rpc: string; chainId: BigNumber }>; - - getBlockHashByPayloadHash( - payloadHash: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRPCs( - overrides?: CallOverrides - ): Promise; - - getSignedBlock( - chainId: PromiseOrValue, - number: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - hasValidatorSigned( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - parseRLPBlockNumber( - rlpHeader: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - signedBlocks( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, string] & { cycleEnd: BigNumber; blockHash: string } - >; - - voting(overrides?: CallOverrides): Promise; - }; - - filters: { - "BlockAdded(address,uint256,bytes32,address[],uint256)"( - validator?: PromiseOrValue | null, - chainId?: PromiseOrValue | null, - rlpHeaderHash?: PromiseOrValue | null, - validators?: null, - cycleEnd?: null - ): BlockAddedEventFilter; - BlockAdded( - validator?: PromiseOrValue | null, - chainId?: PromiseOrValue | null, - rlpHeaderHash?: PromiseOrValue | null, - validators?: null, - cycleEnd?: null - ): BlockAddedEventFilter; - - "BlockchainAdded(uint256,string)"( - chainId?: null, - rpc?: null - ): BlockchainAddedEventFilter; - BlockchainAdded(chainId?: null, rpc?: null): BlockchainAddedEventFilter; - - "BlockchainRemoved(uint256)"(chainId?: null): BlockchainRemovedEventFilter; - BlockchainRemoved(chainId?: null): BlockchainRemovedEventFilter; - }; - - estimateGas: { - addBlockchain( - chainId: PromiseOrValue, - rpc: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addSignedBlocks( - blocks: BlockHeaderRegistry.BlockStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - blockHashes( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - arg2: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - consensus(overrides?: CallOverrides): Promise; - - enabledBlockchains( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBlockHashByPayloadHash( - payloadHash: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRPCs(overrides?: CallOverrides): Promise; - - getSignedBlock( - chainId: PromiseOrValue, - number: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - hasValidatorSigned( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - parseRLPBlockNumber( - rlpHeader: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - signedBlocks( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - voting(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - addBlockchain( - chainId: PromiseOrValue, - rpc: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addSignedBlocks( - blocks: BlockHeaderRegistry.BlockStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - blockHashes( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - arg2: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - consensus(overrides?: CallOverrides): Promise; - - enabledBlockchains( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBlockHashByPayloadHash( - payloadHash: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRPCs(overrides?: CallOverrides): Promise; - - getSignedBlock( - chainId: PromiseOrValue, - number: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - hasValidatorSigned( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - parseRLPBlockNumber( - rlpHeader: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - signedBlocks( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - voting(overrides?: CallOverrides): Promise; - }; -} diff --git a/packages/bridge-contracts/typechain-types/contracts/blockRegistry/BlockHeaderRegistry.ts b/packages/bridge-contracts/typechain-types/contracts/blockRegistry/BlockHeaderRegistry.ts deleted file mode 100644 index fd05bc8..0000000 --- a/packages/bridge-contracts/typechain-types/contracts/blockRegistry/BlockHeaderRegistry.ts +++ /dev/null @@ -1,886 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PayableOverrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { - FunctionFragment, - Result, - EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "../../common"; - -export declare namespace BlockHeaderRegistry { - export type SignatureStruct = { - r: PromiseOrValue; - vs: PromiseOrValue; - }; - - export type SignatureStructOutput = [string, string] & { - r: string; - vs: string; - }; - - export type BlockStruct = { - rlpHeader: PromiseOrValue; - signature: BlockHeaderRegistry.SignatureStruct; - chainId: PromiseOrValue; - blockHash: PromiseOrValue; - cycleEnd: PromiseOrValue; - validators: PromiseOrValue[]; - }; - - export type BlockStructOutput = [ - string, - BlockHeaderRegistry.SignatureStructOutput, - BigNumber, - string, - BigNumber, - string[] - ] & { - rlpHeader: string; - signature: BlockHeaderRegistry.SignatureStructOutput; - chainId: BigNumber; - blockHash: string; - cycleEnd: BigNumber; - validators: string[]; - }; - - export type BlockchainStruct = { - rpc: PromiseOrValue; - chainId: PromiseOrValue; - }; - - export type BlockchainStructOutput = [string, BigNumber] & { - rpc: string; - chainId: BigNumber; - }; - - export type SignedBlockStruct = { - signatures: PromiseOrValue[]; - cycleEnd: PromiseOrValue; - validators: PromiseOrValue[]; - blockHash: PromiseOrValue; - }; - - export type SignedBlockStructOutput = [ - string[], - BigNumber, - string[], - string - ] & { - signatures: string[]; - cycleEnd: BigNumber; - validators: string[]; - blockHash: string; - }; -} - -export interface BlockHeaderRegistryInterface extends utils.Interface { - functions: { - "addBlockchain(uint256,string)": FunctionFragment; - "addSignedBlocks((bytes,(bytes32,bytes32),uint256,bytes32,uint256,address[])[])": FunctionFragment; - "blockHashes(uint256,uint256,uint256)": FunctionFragment; - "cachedValidators(address)": FunctionFragment; - "consensus()": FunctionFragment; - "enabledBlockchains(uint256)": FunctionFragment; - "getBlockHashByPayloadHash(bytes32)": FunctionFragment; - "getRPCs()": FunctionFragment; - "getSignedBlock(uint256,uint256)": FunctionFragment; - "hasValidatorSigned(bytes32,address)": FunctionFragment; - "initialize(address,address,bool)": FunctionFragment; - "isEventsOnly()": FunctionFragment; - "parseRLPBlockNumber(bytes,uint256)": FunctionFragment; - "proxiableUUID()": FunctionFragment; - "signedBlocks(bytes32)": FunctionFragment; - "upgradeTo(address)": FunctionFragment; - "upgradeToAndCall(address,bytes)": FunctionFragment; - "voting()": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "addBlockchain" - | "addSignedBlocks" - | "blockHashes" - | "cachedValidators" - | "consensus" - | "enabledBlockchains" - | "getBlockHashByPayloadHash" - | "getRPCs" - | "getSignedBlock" - | "hasValidatorSigned" - | "initialize" - | "isEventsOnly" - | "parseRLPBlockNumber" - | "proxiableUUID" - | "signedBlocks" - | "upgradeTo" - | "upgradeToAndCall" - | "voting" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "addBlockchain", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "addSignedBlocks", - values: [BlockHeaderRegistry.BlockStruct[]] - ): string; - encodeFunctionData( - functionFragment: "blockHashes", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "cachedValidators", - values: [PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "consensus", values?: undefined): string; - encodeFunctionData( - functionFragment: "enabledBlockchains", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "getBlockHashByPayloadHash", - values: [PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "getRPCs", values?: undefined): string; - encodeFunctionData( - functionFragment: "getSignedBlock", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "hasValidatorSigned", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "initialize", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "isEventsOnly", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "parseRLPBlockNumber", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "proxiableUUID", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "signedBlocks", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "upgradeTo", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "upgradeToAndCall", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "voting", values?: undefined): string; - - decodeFunctionResult( - functionFragment: "addBlockchain", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "addSignedBlocks", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "blockHashes", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "cachedValidators", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "consensus", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "enabledBlockchains", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getBlockHashByPayloadHash", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "getRPCs", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "getSignedBlock", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "hasValidatorSigned", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "isEventsOnly", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "parseRLPBlockNumber", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "proxiableUUID", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "signedBlocks", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "upgradeTo", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "upgradeToAndCall", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "voting", data: BytesLike): Result; - - events: { - "AdminChanged(address,address)": EventFragment; - "BeaconUpgraded(address)": EventFragment; - "BlockAdded(address,uint256,uint256,bytes32,address[],uint256,bytes)": EventFragment; - "BlockchainAdded(uint256,string)": EventFragment; - "BlockchainRemoved(uint256)": EventFragment; - "Initialized(uint8)": EventFragment; - "Upgraded(address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "AdminChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "BeaconUpgraded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "BlockAdded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "BlockchainAdded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "BlockchainRemoved"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Upgraded"): EventFragment; -} - -export interface AdminChangedEventObject { - previousAdmin: string; - newAdmin: string; -} -export type AdminChangedEvent = TypedEvent< - [string, string], - AdminChangedEventObject ->; - -export type AdminChangedEventFilter = TypedEventFilter; - -export interface BeaconUpgradedEventObject { - beacon: string; -} -export type BeaconUpgradedEvent = TypedEvent< - [string], - BeaconUpgradedEventObject ->; - -export type BeaconUpgradedEventFilter = TypedEventFilter; - -export interface BlockAddedEventObject { - validator: string; - chainId: BigNumber; - blockNumber: BigNumber; - payload: string; - validators: string[]; - cycleEnd: BigNumber; - signature: string; -} -export type BlockAddedEvent = TypedEvent< - [string, BigNumber, BigNumber, string, string[], BigNumber, string], - BlockAddedEventObject ->; - -export type BlockAddedEventFilter = TypedEventFilter; - -export interface BlockchainAddedEventObject { - chainId: BigNumber; - rpc: string; -} -export type BlockchainAddedEvent = TypedEvent< - [BigNumber, string], - BlockchainAddedEventObject ->; - -export type BlockchainAddedEventFilter = TypedEventFilter; - -export interface BlockchainRemovedEventObject { - chainId: BigNumber; -} -export type BlockchainRemovedEvent = TypedEvent< - [BigNumber], - BlockchainRemovedEventObject ->; - -export type BlockchainRemovedEventFilter = - TypedEventFilter; - -export interface InitializedEventObject { - version: number; -} -export type InitializedEvent = TypedEvent<[number], InitializedEventObject>; - -export type InitializedEventFilter = TypedEventFilter; - -export interface UpgradedEventObject { - implementation: string; -} -export type UpgradedEvent = TypedEvent<[string], UpgradedEventObject>; - -export type UpgradedEventFilter = TypedEventFilter; - -export interface BlockHeaderRegistry extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: BlockHeaderRegistryInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - addBlockchain( - chainId: PromiseOrValue, - rpc: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addSignedBlocks( - blocks: BlockHeaderRegistry.BlockStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - blockHashes( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - arg2: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - cachedValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - consensus(overrides?: CallOverrides): Promise<[string]>; - - enabledBlockchains( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string, BigNumber] & { rpc: string; chainId: BigNumber }>; - - getBlockHashByPayloadHash( - payloadHash: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string] & { blockHash: string }>; - - getRPCs( - overrides?: CallOverrides - ): Promise<[BlockHeaderRegistry.BlockchainStructOutput[]]>; - - getSignedBlock( - chainId: PromiseOrValue, - number: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BlockHeaderRegistry.SignedBlockStructOutput] & { - signedBlock: BlockHeaderRegistry.SignedBlockStructOutput; - } - >; - - hasValidatorSigned( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - initialize( - _voting: PromiseOrValue, - _consensus: PromiseOrValue, - _isEventsOnly: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isEventsOnly(overrides?: CallOverrides): Promise<[boolean]>; - - parseRLPBlockNumber( - rlpHeader: PromiseOrValue, - chainId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { blockNumber: BigNumber }>; - - proxiableUUID(overrides?: CallOverrides): Promise<[string]>; - - signedBlocks( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, string] & { cycleEnd: BigNumber; blockHash: string } - >; - - upgradeTo( - newImplementation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - upgradeToAndCall( - newImplementation: PromiseOrValue, - data: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - voting(overrides?: CallOverrides): Promise<[string]>; - }; - - addBlockchain( - chainId: PromiseOrValue, - rpc: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addSignedBlocks( - blocks: BlockHeaderRegistry.BlockStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - blockHashes( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - arg2: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - cachedValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - consensus(overrides?: CallOverrides): Promise; - - enabledBlockchains( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string, BigNumber] & { rpc: string; chainId: BigNumber }>; - - getBlockHashByPayloadHash( - payloadHash: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRPCs( - overrides?: CallOverrides - ): Promise; - - getSignedBlock( - chainId: PromiseOrValue, - number: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - hasValidatorSigned( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - initialize( - _voting: PromiseOrValue, - _consensus: PromiseOrValue, - _isEventsOnly: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isEventsOnly(overrides?: CallOverrides): Promise; - - parseRLPBlockNumber( - rlpHeader: PromiseOrValue, - chainId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - proxiableUUID(overrides?: CallOverrides): Promise; - - signedBlocks( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber, string] & { cycleEnd: BigNumber; blockHash: string }>; - - upgradeTo( - newImplementation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - upgradeToAndCall( - newImplementation: PromiseOrValue, - data: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - voting(overrides?: CallOverrides): Promise; - - callStatic: { - addBlockchain( - chainId: PromiseOrValue, - rpc: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - addSignedBlocks( - blocks: BlockHeaderRegistry.BlockStruct[], - overrides?: CallOverrides - ): Promise; - - blockHashes( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - arg2: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - cachedValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - consensus(overrides?: CallOverrides): Promise; - - enabledBlockchains( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string, BigNumber] & { rpc: string; chainId: BigNumber }>; - - getBlockHashByPayloadHash( - payloadHash: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRPCs( - overrides?: CallOverrides - ): Promise; - - getSignedBlock( - chainId: PromiseOrValue, - number: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - hasValidatorSigned( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - initialize( - _voting: PromiseOrValue, - _consensus: PromiseOrValue, - _isEventsOnly: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isEventsOnly(overrides?: CallOverrides): Promise; - - parseRLPBlockNumber( - rlpHeader: PromiseOrValue, - chainId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - proxiableUUID(overrides?: CallOverrides): Promise; - - signedBlocks( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, string] & { cycleEnd: BigNumber; blockHash: string } - >; - - upgradeTo( - newImplementation: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - upgradeToAndCall( - newImplementation: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - voting(overrides?: CallOverrides): Promise; - }; - - filters: { - "AdminChanged(address,address)"( - previousAdmin?: null, - newAdmin?: null - ): AdminChangedEventFilter; - AdminChanged( - previousAdmin?: null, - newAdmin?: null - ): AdminChangedEventFilter; - - "BeaconUpgraded(address)"( - beacon?: PromiseOrValue | null - ): BeaconUpgradedEventFilter; - BeaconUpgraded( - beacon?: PromiseOrValue | null - ): BeaconUpgradedEventFilter; - - "BlockAdded(address,uint256,uint256,bytes32,address[],uint256,bytes)"( - validator?: PromiseOrValue | null, - chainId?: PromiseOrValue | null, - blockNumber?: PromiseOrValue | null, - payload?: null, - validators?: null, - cycleEnd?: null, - signature?: null - ): BlockAddedEventFilter; - BlockAdded( - validator?: PromiseOrValue | null, - chainId?: PromiseOrValue | null, - blockNumber?: PromiseOrValue | null, - payload?: null, - validators?: null, - cycleEnd?: null, - signature?: null - ): BlockAddedEventFilter; - - "BlockchainAdded(uint256,string)"( - chainId?: null, - rpc?: null - ): BlockchainAddedEventFilter; - BlockchainAdded(chainId?: null, rpc?: null): BlockchainAddedEventFilter; - - "BlockchainRemoved(uint256)"(chainId?: null): BlockchainRemovedEventFilter; - BlockchainRemoved(chainId?: null): BlockchainRemovedEventFilter; - - "Initialized(uint8)"(version?: null): InitializedEventFilter; - Initialized(version?: null): InitializedEventFilter; - - "Upgraded(address)"( - implementation?: PromiseOrValue | null - ): UpgradedEventFilter; - Upgraded( - implementation?: PromiseOrValue | null - ): UpgradedEventFilter; - }; - - estimateGas: { - addBlockchain( - chainId: PromiseOrValue, - rpc: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addSignedBlocks( - blocks: BlockHeaderRegistry.BlockStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - blockHashes( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - arg2: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - cachedValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - consensus(overrides?: CallOverrides): Promise; - - enabledBlockchains( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBlockHashByPayloadHash( - payloadHash: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRPCs(overrides?: CallOverrides): Promise; - - getSignedBlock( - chainId: PromiseOrValue, - number: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - hasValidatorSigned( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - initialize( - _voting: PromiseOrValue, - _consensus: PromiseOrValue, - _isEventsOnly: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isEventsOnly(overrides?: CallOverrides): Promise; - - parseRLPBlockNumber( - rlpHeader: PromiseOrValue, - chainId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - proxiableUUID(overrides?: CallOverrides): Promise; - - signedBlocks( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - upgradeTo( - newImplementation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - upgradeToAndCall( - newImplementation: PromiseOrValue, - data: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - voting(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - addBlockchain( - chainId: PromiseOrValue, - rpc: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addSignedBlocks( - blocks: BlockHeaderRegistry.BlockStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - blockHashes( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - arg2: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - cachedValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - consensus(overrides?: CallOverrides): Promise; - - enabledBlockchains( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBlockHashByPayloadHash( - payloadHash: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRPCs(overrides?: CallOverrides): Promise; - - getSignedBlock( - chainId: PromiseOrValue, - number: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - hasValidatorSigned( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - initialize( - _voting: PromiseOrValue, - _consensus: PromiseOrValue, - _isEventsOnly: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isEventsOnly(overrides?: CallOverrides): Promise; - - parseRLPBlockNumber( - rlpHeader: PromiseOrValue, - chainId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - proxiableUUID(overrides?: CallOverrides): Promise; - - signedBlocks( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - upgradeTo( - newImplementation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - upgradeToAndCall( - newImplementation: PromiseOrValue, - data: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - voting(overrides?: CallOverrides): Promise; - }; -} diff --git a/packages/bridge-contracts/typechain-types/contracts/blockRegistry/index.ts b/packages/bridge-contracts/typechain-types/contracts/blockRegistry/index.ts deleted file mode 100644 index 6c1f950..0000000 --- a/packages/bridge-contracts/typechain-types/contracts/blockRegistry/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { BlockHeaderRegistry } from "./BlockHeaderRegistry"; diff --git a/packages/bridge-contracts/typechain-types/contracts/bridge/BridgeCore.ts b/packages/bridge-contracts/typechain-types/contracts/bridge/BridgeCore.ts deleted file mode 100644 index c8c5534..0000000 --- a/packages/bridge-contracts/typechain-types/contracts/bridge/BridgeCore.ts +++ /dev/null @@ -1,601 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { - FunctionFragment, - Result, - EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "../../common"; - -export declare namespace MPT { - export type MerkleProofStruct = { - expectedRoot: PromiseOrValue; - key: PromiseOrValue; - proof: PromiseOrValue[]; - keyIndex: PromiseOrValue; - proofIndex: PromiseOrValue; - expectedValue: PromiseOrValue; - }; - - export type MerkleProofStructOutput = [ - string, - string, - string[], - BigNumber, - BigNumber, - string - ] & { - expectedRoot: string; - key: string; - proof: string[]; - keyIndex: BigNumber; - proofIndex: BigNumber; - expectedValue: string; - }; -} - -export declare namespace BridgeCore { - export type BlockReceiptProofsStruct = { - receiptProofs: MPT.MerkleProofStruct[]; - blockHeaderRlp: PromiseOrValue; - blockNumber: PromiseOrValue; - }; - - export type BlockReceiptProofsStructOutput = [ - MPT.MerkleProofStructOutput[], - string, - BigNumber - ] & { - receiptProofs: MPT.MerkleProofStructOutput[]; - blockHeaderRlp: string; - blockNumber: BigNumber; - }; - - export type SignedBlockStruct = { - chainId: PromiseOrValue; - rlpHeader: PromiseOrValue; - signatures: PromiseOrValue[]; - cycleEnd: PromiseOrValue; - validators: PromiseOrValue[]; - }; - - export type SignedBlockStructOutput = [ - BigNumber, - string, - string[], - BigNumber, - string[] - ] & { - chainId: BigNumber; - rlpHeader: string; - signatures: string[]; - cycleEnd: BigNumber; - validators: string[]; - }; -} - -export interface BridgeCoreInterface extends utils.Interface { - functions: { - "chainStartBlock(uint256)": FunctionFragment; - "chainVerifiedBlocks(uint256,uint256)": FunctionFragment; - "currentValidators(address)": FunctionFragment; - "executeReceipts(uint256,((bytes32,bytes,bytes[],uint256,uint256,bytes)[],bytes,uint256)[])": FunctionFragment; - "isValidConsensus(address[])": FunctionFragment; - "numValidators()": FunctionFragment; - "submitBlocks((uint256,bytes,bytes[],uint256,address[])[])": FunctionFragment; - "submitChainBlockParentsAndTxs((uint256,bytes,bytes[],uint256,address[]),uint256,bytes[],((bytes32,bytes,bytes[],uint256,uint256,bytes)[],bytes,uint256)[])": FunctionFragment; - "usedReceipts(bytes32)": FunctionFragment; - "validatorsCycleEnd()": FunctionFragment; - "verifyParentBlocks(uint256,uint256,bytes[],bytes)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "chainStartBlock" - | "chainVerifiedBlocks" - | "currentValidators" - | "executeReceipts" - | "isValidConsensus" - | "numValidators" - | "submitBlocks" - | "submitChainBlockParentsAndTxs" - | "usedReceipts" - | "validatorsCycleEnd" - | "verifyParentBlocks" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "chainStartBlock", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "chainVerifiedBlocks", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "currentValidators", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "executeReceipts", - values: [ - PromiseOrValue, - BridgeCore.BlockReceiptProofsStruct[] - ] - ): string; - encodeFunctionData( - functionFragment: "isValidConsensus", - values: [PromiseOrValue[]] - ): string; - encodeFunctionData( - functionFragment: "numValidators", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "submitBlocks", - values: [BridgeCore.SignedBlockStruct[]] - ): string; - encodeFunctionData( - functionFragment: "submitChainBlockParentsAndTxs", - values: [ - BridgeCore.SignedBlockStruct, - PromiseOrValue, - PromiseOrValue[], - BridgeCore.BlockReceiptProofsStruct[] - ] - ): string; - encodeFunctionData( - functionFragment: "usedReceipts", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "validatorsCycleEnd", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "verifyParentBlocks", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue[], - PromiseOrValue - ] - ): string; - - decodeFunctionResult( - functionFragment: "chainStartBlock", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "chainVerifiedBlocks", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "currentValidators", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "executeReceipts", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "isValidConsensus", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "numValidators", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "submitBlocks", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "submitChainBlockParentsAndTxs", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "usedReceipts", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "validatorsCycleEnd", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "verifyParentBlocks", - data: BytesLike - ): Result; - - events: { - "BlockVerified(uint256,uint256,bytes32)": EventFragment; - "ValidatorsSet(address[],uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "BlockVerified"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ValidatorsSet"): EventFragment; -} - -export interface BlockVerifiedEventObject { - chainId: BigNumber; - blockNumber: BigNumber; - blockHash: string; -} -export type BlockVerifiedEvent = TypedEvent< - [BigNumber, BigNumber, string], - BlockVerifiedEventObject ->; - -export type BlockVerifiedEventFilter = TypedEventFilter; - -export interface ValidatorsSetEventObject { - validators: string[]; - cycleEnd: BigNumber; -} -export type ValidatorsSetEvent = TypedEvent< - [string[], BigNumber], - ValidatorsSetEventObject ->; - -export type ValidatorsSetEventFilter = TypedEventFilter; - -export interface BridgeCore extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: BridgeCoreInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - chainStartBlock( - chainId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { bridgeStartBlock: BigNumber }>; - - chainVerifiedBlocks( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - currentValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - executeReceipts( - chainId: PromiseOrValue, - blocks: BridgeCore.BlockReceiptProofsStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isValidConsensus( - signers: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - numValidators(overrides?: CallOverrides): Promise<[BigNumber]>; - - submitBlocks( - signedBlocks: BridgeCore.SignedBlockStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - submitChainBlockParentsAndTxs( - blockData: BridgeCore.SignedBlockStruct, - signedBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - txs: BridgeCore.BlockReceiptProofsStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - usedReceipts( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - validatorsCycleEnd(overrides?: CallOverrides): Promise<[BigNumber]>; - - verifyParentBlocks( - chainId: PromiseOrValue, - childBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - childRlpHeader: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - chainStartBlock( - chainId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - chainVerifiedBlocks( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - currentValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - executeReceipts( - chainId: PromiseOrValue, - blocks: BridgeCore.BlockReceiptProofsStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isValidConsensus( - signers: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - numValidators(overrides?: CallOverrides): Promise; - - submitBlocks( - signedBlocks: BridgeCore.SignedBlockStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - submitChainBlockParentsAndTxs( - blockData: BridgeCore.SignedBlockStruct, - signedBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - txs: BridgeCore.BlockReceiptProofsStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - usedReceipts( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - validatorsCycleEnd(overrides?: CallOverrides): Promise; - - verifyParentBlocks( - chainId: PromiseOrValue, - childBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - childRlpHeader: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - chainStartBlock( - chainId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - chainVerifiedBlocks( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - currentValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - executeReceipts( - chainId: PromiseOrValue, - blocks: BridgeCore.BlockReceiptProofsStruct[], - overrides?: CallOverrides - ): Promise; - - isValidConsensus( - signers: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - numValidators(overrides?: CallOverrides): Promise; - - submitBlocks( - signedBlocks: BridgeCore.SignedBlockStruct[], - overrides?: CallOverrides - ): Promise; - - submitChainBlockParentsAndTxs( - blockData: BridgeCore.SignedBlockStruct, - signedBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - txs: BridgeCore.BlockReceiptProofsStruct[], - overrides?: CallOverrides - ): Promise; - - usedReceipts( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - validatorsCycleEnd(overrides?: CallOverrides): Promise; - - verifyParentBlocks( - chainId: PromiseOrValue, - childBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - childRlpHeader: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "BlockVerified(uint256,uint256,bytes32)"( - chainId?: null, - blockNumber?: null, - blockHash?: null - ): BlockVerifiedEventFilter; - BlockVerified( - chainId?: null, - blockNumber?: null, - blockHash?: null - ): BlockVerifiedEventFilter; - - "ValidatorsSet(address[],uint256)"( - validators?: null, - cycleEnd?: null - ): ValidatorsSetEventFilter; - ValidatorsSet(validators?: null, cycleEnd?: null): ValidatorsSetEventFilter; - }; - - estimateGas: { - chainStartBlock( - chainId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - chainVerifiedBlocks( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - currentValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - executeReceipts( - chainId: PromiseOrValue, - blocks: BridgeCore.BlockReceiptProofsStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isValidConsensus( - signers: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - numValidators(overrides?: CallOverrides): Promise; - - submitBlocks( - signedBlocks: BridgeCore.SignedBlockStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - submitChainBlockParentsAndTxs( - blockData: BridgeCore.SignedBlockStruct, - signedBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - txs: BridgeCore.BlockReceiptProofsStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - usedReceipts( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - validatorsCycleEnd(overrides?: CallOverrides): Promise; - - verifyParentBlocks( - chainId: PromiseOrValue, - childBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - childRlpHeader: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - chainStartBlock( - chainId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - chainVerifiedBlocks( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - currentValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - executeReceipts( - chainId: PromiseOrValue, - blocks: BridgeCore.BlockReceiptProofsStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isValidConsensus( - signers: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - numValidators(overrides?: CallOverrides): Promise; - - submitBlocks( - signedBlocks: BridgeCore.SignedBlockStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - submitChainBlockParentsAndTxs( - blockData: BridgeCore.SignedBlockStruct, - signedBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - txs: BridgeCore.BlockReceiptProofsStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - usedReceipts( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - validatorsCycleEnd( - overrides?: CallOverrides - ): Promise; - - verifyParentBlocks( - chainId: PromiseOrValue, - childBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - childRlpHeader: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; -} diff --git a/packages/bridge-contracts/typechain-types/contracts/bridge/BridgeMixedConsensus.ts b/packages/bridge-contracts/typechain-types/contracts/bridge/BridgeMixedConsensus.ts deleted file mode 100644 index d81d609..0000000 --- a/packages/bridge-contracts/typechain-types/contracts/bridge/BridgeMixedConsensus.ts +++ /dev/null @@ -1,928 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { - FunctionFragment, - Result, - EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "../../common"; - -export declare namespace MPT { - export type MerkleProofStruct = { - expectedRoot: PromiseOrValue; - key: PromiseOrValue; - proof: PromiseOrValue[]; - keyIndex: PromiseOrValue; - proofIndex: PromiseOrValue; - expectedValue: PromiseOrValue; - }; - - export type MerkleProofStructOutput = [ - string, - string, - string[], - BigNumber, - BigNumber, - string - ] & { - expectedRoot: string; - key: string; - proof: string[]; - keyIndex: BigNumber; - proofIndex: BigNumber; - expectedValue: string; - }; -} - -export declare namespace BridgeCore { - export type BlockReceiptProofsStruct = { - receiptProofs: MPT.MerkleProofStruct[]; - blockHeaderRlp: PromiseOrValue; - blockNumber: PromiseOrValue; - }; - - export type BlockReceiptProofsStructOutput = [ - MPT.MerkleProofStructOutput[], - string, - BigNumber - ] & { - receiptProofs: MPT.MerkleProofStructOutput[]; - blockHeaderRlp: string; - blockNumber: BigNumber; - }; - - export type SignedBlockStruct = { - chainId: PromiseOrValue; - rlpHeader: PromiseOrValue; - signatures: PromiseOrValue[]; - cycleEnd: PromiseOrValue; - validators: PromiseOrValue[]; - }; - - export type SignedBlockStructOutput = [ - BigNumber, - string, - string[], - BigNumber, - string[] - ] & { - chainId: BigNumber; - rlpHeader: string; - signatures: string[]; - cycleEnd: BigNumber; - validators: string[]; - }; -} - -export interface BridgeMixedConsensusInterface extends utils.Interface { - functions: { - "admin()": FunctionFragment; - "chainStartBlock(uint256)": FunctionFragment; - "chainVerifiedBlocks(uint256,uint256)": FunctionFragment; - "consensusRatio()": FunctionFragment; - "currentValidators(address)": FunctionFragment; - "executeReceipts(uint256,((bytes32,bytes,bytes[],uint256,uint256,bytes)[],bytes,uint256)[])": FunctionFragment; - "isValidConsensus(address[])": FunctionFragment; - "numRequiredValidators()": FunctionFragment; - "numValidators()": FunctionFragment; - "owner()": FunctionFragment; - "renounceOwnership()": FunctionFragment; - "requiredValidators(address)": FunctionFragment; - "requiredValidatorsSet()": FunctionFragment; - "setAdmin(address)": FunctionFragment; - "setConsensusRatio(uint32)": FunctionFragment; - "setRequiredValidators(address[])": FunctionFragment; - "submitBlocks((uint256,bytes,bytes[],uint256,address[])[])": FunctionFragment; - "submitChainBlockParentsAndTxs((uint256,bytes,bytes[],uint256,address[]),uint256,bytes[],((bytes32,bytes,bytes[],uint256,uint256,bytes)[],bytes,uint256)[])": FunctionFragment; - "transferOwnership(address)": FunctionFragment; - "usedReceipts(bytes32)": FunctionFragment; - "validatorsCycleEnd()": FunctionFragment; - "verifyParentBlocks(uint256,uint256,bytes[],bytes)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "admin" - | "chainStartBlock" - | "chainVerifiedBlocks" - | "consensusRatio" - | "currentValidators" - | "executeReceipts" - | "isValidConsensus" - | "numRequiredValidators" - | "numValidators" - | "owner" - | "renounceOwnership" - | "requiredValidators" - | "requiredValidatorsSet" - | "setAdmin" - | "setConsensusRatio" - | "setRequiredValidators" - | "submitBlocks" - | "submitChainBlockParentsAndTxs" - | "transferOwnership" - | "usedReceipts" - | "validatorsCycleEnd" - | "verifyParentBlocks" - ): FunctionFragment; - - encodeFunctionData(functionFragment: "admin", values?: undefined): string; - encodeFunctionData( - functionFragment: "chainStartBlock", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "chainVerifiedBlocks", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "consensusRatio", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "currentValidators", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "executeReceipts", - values: [ - PromiseOrValue, - BridgeCore.BlockReceiptProofsStruct[] - ] - ): string; - encodeFunctionData( - functionFragment: "isValidConsensus", - values: [PromiseOrValue[]] - ): string; - encodeFunctionData( - functionFragment: "numRequiredValidators", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "numValidators", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "owner", values?: undefined): string; - encodeFunctionData( - functionFragment: "renounceOwnership", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "requiredValidators", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "requiredValidatorsSet", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "setAdmin", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setConsensusRatio", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setRequiredValidators", - values: [PromiseOrValue[]] - ): string; - encodeFunctionData( - functionFragment: "submitBlocks", - values: [BridgeCore.SignedBlockStruct[]] - ): string; - encodeFunctionData( - functionFragment: "submitChainBlockParentsAndTxs", - values: [ - BridgeCore.SignedBlockStruct, - PromiseOrValue, - PromiseOrValue[], - BridgeCore.BlockReceiptProofsStruct[] - ] - ): string; - encodeFunctionData( - functionFragment: "transferOwnership", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "usedReceipts", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "validatorsCycleEnd", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "verifyParentBlocks", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue[], - PromiseOrValue - ] - ): string; - - decodeFunctionResult(functionFragment: "admin", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "chainStartBlock", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "chainVerifiedBlocks", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "consensusRatio", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "currentValidators", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "executeReceipts", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "isValidConsensus", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "numRequiredValidators", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "numValidators", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "renounceOwnership", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "requiredValidators", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "requiredValidatorsSet", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "setAdmin", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "setConsensusRatio", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setRequiredValidators", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "submitBlocks", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "submitChainBlockParentsAndTxs", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "transferOwnership", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "usedReceipts", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "validatorsCycleEnd", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "verifyParentBlocks", - data: BytesLike - ): Result; - - events: { - "BlockVerified(uint256,uint256,bytes32)": EventFragment; - "Initialized(uint8)": EventFragment; - "OwnershipTransferred(address,address)": EventFragment; - "ValidatorsSet(address[],uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "BlockVerified"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment; - getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ValidatorsSet"): EventFragment; -} - -export interface BlockVerifiedEventObject { - chainId: BigNumber; - blockNumber: BigNumber; - blockHash: string; -} -export type BlockVerifiedEvent = TypedEvent< - [BigNumber, BigNumber, string], - BlockVerifiedEventObject ->; - -export type BlockVerifiedEventFilter = TypedEventFilter; - -export interface InitializedEventObject { - version: number; -} -export type InitializedEvent = TypedEvent<[number], InitializedEventObject>; - -export type InitializedEventFilter = TypedEventFilter; - -export interface OwnershipTransferredEventObject { - previousOwner: string; - newOwner: string; -} -export type OwnershipTransferredEvent = TypedEvent< - [string, string], - OwnershipTransferredEventObject ->; - -export type OwnershipTransferredEventFilter = - TypedEventFilter; - -export interface ValidatorsSetEventObject { - validators: string[]; - cycleEnd: BigNumber; -} -export type ValidatorsSetEvent = TypedEvent< - [string[], BigNumber], - ValidatorsSetEventObject ->; - -export type ValidatorsSetEventFilter = TypedEventFilter; - -export interface BridgeMixedConsensus extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: BridgeMixedConsensusInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - admin(overrides?: CallOverrides): Promise<[string]>; - - chainStartBlock( - chainId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { bridgeStartBlock: BigNumber }>; - - chainVerifiedBlocks( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - consensusRatio(overrides?: CallOverrides): Promise<[number]>; - - currentValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - executeReceipts( - chainId: PromiseOrValue, - blocks: BridgeCore.BlockReceiptProofsStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isValidConsensus( - signers: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - numRequiredValidators(overrides?: CallOverrides): Promise<[number]>; - - numValidators(overrides?: CallOverrides): Promise<[BigNumber]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - - renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - requiredValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - requiredValidatorsSet(overrides?: CallOverrides): Promise<[BigNumber]>; - - setAdmin( - _admin: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setConsensusRatio( - _consensusRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRequiredValidators( - validators: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - submitBlocks( - signedBlocks: BridgeCore.SignedBlockStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - submitChainBlockParentsAndTxs( - blockData: BridgeCore.SignedBlockStruct, - signedBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - txs: BridgeCore.BlockReceiptProofsStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - usedReceipts( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - validatorsCycleEnd(overrides?: CallOverrides): Promise<[BigNumber]>; - - verifyParentBlocks( - chainId: PromiseOrValue, - childBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - childRlpHeader: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - admin(overrides?: CallOverrides): Promise; - - chainStartBlock( - chainId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - chainVerifiedBlocks( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - consensusRatio(overrides?: CallOverrides): Promise; - - currentValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - executeReceipts( - chainId: PromiseOrValue, - blocks: BridgeCore.BlockReceiptProofsStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isValidConsensus( - signers: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - numRequiredValidators(overrides?: CallOverrides): Promise; - - numValidators(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - requiredValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - requiredValidatorsSet(overrides?: CallOverrides): Promise; - - setAdmin( - _admin: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setConsensusRatio( - _consensusRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRequiredValidators( - validators: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - submitBlocks( - signedBlocks: BridgeCore.SignedBlockStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - submitChainBlockParentsAndTxs( - blockData: BridgeCore.SignedBlockStruct, - signedBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - txs: BridgeCore.BlockReceiptProofsStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - usedReceipts( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - validatorsCycleEnd(overrides?: CallOverrides): Promise; - - verifyParentBlocks( - chainId: PromiseOrValue, - childBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - childRlpHeader: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - admin(overrides?: CallOverrides): Promise; - - chainStartBlock( - chainId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - chainVerifiedBlocks( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - consensusRatio(overrides?: CallOverrides): Promise; - - currentValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - executeReceipts( - chainId: PromiseOrValue, - blocks: BridgeCore.BlockReceiptProofsStruct[], - overrides?: CallOverrides - ): Promise; - - isValidConsensus( - signers: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - numRequiredValidators(overrides?: CallOverrides): Promise; - - numValidators(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - renounceOwnership(overrides?: CallOverrides): Promise; - - requiredValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - requiredValidatorsSet(overrides?: CallOverrides): Promise; - - setAdmin( - _admin: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setConsensusRatio( - _consensusRatio: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setRequiredValidators( - validators: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - submitBlocks( - signedBlocks: BridgeCore.SignedBlockStruct[], - overrides?: CallOverrides - ): Promise; - - submitChainBlockParentsAndTxs( - blockData: BridgeCore.SignedBlockStruct, - signedBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - txs: BridgeCore.BlockReceiptProofsStruct[], - overrides?: CallOverrides - ): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - usedReceipts( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - validatorsCycleEnd(overrides?: CallOverrides): Promise; - - verifyParentBlocks( - chainId: PromiseOrValue, - childBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - childRlpHeader: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "BlockVerified(uint256,uint256,bytes32)"( - chainId?: null, - blockNumber?: null, - blockHash?: null - ): BlockVerifiedEventFilter; - BlockVerified( - chainId?: null, - blockNumber?: null, - blockHash?: null - ): BlockVerifiedEventFilter; - - "Initialized(uint8)"(version?: null): InitializedEventFilter; - Initialized(version?: null): InitializedEventFilter; - - "OwnershipTransferred(address,address)"( - previousOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): OwnershipTransferredEventFilter; - OwnershipTransferred( - previousOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): OwnershipTransferredEventFilter; - - "ValidatorsSet(address[],uint256)"( - validators?: null, - cycleEnd?: null - ): ValidatorsSetEventFilter; - ValidatorsSet(validators?: null, cycleEnd?: null): ValidatorsSetEventFilter; - }; - - estimateGas: { - admin(overrides?: CallOverrides): Promise; - - chainStartBlock( - chainId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - chainVerifiedBlocks( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - consensusRatio(overrides?: CallOverrides): Promise; - - currentValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - executeReceipts( - chainId: PromiseOrValue, - blocks: BridgeCore.BlockReceiptProofsStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isValidConsensus( - signers: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - numRequiredValidators(overrides?: CallOverrides): Promise; - - numValidators(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - requiredValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - requiredValidatorsSet(overrides?: CallOverrides): Promise; - - setAdmin( - _admin: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setConsensusRatio( - _consensusRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRequiredValidators( - validators: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - submitBlocks( - signedBlocks: BridgeCore.SignedBlockStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - submitChainBlockParentsAndTxs( - blockData: BridgeCore.SignedBlockStruct, - signedBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - txs: BridgeCore.BlockReceiptProofsStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - usedReceipts( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - validatorsCycleEnd(overrides?: CallOverrides): Promise; - - verifyParentBlocks( - chainId: PromiseOrValue, - childBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - childRlpHeader: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - admin(overrides?: CallOverrides): Promise; - - chainStartBlock( - chainId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - chainVerifiedBlocks( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - consensusRatio(overrides?: CallOverrides): Promise; - - currentValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - executeReceipts( - chainId: PromiseOrValue, - blocks: BridgeCore.BlockReceiptProofsStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isValidConsensus( - signers: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - numRequiredValidators( - overrides?: CallOverrides - ): Promise; - - numValidators(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - requiredValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - requiredValidatorsSet( - overrides?: CallOverrides - ): Promise; - - setAdmin( - _admin: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setConsensusRatio( - _consensusRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRequiredValidators( - validators: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - submitBlocks( - signedBlocks: BridgeCore.SignedBlockStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - submitChainBlockParentsAndTxs( - blockData: BridgeCore.SignedBlockStruct, - signedBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - txs: BridgeCore.BlockReceiptProofsStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - usedReceipts( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - validatorsCycleEnd( - overrides?: CallOverrides - ): Promise; - - verifyParentBlocks( - chainId: PromiseOrValue, - childBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - childRlpHeader: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; -} diff --git a/packages/bridge-contracts/typechain-types/contracts/bridge/TokenBridge.sol/IFaucet.ts b/packages/bridge-contracts/typechain-types/contracts/bridge/TokenBridge.sol/IFaucet.ts deleted file mode 100644 index a1602e6..0000000 --- a/packages/bridge-contracts/typechain-types/contracts/bridge/TokenBridge.sol/IFaucet.ts +++ /dev/null @@ -1,133 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "../../../common"; - -export interface IFaucetInterface extends utils.Interface { - functions: { - "canTop(address)": FunctionFragment; - "topWallet(address)": FunctionFragment; - }; - - getFunction(nameOrSignatureOrTopic: "canTop" | "topWallet"): FunctionFragment; - - encodeFunctionData( - functionFragment: "canTop", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "topWallet", - values: [PromiseOrValue] - ): string; - - decodeFunctionResult(functionFragment: "canTop", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "topWallet", data: BytesLike): Result; - - events: {}; -} - -export interface IFaucet extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: IFaucetInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - canTop( - arg0: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - topWallet( - arg0: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - canTop( - arg0: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - topWallet( - arg0: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - canTop( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - topWallet( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: {}; - - estimateGas: { - canTop( - arg0: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - topWallet( - arg0: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - canTop( - arg0: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - topWallet( - arg0: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; -} diff --git a/packages/bridge-contracts/typechain-types/contracts/bridge/TokenBridge.sol/IIdentity.ts b/packages/bridge-contracts/typechain-types/contracts/bridge/TokenBridge.sol/IIdentity.ts deleted file mode 100644 index e895e60..0000000 --- a/packages/bridge-contracts/typechain-types/contracts/bridge/TokenBridge.sol/IIdentity.ts +++ /dev/null @@ -1,103 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BytesLike, - CallOverrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "../../../common"; - -export interface IIdentityInterface extends utils.Interface { - functions: { - "isWhitelisted(address)": FunctionFragment; - }; - - getFunction(nameOrSignatureOrTopic: "isWhitelisted"): FunctionFragment; - - encodeFunctionData( - functionFragment: "isWhitelisted", - values: [PromiseOrValue] - ): string; - - decodeFunctionResult( - functionFragment: "isWhitelisted", - data: BytesLike - ): Result; - - events: {}; -} - -export interface IIdentity extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: IIdentityInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - isWhitelisted( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - }; - - isWhitelisted( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - callStatic: { - isWhitelisted( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: {}; - - estimateGas: { - isWhitelisted( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - populateTransaction: { - isWhitelisted( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; -} diff --git a/packages/bridge-contracts/typechain-types/contracts/bridge/TokenBridge.sol/INameService.ts b/packages/bridge-contracts/typechain-types/contracts/bridge/TokenBridge.sol/INameService.ts deleted file mode 100644 index b784513..0000000 --- a/packages/bridge-contracts/typechain-types/contracts/bridge/TokenBridge.sol/INameService.ts +++ /dev/null @@ -1,100 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BytesLike, - CallOverrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "../../../common"; - -export interface INameServiceInterface extends utils.Interface { - functions: { - "getAddress(string)": FunctionFragment; - }; - - getFunction(nameOrSignatureOrTopic: "getAddress"): FunctionFragment; - - encodeFunctionData( - functionFragment: "getAddress", - values: [PromiseOrValue] - ): string; - - decodeFunctionResult(functionFragment: "getAddress", data: BytesLike): Result; - - events: {}; -} - -export interface INameService extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: INameServiceInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - getAddress( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - }; - - getAddress( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - callStatic: { - getAddress( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: {}; - - estimateGas: { - getAddress( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - populateTransaction: { - getAddress( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; -} diff --git a/packages/bridge-contracts/typechain-types/contracts/bridge/TokenBridge.sol/TokenBridge.ts b/packages/bridge-contracts/typechain-types/contracts/bridge/TokenBridge.sol/TokenBridge.ts deleted file mode 100644 index 26d52ba..0000000 --- a/packages/bridge-contracts/typechain-types/contracts/bridge/TokenBridge.sol/TokenBridge.ts +++ /dev/null @@ -1,2155 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PayableOverrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { - FunctionFragment, - Result, - EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "../../../common"; - -export declare namespace MPT { - export type MerkleProofStruct = { - expectedRoot: PromiseOrValue; - key: PromiseOrValue; - proof: PromiseOrValue[]; - keyIndex: PromiseOrValue; - proofIndex: PromiseOrValue; - expectedValue: PromiseOrValue; - }; - - export type MerkleProofStructOutput = [ - string, - string, - string[], - BigNumber, - BigNumber, - string - ] & { - expectedRoot: string; - key: string; - proof: string[]; - keyIndex: BigNumber; - proofIndex: BigNumber; - expectedValue: string; - }; -} - -export declare namespace BridgeCore { - export type BlockReceiptProofsStruct = { - receiptProofs: MPT.MerkleProofStruct[]; - blockHeaderRlp: PromiseOrValue; - blockNumber: PromiseOrValue; - }; - - export type BlockReceiptProofsStructOutput = [ - MPT.MerkleProofStructOutput[], - string, - BigNumber - ] & { - receiptProofs: MPT.MerkleProofStructOutput[]; - blockHeaderRlp: string; - blockNumber: BigNumber; - }; - - export type SignedBlockStruct = { - chainId: PromiseOrValue; - rlpHeader: PromiseOrValue; - signatures: PromiseOrValue[]; - cycleEnd: PromiseOrValue; - validators: PromiseOrValue[]; - }; - - export type SignedBlockStructOutput = [ - BigNumber, - string, - string[], - BigNumber, - string[] - ] & { - chainId: BigNumber; - rlpHeader: string; - signatures: string[]; - cycleEnd: BigNumber; - validators: string[]; - }; -} - -export declare namespace TokenBridge { - export type BridgeFeesStruct = { - minFee: PromiseOrValue; - maxFee: PromiseOrValue; - fee: PromiseOrValue; - }; - - export type BridgeFeesStructOutput = [BigNumber, BigNumber, BigNumber] & { - minFee: BigNumber; - maxFee: BigNumber; - fee: BigNumber; - }; - - export type BridgeLimitsStruct = { - dailyLimit: PromiseOrValue; - txLimit: PromiseOrValue; - accountDailyLimit: PromiseOrValue; - minAmount: PromiseOrValue; - onlyWhitelisted: PromiseOrValue; - }; - - export type BridgeLimitsStructOutput = [ - BigNumber, - BigNumber, - BigNumber, - BigNumber, - boolean - ] & { - dailyLimit: BigNumber; - txLimit: BigNumber; - accountDailyLimit: BigNumber; - minAmount: BigNumber; - onlyWhitelisted: boolean; - }; -} - -export interface TokenBridgeInterface extends utils.Interface { - functions: { - "BRIDGE_TOPIC()": FunctionFragment; - "accountsDailyLimit(address)": FunctionFragment; - "admin()": FunctionFragment; - "bridgeDailyLimit()": FunctionFragment; - "bridgeFees()": FunctionFragment; - "bridgeLimits()": FunctionFragment; - "bridgeTo(address,uint256,uint256)": FunctionFragment; - "bridgeToWithoutRelay(address,uint256,uint256)": FunctionFragment; - "bridgedToken()": FunctionFragment; - "canBridge(address,uint256)": FunctionFragment; - "chainIdToStats(uint256)": FunctionFragment; - "chainStartBlock(uint256)": FunctionFragment; - "chainVerifiedBlocks(uint256,uint256)": FunctionFragment; - "closeBridge(address)": FunctionFragment; - "consensusRatio()": FunctionFragment; - "currentId()": FunctionFragment; - "currentValidators(address)": FunctionFragment; - "executeReceipts(uint256,((bytes32,bytes,bytes[],uint256,uint256,bytes)[],bytes,uint256)[])": FunctionFragment; - "executedRequests(uint256)": FunctionFragment; - "faucet()": FunctionFragment; - "initialize(address[],uint256,address[],uint32,address,(uint256,uint256,uint256),(uint256,uint256,uint256,uint256,bool),address,address)": FunctionFragment; - "isClosed()": FunctionFragment; - "isValidConsensus(address[])": FunctionFragment; - "nameService()": FunctionFragment; - "normalizeFrom18ToTokenDecimals(uint256)": FunctionFragment; - "normalizeFromTokenTo18Decimals(uint256)": FunctionFragment; - "numRequiredValidators()": FunctionFragment; - "numValidators()": FunctionFragment; - "onTokenTransfer(address,uint256,bytes)": FunctionFragment; - "owner()": FunctionFragment; - "proxiableUUID()": FunctionFragment; - "renounceOwnership()": FunctionFragment; - "requiredValidators(address)": FunctionFragment; - "requiredValidatorsSet()": FunctionFragment; - "setAdmin(address)": FunctionFragment; - "setBridgeFees((uint256,uint256,uint256))": FunctionFragment; - "setBridgeLimits((uint256,uint256,uint256,uint256,bool))": FunctionFragment; - "setConsensusRatio(uint32)": FunctionFragment; - "setFaucet(address)": FunctionFragment; - "setRequiredValidators(address[])": FunctionFragment; - "setSourceBridges(address[],uint256[])": FunctionFragment; - "sourceBridgeToBlockstart(address)": FunctionFragment; - "submitBlocks((uint256,bytes,bytes[],uint256,address[])[])": FunctionFragment; - "submitChainBlockParentsAndTxs((uint256,bytes,bytes[],uint256,address[]),uint256,bytes[],((bytes32,bytes,bytes[],uint256,uint256,bytes)[],bytes,uint256)[])": FunctionFragment; - "transferOwnership(address)": FunctionFragment; - "upgradeTo(address)": FunctionFragment; - "upgradeToAndCall(address,bytes)": FunctionFragment; - "usedReceipts(bytes32)": FunctionFragment; - "validatorsCycleEnd()": FunctionFragment; - "verifyParentBlocks(uint256,uint256,bytes[],bytes)": FunctionFragment; - "withdraw(address,uint256)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "BRIDGE_TOPIC" - | "accountsDailyLimit" - | "admin" - | "bridgeDailyLimit" - | "bridgeFees" - | "bridgeLimits" - | "bridgeTo" - | "bridgeToWithoutRelay" - | "bridgedToken" - | "canBridge" - | "chainIdToStats" - | "chainStartBlock" - | "chainVerifiedBlocks" - | "closeBridge" - | "consensusRatio" - | "currentId" - | "currentValidators" - | "executeReceipts" - | "executedRequests" - | "faucet" - | "initialize" - | "isClosed" - | "isValidConsensus" - | "nameService" - | "normalizeFrom18ToTokenDecimals" - | "normalizeFromTokenTo18Decimals" - | "numRequiredValidators" - | "numValidators" - | "onTokenTransfer" - | "owner" - | "proxiableUUID" - | "renounceOwnership" - | "requiredValidators" - | "requiredValidatorsSet" - | "setAdmin" - | "setBridgeFees" - | "setBridgeLimits" - | "setConsensusRatio" - | "setFaucet" - | "setRequiredValidators" - | "setSourceBridges" - | "sourceBridgeToBlockstart" - | "submitBlocks" - | "submitChainBlockParentsAndTxs" - | "transferOwnership" - | "upgradeTo" - | "upgradeToAndCall" - | "usedReceipts" - | "validatorsCycleEnd" - | "verifyParentBlocks" - | "withdraw" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "BRIDGE_TOPIC", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "accountsDailyLimit", - values: [PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "admin", values?: undefined): string; - encodeFunctionData( - functionFragment: "bridgeDailyLimit", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "bridgeFees", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "bridgeLimits", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "bridgeTo", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "bridgeToWithoutRelay", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "bridgedToken", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "canBridge", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "chainIdToStats", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "chainStartBlock", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "chainVerifiedBlocks", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "closeBridge", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "consensusRatio", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "currentId", values?: undefined): string; - encodeFunctionData( - functionFragment: "currentValidators", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "executeReceipts", - values: [ - PromiseOrValue, - BridgeCore.BlockReceiptProofsStruct[] - ] - ): string; - encodeFunctionData( - functionFragment: "executedRequests", - values: [PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "faucet", values?: undefined): string; - encodeFunctionData( - functionFragment: "initialize", - values: [ - PromiseOrValue[], - PromiseOrValue, - PromiseOrValue[], - PromiseOrValue, - PromiseOrValue, - TokenBridge.BridgeFeesStruct, - TokenBridge.BridgeLimitsStruct, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData(functionFragment: "isClosed", values?: undefined): string; - encodeFunctionData( - functionFragment: "isValidConsensus", - values: [PromiseOrValue[]] - ): string; - encodeFunctionData( - functionFragment: "nameService", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "normalizeFrom18ToTokenDecimals", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "normalizeFromTokenTo18Decimals", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "numRequiredValidators", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "numValidators", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "onTokenTransfer", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData(functionFragment: "owner", values?: undefined): string; - encodeFunctionData( - functionFragment: "proxiableUUID", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "renounceOwnership", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "requiredValidators", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "requiredValidatorsSet", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "setAdmin", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setBridgeFees", - values: [TokenBridge.BridgeFeesStruct] - ): string; - encodeFunctionData( - functionFragment: "setBridgeLimits", - values: [TokenBridge.BridgeLimitsStruct] - ): string; - encodeFunctionData( - functionFragment: "setConsensusRatio", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setFaucet", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setRequiredValidators", - values: [PromiseOrValue[]] - ): string; - encodeFunctionData( - functionFragment: "setSourceBridges", - values: [PromiseOrValue[], PromiseOrValue[]] - ): string; - encodeFunctionData( - functionFragment: "sourceBridgeToBlockstart", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "submitBlocks", - values: [BridgeCore.SignedBlockStruct[]] - ): string; - encodeFunctionData( - functionFragment: "submitChainBlockParentsAndTxs", - values: [ - BridgeCore.SignedBlockStruct, - PromiseOrValue, - PromiseOrValue[], - BridgeCore.BlockReceiptProofsStruct[] - ] - ): string; - encodeFunctionData( - functionFragment: "transferOwnership", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "upgradeTo", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "upgradeToAndCall", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "usedReceipts", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "validatorsCycleEnd", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "verifyParentBlocks", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue[], - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "withdraw", - values: [PromiseOrValue, PromiseOrValue] - ): string; - - decodeFunctionResult( - functionFragment: "BRIDGE_TOPIC", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "accountsDailyLimit", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "admin", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "bridgeDailyLimit", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "bridgeFees", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "bridgeLimits", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "bridgeTo", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "bridgeToWithoutRelay", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "bridgedToken", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "canBridge", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "chainIdToStats", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "chainStartBlock", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "chainVerifiedBlocks", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "closeBridge", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "consensusRatio", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "currentId", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "currentValidators", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "executeReceipts", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "executedRequests", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "faucet", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isClosed", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "isValidConsensus", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "nameService", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "normalizeFrom18ToTokenDecimals", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "normalizeFromTokenTo18Decimals", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "numRequiredValidators", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "numValidators", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "onTokenTransfer", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "proxiableUUID", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "renounceOwnership", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "requiredValidators", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "requiredValidatorsSet", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "setAdmin", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "setBridgeFees", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setBridgeLimits", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setConsensusRatio", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "setFaucet", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "setRequiredValidators", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setSourceBridges", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "sourceBridgeToBlockstart", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "submitBlocks", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "submitChainBlockParentsAndTxs", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "transferOwnership", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "upgradeTo", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "upgradeToAndCall", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "usedReceipts", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "validatorsCycleEnd", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "verifyParentBlocks", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result; - - events: { - "AdminChanged(address,address)": EventFragment; - "BeaconUpgraded(address)": EventFragment; - "BlockVerified(uint256,uint256,bytes32)": EventFragment; - "BridgeRequest(address,address,uint256,uint256,bool,uint256,uint256)": EventFragment; - "ExecutedTransfer(address,address,address,uint256,uint256,uint256,uint256,uint256)": EventFragment; - "Initialized(uint8)": EventFragment; - "OwnershipTransferred(address,address)": EventFragment; - "Upgraded(address)": EventFragment; - "ValidatorsSet(address[],uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "AdminChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "BeaconUpgraded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "BlockVerified"): EventFragment; - getEvent(nameOrSignatureOrTopic: "BridgeRequest"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ExecutedTransfer"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment; - getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Upgraded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ValidatorsSet"): EventFragment; -} - -export interface AdminChangedEventObject { - previousAdmin: string; - newAdmin: string; -} -export type AdminChangedEvent = TypedEvent< - [string, string], - AdminChangedEventObject ->; - -export type AdminChangedEventFilter = TypedEventFilter; - -export interface BeaconUpgradedEventObject { - beacon: string; -} -export type BeaconUpgradedEvent = TypedEvent< - [string], - BeaconUpgradedEventObject ->; - -export type BeaconUpgradedEventFilter = TypedEventFilter; - -export interface BlockVerifiedEventObject { - chainId: BigNumber; - blockNumber: BigNumber; - blockHash: string; -} -export type BlockVerifiedEvent = TypedEvent< - [BigNumber, BigNumber, string], - BlockVerifiedEventObject ->; - -export type BlockVerifiedEventFilter = TypedEventFilter; - -export interface BridgeRequestEventObject { - from: string; - to: string; - targetChainId: BigNumber; - amount: BigNumber; - withRelay: boolean; - timestamp: BigNumber; - id: BigNumber; -} -export type BridgeRequestEvent = TypedEvent< - [string, string, BigNumber, BigNumber, boolean, BigNumber, BigNumber], - BridgeRequestEventObject ->; - -export type BridgeRequestEventFilter = TypedEventFilter; - -export interface ExecutedTransferEventObject { - from: string; - to: string; - relayer: string; - amount: BigNumber; - fee: BigNumber; - sourceChainId: BigNumber; - sourceBlockNumber: BigNumber; - id: BigNumber; -} -export type ExecutedTransferEvent = TypedEvent< - [ - string, - string, - string, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber - ], - ExecutedTransferEventObject ->; - -export type ExecutedTransferEventFilter = - TypedEventFilter; - -export interface InitializedEventObject { - version: number; -} -export type InitializedEvent = TypedEvent<[number], InitializedEventObject>; - -export type InitializedEventFilter = TypedEventFilter; - -export interface OwnershipTransferredEventObject { - previousOwner: string; - newOwner: string; -} -export type OwnershipTransferredEvent = TypedEvent< - [string, string], - OwnershipTransferredEventObject ->; - -export type OwnershipTransferredEventFilter = - TypedEventFilter; - -export interface UpgradedEventObject { - implementation: string; -} -export type UpgradedEvent = TypedEvent<[string], UpgradedEventObject>; - -export type UpgradedEventFilter = TypedEventFilter; - -export interface ValidatorsSetEventObject { - validators: string[]; - cycleEnd: BigNumber; -} -export type ValidatorsSetEvent = TypedEvent< - [string[], BigNumber], - ValidatorsSetEventObject ->; - -export type ValidatorsSetEventFilter = TypedEventFilter; - -export interface TokenBridge extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: TokenBridgeInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - BRIDGE_TOPIC(overrides?: CallOverrides): Promise<[string]>; - - accountsDailyLimit( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - lastTransferReset: BigNumber; - bridged24Hours: BigNumber; - } - >; - - admin(overrides?: CallOverrides): Promise<[string]>; - - bridgeDailyLimit( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - lastTransferReset: BigNumber; - bridged24Hours: BigNumber; - } - >; - - bridgeFees( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber] & { - minFee: BigNumber; - maxFee: BigNumber; - fee: BigNumber; - } - >; - - bridgeLimits( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, boolean] & { - dailyLimit: BigNumber; - txLimit: BigNumber; - accountDailyLimit: BigNumber; - minAmount: BigNumber; - onlyWhitelisted: boolean; - } - >; - - bridgeTo( - target: PromiseOrValue, - targetChainId: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - bridgeToWithoutRelay( - target: PromiseOrValue, - targetChainId: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - bridgedToken(overrides?: CallOverrides): Promise<[string]>; - - canBridge( - from: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean, string] & { isWithinLimit: boolean; error: string }>; - - chainIdToStats( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber] & { - totalBridged: BigNumber; - totalRelayFees: BigNumber; - totalBridgeFees: BigNumber; - } - >; - - chainStartBlock( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { bridgeStartBlock: BigNumber }>; - - chainVerifiedBlocks( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - closeBridge( - token: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - consensusRatio(overrides?: CallOverrides): Promise<[number]>; - - currentId(overrides?: CallOverrides): Promise<[BigNumber]>; - - currentValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - executeReceipts( - chainId: PromiseOrValue, - blocks: BridgeCore.BlockReceiptProofsStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - executedRequests( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - faucet(overrides?: CallOverrides): Promise<[string]>; - - initialize( - _validators: PromiseOrValue[], - _cycleEnd: PromiseOrValue, - _requiredValidators: PromiseOrValue[], - _consensusRatio: PromiseOrValue, - _bridgedToken: PromiseOrValue, - _fees: TokenBridge.BridgeFeesStruct, - _limits: TokenBridge.BridgeLimitsStruct, - _faucet: PromiseOrValue, - _nameService: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isClosed(overrides?: CallOverrides): Promise<[boolean]>; - - isValidConsensus( - signers: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - nameService(overrides?: CallOverrides): Promise<[string]>; - - normalizeFrom18ToTokenDecimals( - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { normalized: BigNumber }>; - - normalizeFromTokenTo18Decimals( - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { normalized: BigNumber }>; - - numRequiredValidators(overrides?: CallOverrides): Promise<[number]>; - - numValidators(overrides?: CallOverrides): Promise<[BigNumber]>; - - onTokenTransfer( - from: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise<[string]>; - - proxiableUUID(overrides?: CallOverrides): Promise<[string]>; - - renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - requiredValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - requiredValidatorsSet(overrides?: CallOverrides): Promise<[BigNumber]>; - - setAdmin( - _admin: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setBridgeFees( - _fees: TokenBridge.BridgeFeesStruct, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setBridgeLimits( - _limits: TokenBridge.BridgeLimitsStruct, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setConsensusRatio( - _consensusRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFaucet( - _faucet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRequiredValidators( - validators: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSourceBridges( - bridges: PromiseOrValue[], - blockstart: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sourceBridgeToBlockstart( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - submitBlocks( - signedBlocks: BridgeCore.SignedBlockStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - submitChainBlockParentsAndTxs( - blockData: BridgeCore.SignedBlockStruct, - signedBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - txs: BridgeCore.BlockReceiptProofsStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - upgradeTo( - newImplementation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - upgradeToAndCall( - newImplementation: PromiseOrValue, - data: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - usedReceipts( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - validatorsCycleEnd(overrides?: CallOverrides): Promise<[BigNumber]>; - - verifyParentBlocks( - chainId: PromiseOrValue, - childBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - childRlpHeader: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdraw( - token: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - BRIDGE_TOPIC(overrides?: CallOverrides): Promise; - - accountsDailyLimit( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - lastTransferReset: BigNumber; - bridged24Hours: BigNumber; - } - >; - - admin(overrides?: CallOverrides): Promise; - - bridgeDailyLimit( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - lastTransferReset: BigNumber; - bridged24Hours: BigNumber; - } - >; - - bridgeFees( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber] & { - minFee: BigNumber; - maxFee: BigNumber; - fee: BigNumber; - } - >; - - bridgeLimits( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, boolean] & { - dailyLimit: BigNumber; - txLimit: BigNumber; - accountDailyLimit: BigNumber; - minAmount: BigNumber; - onlyWhitelisted: boolean; - } - >; - - bridgeTo( - target: PromiseOrValue, - targetChainId: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - bridgeToWithoutRelay( - target: PromiseOrValue, - targetChainId: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - bridgedToken(overrides?: CallOverrides): Promise; - - canBridge( - from: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean, string] & { isWithinLimit: boolean; error: string }>; - - chainIdToStats( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber] & { - totalBridged: BigNumber; - totalRelayFees: BigNumber; - totalBridgeFees: BigNumber; - } - >; - - chainStartBlock( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - chainVerifiedBlocks( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - closeBridge( - token: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - consensusRatio(overrides?: CallOverrides): Promise; - - currentId(overrides?: CallOverrides): Promise; - - currentValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - executeReceipts( - chainId: PromiseOrValue, - blocks: BridgeCore.BlockReceiptProofsStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - executedRequests( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - faucet(overrides?: CallOverrides): Promise; - - initialize( - _validators: PromiseOrValue[], - _cycleEnd: PromiseOrValue, - _requiredValidators: PromiseOrValue[], - _consensusRatio: PromiseOrValue, - _bridgedToken: PromiseOrValue, - _fees: TokenBridge.BridgeFeesStruct, - _limits: TokenBridge.BridgeLimitsStruct, - _faucet: PromiseOrValue, - _nameService: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isClosed(overrides?: CallOverrides): Promise; - - isValidConsensus( - signers: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - nameService(overrides?: CallOverrides): Promise; - - normalizeFrom18ToTokenDecimals( - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - normalizeFromTokenTo18Decimals( - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - numRequiredValidators(overrides?: CallOverrides): Promise; - - numValidators(overrides?: CallOverrides): Promise; - - onTokenTransfer( - from: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - proxiableUUID(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - requiredValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - requiredValidatorsSet(overrides?: CallOverrides): Promise; - - setAdmin( - _admin: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setBridgeFees( - _fees: TokenBridge.BridgeFeesStruct, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setBridgeLimits( - _limits: TokenBridge.BridgeLimitsStruct, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setConsensusRatio( - _consensusRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFaucet( - _faucet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRequiredValidators( - validators: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSourceBridges( - bridges: PromiseOrValue[], - blockstart: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sourceBridgeToBlockstart( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - submitBlocks( - signedBlocks: BridgeCore.SignedBlockStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - submitChainBlockParentsAndTxs( - blockData: BridgeCore.SignedBlockStruct, - signedBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - txs: BridgeCore.BlockReceiptProofsStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - upgradeTo( - newImplementation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - upgradeToAndCall( - newImplementation: PromiseOrValue, - data: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - usedReceipts( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - validatorsCycleEnd(overrides?: CallOverrides): Promise; - - verifyParentBlocks( - chainId: PromiseOrValue, - childBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - childRlpHeader: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdraw( - token: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - BRIDGE_TOPIC(overrides?: CallOverrides): Promise; - - accountsDailyLimit( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - lastTransferReset: BigNumber; - bridged24Hours: BigNumber; - } - >; - - admin(overrides?: CallOverrides): Promise; - - bridgeDailyLimit( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - lastTransferReset: BigNumber; - bridged24Hours: BigNumber; - } - >; - - bridgeFees( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber] & { - minFee: BigNumber; - maxFee: BigNumber; - fee: BigNumber; - } - >; - - bridgeLimits( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, boolean] & { - dailyLimit: BigNumber; - txLimit: BigNumber; - accountDailyLimit: BigNumber; - minAmount: BigNumber; - onlyWhitelisted: boolean; - } - >; - - bridgeTo( - target: PromiseOrValue, - targetChainId: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - bridgeToWithoutRelay( - target: PromiseOrValue, - targetChainId: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - bridgedToken(overrides?: CallOverrides): Promise; - - canBridge( - from: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean, string] & { isWithinLimit: boolean; error: string }>; - - chainIdToStats( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber] & { - totalBridged: BigNumber; - totalRelayFees: BigNumber; - totalBridgeFees: BigNumber; - } - >; - - chainStartBlock( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - chainVerifiedBlocks( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - closeBridge( - token: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - consensusRatio(overrides?: CallOverrides): Promise; - - currentId(overrides?: CallOverrides): Promise; - - currentValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - executeReceipts( - chainId: PromiseOrValue, - blocks: BridgeCore.BlockReceiptProofsStruct[], - overrides?: CallOverrides - ): Promise; - - executedRequests( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - faucet(overrides?: CallOverrides): Promise; - - initialize( - _validators: PromiseOrValue[], - _cycleEnd: PromiseOrValue, - _requiredValidators: PromiseOrValue[], - _consensusRatio: PromiseOrValue, - _bridgedToken: PromiseOrValue, - _fees: TokenBridge.BridgeFeesStruct, - _limits: TokenBridge.BridgeLimitsStruct, - _faucet: PromiseOrValue, - _nameService: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isClosed(overrides?: CallOverrides): Promise; - - isValidConsensus( - signers: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - nameService(overrides?: CallOverrides): Promise; - - normalizeFrom18ToTokenDecimals( - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - normalizeFromTokenTo18Decimals( - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - numRequiredValidators(overrides?: CallOverrides): Promise; - - numValidators(overrides?: CallOverrides): Promise; - - onTokenTransfer( - from: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - proxiableUUID(overrides?: CallOverrides): Promise; - - renounceOwnership(overrides?: CallOverrides): Promise; - - requiredValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - requiredValidatorsSet(overrides?: CallOverrides): Promise; - - setAdmin( - _admin: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setBridgeFees( - _fees: TokenBridge.BridgeFeesStruct, - overrides?: CallOverrides - ): Promise; - - setBridgeLimits( - _limits: TokenBridge.BridgeLimitsStruct, - overrides?: CallOverrides - ): Promise; - - setConsensusRatio( - _consensusRatio: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setFaucet( - _faucet: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setRequiredValidators( - validators: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - setSourceBridges( - bridges: PromiseOrValue[], - blockstart: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - sourceBridgeToBlockstart( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - submitBlocks( - signedBlocks: BridgeCore.SignedBlockStruct[], - overrides?: CallOverrides - ): Promise; - - submitChainBlockParentsAndTxs( - blockData: BridgeCore.SignedBlockStruct, - signedBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - txs: BridgeCore.BlockReceiptProofsStruct[], - overrides?: CallOverrides - ): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - upgradeTo( - newImplementation: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - upgradeToAndCall( - newImplementation: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - usedReceipts( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - validatorsCycleEnd(overrides?: CallOverrides): Promise; - - verifyParentBlocks( - chainId: PromiseOrValue, - childBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - childRlpHeader: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - withdraw( - token: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "AdminChanged(address,address)"( - previousAdmin?: null, - newAdmin?: null - ): AdminChangedEventFilter; - AdminChanged( - previousAdmin?: null, - newAdmin?: null - ): AdminChangedEventFilter; - - "BeaconUpgraded(address)"( - beacon?: PromiseOrValue | null - ): BeaconUpgradedEventFilter; - BeaconUpgraded( - beacon?: PromiseOrValue | null - ): BeaconUpgradedEventFilter; - - "BlockVerified(uint256,uint256,bytes32)"( - chainId?: null, - blockNumber?: null, - blockHash?: null - ): BlockVerifiedEventFilter; - BlockVerified( - chainId?: null, - blockNumber?: null, - blockHash?: null - ): BlockVerifiedEventFilter; - - "BridgeRequest(address,address,uint256,uint256,bool,uint256,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - targetChainId?: null, - amount?: null, - withRelay?: null, - timestamp?: null, - id?: PromiseOrValue | null - ): BridgeRequestEventFilter; - BridgeRequest( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - targetChainId?: null, - amount?: null, - withRelay?: null, - timestamp?: null, - id?: PromiseOrValue | null - ): BridgeRequestEventFilter; - - "ExecutedTransfer(address,address,address,uint256,uint256,uint256,uint256,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - relayer?: null, - amount?: null, - fee?: null, - sourceChainId?: null, - sourceBlockNumber?: null, - id?: PromiseOrValue | null - ): ExecutedTransferEventFilter; - ExecutedTransfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - relayer?: null, - amount?: null, - fee?: null, - sourceChainId?: null, - sourceBlockNumber?: null, - id?: PromiseOrValue | null - ): ExecutedTransferEventFilter; - - "Initialized(uint8)"(version?: null): InitializedEventFilter; - Initialized(version?: null): InitializedEventFilter; - - "OwnershipTransferred(address,address)"( - previousOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): OwnershipTransferredEventFilter; - OwnershipTransferred( - previousOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): OwnershipTransferredEventFilter; - - "Upgraded(address)"( - implementation?: PromiseOrValue | null - ): UpgradedEventFilter; - Upgraded( - implementation?: PromiseOrValue | null - ): UpgradedEventFilter; - - "ValidatorsSet(address[],uint256)"( - validators?: null, - cycleEnd?: null - ): ValidatorsSetEventFilter; - ValidatorsSet(validators?: null, cycleEnd?: null): ValidatorsSetEventFilter; - }; - - estimateGas: { - BRIDGE_TOPIC(overrides?: CallOverrides): Promise; - - accountsDailyLimit( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - admin(overrides?: CallOverrides): Promise; - - bridgeDailyLimit(overrides?: CallOverrides): Promise; - - bridgeFees(overrides?: CallOverrides): Promise; - - bridgeLimits(overrides?: CallOverrides): Promise; - - bridgeTo( - target: PromiseOrValue, - targetChainId: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - bridgeToWithoutRelay( - target: PromiseOrValue, - targetChainId: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - bridgedToken(overrides?: CallOverrides): Promise; - - canBridge( - from: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - chainIdToStats( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - chainStartBlock( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - chainVerifiedBlocks( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - closeBridge( - token: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - consensusRatio(overrides?: CallOverrides): Promise; - - currentId(overrides?: CallOverrides): Promise; - - currentValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - executeReceipts( - chainId: PromiseOrValue, - blocks: BridgeCore.BlockReceiptProofsStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - executedRequests( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - faucet(overrides?: CallOverrides): Promise; - - initialize( - _validators: PromiseOrValue[], - _cycleEnd: PromiseOrValue, - _requiredValidators: PromiseOrValue[], - _consensusRatio: PromiseOrValue, - _bridgedToken: PromiseOrValue, - _fees: TokenBridge.BridgeFeesStruct, - _limits: TokenBridge.BridgeLimitsStruct, - _faucet: PromiseOrValue, - _nameService: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isClosed(overrides?: CallOverrides): Promise; - - isValidConsensus( - signers: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - nameService(overrides?: CallOverrides): Promise; - - normalizeFrom18ToTokenDecimals( - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - normalizeFromTokenTo18Decimals( - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - numRequiredValidators(overrides?: CallOverrides): Promise; - - numValidators(overrides?: CallOverrides): Promise; - - onTokenTransfer( - from: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - proxiableUUID(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - requiredValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - requiredValidatorsSet(overrides?: CallOverrides): Promise; - - setAdmin( - _admin: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setBridgeFees( - _fees: TokenBridge.BridgeFeesStruct, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setBridgeLimits( - _limits: TokenBridge.BridgeLimitsStruct, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setConsensusRatio( - _consensusRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFaucet( - _faucet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRequiredValidators( - validators: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSourceBridges( - bridges: PromiseOrValue[], - blockstart: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sourceBridgeToBlockstart( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - submitBlocks( - signedBlocks: BridgeCore.SignedBlockStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - submitChainBlockParentsAndTxs( - blockData: BridgeCore.SignedBlockStruct, - signedBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - txs: BridgeCore.BlockReceiptProofsStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - upgradeTo( - newImplementation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - upgradeToAndCall( - newImplementation: PromiseOrValue, - data: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - usedReceipts( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - validatorsCycleEnd(overrides?: CallOverrides): Promise; - - verifyParentBlocks( - chainId: PromiseOrValue, - childBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - childRlpHeader: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdraw( - token: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - BRIDGE_TOPIC(overrides?: CallOverrides): Promise; - - accountsDailyLimit( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - admin(overrides?: CallOverrides): Promise; - - bridgeDailyLimit(overrides?: CallOverrides): Promise; - - bridgeFees(overrides?: CallOverrides): Promise; - - bridgeLimits(overrides?: CallOverrides): Promise; - - bridgeTo( - target: PromiseOrValue, - targetChainId: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - bridgeToWithoutRelay( - target: PromiseOrValue, - targetChainId: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - bridgedToken(overrides?: CallOverrides): Promise; - - canBridge( - from: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - chainIdToStats( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - chainStartBlock( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - chainVerifiedBlocks( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - closeBridge( - token: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - consensusRatio(overrides?: CallOverrides): Promise; - - currentId(overrides?: CallOverrides): Promise; - - currentValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - executeReceipts( - chainId: PromiseOrValue, - blocks: BridgeCore.BlockReceiptProofsStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - executedRequests( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - faucet(overrides?: CallOverrides): Promise; - - initialize( - _validators: PromiseOrValue[], - _cycleEnd: PromiseOrValue, - _requiredValidators: PromiseOrValue[], - _consensusRatio: PromiseOrValue, - _bridgedToken: PromiseOrValue, - _fees: TokenBridge.BridgeFeesStruct, - _limits: TokenBridge.BridgeLimitsStruct, - _faucet: PromiseOrValue, - _nameService: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isClosed(overrides?: CallOverrides): Promise; - - isValidConsensus( - signers: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - nameService(overrides?: CallOverrides): Promise; - - normalizeFrom18ToTokenDecimals( - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - normalizeFromTokenTo18Decimals( - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - numRequiredValidators( - overrides?: CallOverrides - ): Promise; - - numValidators(overrides?: CallOverrides): Promise; - - onTokenTransfer( - from: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - proxiableUUID(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - requiredValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - requiredValidatorsSet( - overrides?: CallOverrides - ): Promise; - - setAdmin( - _admin: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setBridgeFees( - _fees: TokenBridge.BridgeFeesStruct, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setBridgeLimits( - _limits: TokenBridge.BridgeLimitsStruct, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setConsensusRatio( - _consensusRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFaucet( - _faucet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRequiredValidators( - validators: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSourceBridges( - bridges: PromiseOrValue[], - blockstart: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sourceBridgeToBlockstart( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - submitBlocks( - signedBlocks: BridgeCore.SignedBlockStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - submitChainBlockParentsAndTxs( - blockData: BridgeCore.SignedBlockStruct, - signedBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - txs: BridgeCore.BlockReceiptProofsStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - upgradeTo( - newImplementation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - upgradeToAndCall( - newImplementation: PromiseOrValue, - data: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - usedReceipts( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - validatorsCycleEnd( - overrides?: CallOverrides - ): Promise; - - verifyParentBlocks( - chainId: PromiseOrValue, - childBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - childRlpHeader: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdraw( - token: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; -} diff --git a/packages/bridge-contracts/typechain-types/contracts/bridge/TokenBridge.sol/index.ts b/packages/bridge-contracts/typechain-types/contracts/bridge/TokenBridge.sol/index.ts deleted file mode 100644 index b3d8c5a..0000000 --- a/packages/bridge-contracts/typechain-types/contracts/bridge/TokenBridge.sol/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { IFaucet } from "./IFaucet"; -export type { IIdentity } from "./IIdentity"; -export type { INameService } from "./INameService"; -export type { TokenBridge } from "./TokenBridge"; diff --git a/packages/bridge-contracts/typechain-types/contracts/bridge/index.ts b/packages/bridge-contracts/typechain-types/contracts/bridge/index.ts deleted file mode 100644 index 03c1445..0000000 --- a/packages/bridge-contracts/typechain-types/contracts/bridge/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type * as tokenBridgeSol from "./TokenBridge.sol"; -export type { tokenBridgeSol }; -export type { BridgeCore } from "./BridgeCore"; -export type { BridgeMixedConsensus } from "./BridgeMixedConsensus"; diff --git a/packages/bridge-contracts/typechain-types/contracts/fuse/IConsensus.ts b/packages/bridge-contracts/typechain-types/contracts/fuse/IConsensus.ts deleted file mode 100644 index 13b0256..0000000 --- a/packages/bridge-contracts/typechain-types/contracts/fuse/IConsensus.ts +++ /dev/null @@ -1,172 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "../../common"; - -export interface IConsensusInterface extends utils.Interface { - functions: { - "getCurrentCycleEndBlock()": FunctionFragment; - "getCurrentCycleStartBlock()": FunctionFragment; - "getValidators()": FunctionFragment; - "isValidator(address)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "getCurrentCycleEndBlock" - | "getCurrentCycleStartBlock" - | "getValidators" - | "isValidator" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "getCurrentCycleEndBlock", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "getCurrentCycleStartBlock", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "getValidators", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "isValidator", - values: [PromiseOrValue] - ): string; - - decodeFunctionResult( - functionFragment: "getCurrentCycleEndBlock", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getCurrentCycleStartBlock", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getValidators", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "isValidator", - data: BytesLike - ): Result; - - events: {}; -} - -export interface IConsensus extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: IConsensusInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - getCurrentCycleEndBlock(overrides?: CallOverrides): Promise<[BigNumber]>; - - getCurrentCycleStartBlock(overrides?: CallOverrides): Promise<[BigNumber]>; - - getValidators(overrides?: CallOverrides): Promise<[string[]]>; - - isValidator( - arg0: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - getCurrentCycleEndBlock(overrides?: CallOverrides): Promise; - - getCurrentCycleStartBlock(overrides?: CallOverrides): Promise; - - getValidators(overrides?: CallOverrides): Promise; - - isValidator( - arg0: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - getCurrentCycleEndBlock(overrides?: CallOverrides): Promise; - - getCurrentCycleStartBlock(overrides?: CallOverrides): Promise; - - getValidators(overrides?: CallOverrides): Promise; - - isValidator( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: {}; - - estimateGas: { - getCurrentCycleEndBlock(overrides?: CallOverrides): Promise; - - getCurrentCycleStartBlock(overrides?: CallOverrides): Promise; - - getValidators(overrides?: CallOverrides): Promise; - - isValidator( - arg0: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - getCurrentCycleEndBlock( - overrides?: CallOverrides - ): Promise; - - getCurrentCycleStartBlock( - overrides?: CallOverrides - ): Promise; - - getValidators(overrides?: CallOverrides): Promise; - - isValidator( - arg0: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; -} diff --git a/packages/bridge-contracts/typechain-types/contracts/fuse/index.ts b/packages/bridge-contracts/typechain-types/contracts/fuse/index.ts deleted file mode 100644 index e01f054..0000000 --- a/packages/bridge-contracts/typechain-types/contracts/fuse/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { IConsensus } from "./IConsensus"; diff --git a/packages/bridge-contracts/typechain-types/contracts/index.ts b/packages/bridge-contracts/typechain-types/contracts/index.ts deleted file mode 100644 index 139fc64..0000000 --- a/packages/bridge-contracts/typechain-types/contracts/index.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type * as blockRegistry from "./blockRegistry"; -export type { blockRegistry }; -import type * as bridge from "./bridge"; -export type { bridge }; -import type * as fuse from "./fuse"; -export type { fuse }; -import type * as messagePassingBridge from "./messagePassingBridge"; -export type { messagePassingBridge }; -import type * as oft from "./oft"; -export type { oft }; -import type * as test from "./test"; -export type { test }; diff --git a/packages/bridge-contracts/typechain-types/contracts/test/ConsensusMock.ts b/packages/bridge-contracts/typechain-types/contracts/test/ConsensusMock.ts deleted file mode 100644 index f0c485b..0000000 --- a/packages/bridge-contracts/typechain-types/contracts/test/ConsensusMock.ts +++ /dev/null @@ -1,206 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "../../common"; - -export interface ConsensusMockInterface extends utils.Interface { - functions: { - "currentValidators(uint256)": FunctionFragment; - "getCurrentCycleEndBlock()": FunctionFragment; - "getCurrentCycleStartBlock()": FunctionFragment; - "getValidators()": FunctionFragment; - "isValidator(address)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "currentValidators" - | "getCurrentCycleEndBlock" - | "getCurrentCycleStartBlock" - | "getValidators" - | "isValidator" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "currentValidators", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "getCurrentCycleEndBlock", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "getCurrentCycleStartBlock", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "getValidators", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "isValidator", - values: [PromiseOrValue] - ): string; - - decodeFunctionResult( - functionFragment: "currentValidators", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getCurrentCycleEndBlock", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getCurrentCycleStartBlock", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getValidators", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "isValidator", - data: BytesLike - ): Result; - - events: {}; -} - -export interface ConsensusMock extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ConsensusMockInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - currentValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - getCurrentCycleEndBlock(overrides?: CallOverrides): Promise<[BigNumber]>; - - getCurrentCycleStartBlock(overrides?: CallOverrides): Promise<[BigNumber]>; - - getValidators(overrides?: CallOverrides): Promise<[string[]]>; - - isValidator( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - }; - - currentValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCurrentCycleEndBlock(overrides?: CallOverrides): Promise; - - getCurrentCycleStartBlock(overrides?: CallOverrides): Promise; - - getValidators(overrides?: CallOverrides): Promise; - - isValidator( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - callStatic: { - currentValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCurrentCycleEndBlock(overrides?: CallOverrides): Promise; - - getCurrentCycleStartBlock(overrides?: CallOverrides): Promise; - - getValidators(overrides?: CallOverrides): Promise; - - isValidator( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: {}; - - estimateGas: { - currentValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCurrentCycleEndBlock(overrides?: CallOverrides): Promise; - - getCurrentCycleStartBlock(overrides?: CallOverrides): Promise; - - getValidators(overrides?: CallOverrides): Promise; - - isValidator( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - populateTransaction: { - currentValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCurrentCycleEndBlock( - overrides?: CallOverrides - ): Promise; - - getCurrentCycleStartBlock( - overrides?: CallOverrides - ): Promise; - - getValidators(overrides?: CallOverrides): Promise; - - isValidator( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; -} diff --git a/packages/bridge-contracts/typechain-types/contracts/test/MultiCall.sol/Multicall.ts b/packages/bridge-contracts/typechain-types/contracts/test/MultiCall.sol/Multicall.ts deleted file mode 100644 index 47f3fd7..0000000 --- a/packages/bridge-contracts/typechain-types/contracts/test/MultiCall.sol/Multicall.ts +++ /dev/null @@ -1,308 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "../../../common"; - -export declare namespace Multicall { - export type CallStruct = { - target: PromiseOrValue; - callData: PromiseOrValue; - }; - - export type CallStructOutput = [string, string] & { - target: string; - callData: string; - }; -} - -export interface MulticallInterface extends utils.Interface { - functions: { - "aggregate((address,bytes)[])": FunctionFragment; - "getBlockHash(uint256)": FunctionFragment; - "getCurrentBlockCoinbase()": FunctionFragment; - "getCurrentBlockDifficulty()": FunctionFragment; - "getCurrentBlockGasLimit()": FunctionFragment; - "getCurrentBlockTimestamp()": FunctionFragment; - "getEthBalance(address)": FunctionFragment; - "getLastBlockHash()": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "aggregate" - | "getBlockHash" - | "getCurrentBlockCoinbase" - | "getCurrentBlockDifficulty" - | "getCurrentBlockGasLimit" - | "getCurrentBlockTimestamp" - | "getEthBalance" - | "getLastBlockHash" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "aggregate", - values: [Multicall.CallStruct[]] - ): string; - encodeFunctionData( - functionFragment: "getBlockHash", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "getCurrentBlockCoinbase", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "getCurrentBlockDifficulty", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "getCurrentBlockGasLimit", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "getCurrentBlockTimestamp", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "getEthBalance", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "getLastBlockHash", - values?: undefined - ): string; - - decodeFunctionResult(functionFragment: "aggregate", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "getBlockHash", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getCurrentBlockCoinbase", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getCurrentBlockDifficulty", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getCurrentBlockGasLimit", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getCurrentBlockTimestamp", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getEthBalance", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getLastBlockHash", - data: BytesLike - ): Result; - - events: {}; -} - -export interface Multicall extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: MulticallInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - aggregate( - calls: Multicall.CallStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBlockHash( - blockNumber: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string] & { blockHash: string }>; - - getCurrentBlockCoinbase( - overrides?: CallOverrides - ): Promise<[string] & { coinbase: string }>; - - getCurrentBlockDifficulty( - overrides?: CallOverrides - ): Promise<[BigNumber] & { difficulty: BigNumber }>; - - getCurrentBlockGasLimit( - overrides?: CallOverrides - ): Promise<[BigNumber] & { gaslimit: BigNumber }>; - - getCurrentBlockTimestamp( - overrides?: CallOverrides - ): Promise<[BigNumber] & { timestamp: BigNumber }>; - - getEthBalance( - addr: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { balance: BigNumber }>; - - getLastBlockHash( - overrides?: CallOverrides - ): Promise<[string] & { blockHash: string }>; - }; - - aggregate( - calls: Multicall.CallStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBlockHash( - blockNumber: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCurrentBlockCoinbase(overrides?: CallOverrides): Promise; - - getCurrentBlockDifficulty(overrides?: CallOverrides): Promise; - - getCurrentBlockGasLimit(overrides?: CallOverrides): Promise; - - getCurrentBlockTimestamp(overrides?: CallOverrides): Promise; - - getEthBalance( - addr: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLastBlockHash(overrides?: CallOverrides): Promise; - - callStatic: { - aggregate( - calls: Multicall.CallStruct[], - overrides?: CallOverrides - ): Promise< - [BigNumber, string[]] & { blockNumber: BigNumber; returnData: string[] } - >; - - getBlockHash( - blockNumber: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCurrentBlockCoinbase(overrides?: CallOverrides): Promise; - - getCurrentBlockDifficulty(overrides?: CallOverrides): Promise; - - getCurrentBlockGasLimit(overrides?: CallOverrides): Promise; - - getCurrentBlockTimestamp(overrides?: CallOverrides): Promise; - - getEthBalance( - addr: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLastBlockHash(overrides?: CallOverrides): Promise; - }; - - filters: {}; - - estimateGas: { - aggregate( - calls: Multicall.CallStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBlockHash( - blockNumber: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCurrentBlockCoinbase(overrides?: CallOverrides): Promise; - - getCurrentBlockDifficulty(overrides?: CallOverrides): Promise; - - getCurrentBlockGasLimit(overrides?: CallOverrides): Promise; - - getCurrentBlockTimestamp(overrides?: CallOverrides): Promise; - - getEthBalance( - addr: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLastBlockHash(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - aggregate( - calls: Multicall.CallStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBlockHash( - blockNumber: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCurrentBlockCoinbase( - overrides?: CallOverrides - ): Promise; - - getCurrentBlockDifficulty( - overrides?: CallOverrides - ): Promise; - - getCurrentBlockGasLimit( - overrides?: CallOverrides - ): Promise; - - getCurrentBlockTimestamp( - overrides?: CallOverrides - ): Promise; - - getEthBalance( - addr: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLastBlockHash(overrides?: CallOverrides): Promise; - }; -} diff --git a/packages/bridge-contracts/typechain-types/contracts/test/MultiCall.sol/index.ts b/packages/bridge-contracts/typechain-types/contracts/test/MultiCall.sol/index.ts deleted file mode 100644 index 56bc5db..0000000 --- a/packages/bridge-contracts/typechain-types/contracts/test/MultiCall.sol/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { Multicall } from "./Multicall"; diff --git a/packages/bridge-contracts/typechain-types/contracts/test/TokenBridgeTest.ts b/packages/bridge-contracts/typechain-types/contracts/test/TokenBridgeTest.ts deleted file mode 100644 index 47ae3ff..0000000 --- a/packages/bridge-contracts/typechain-types/contracts/test/TokenBridgeTest.ts +++ /dev/null @@ -1,2155 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PayableOverrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { - FunctionFragment, - Result, - EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "../../common"; - -export declare namespace TokenBridge { - export type BridgeFeesStruct = { - minFee: PromiseOrValue; - maxFee: PromiseOrValue; - fee: PromiseOrValue; - }; - - export type BridgeFeesStructOutput = [BigNumber, BigNumber, BigNumber] & { - minFee: BigNumber; - maxFee: BigNumber; - fee: BigNumber; - }; - - export type BridgeLimitsStruct = { - dailyLimit: PromiseOrValue; - txLimit: PromiseOrValue; - accountDailyLimit: PromiseOrValue; - minAmount: PromiseOrValue; - onlyWhitelisted: PromiseOrValue; - }; - - export type BridgeLimitsStructOutput = [ - BigNumber, - BigNumber, - BigNumber, - BigNumber, - boolean - ] & { - dailyLimit: BigNumber; - txLimit: BigNumber; - accountDailyLimit: BigNumber; - minAmount: BigNumber; - onlyWhitelisted: boolean; - }; -} - -export declare namespace MPT { - export type MerkleProofStruct = { - expectedRoot: PromiseOrValue; - key: PromiseOrValue; - proof: PromiseOrValue[]; - keyIndex: PromiseOrValue; - proofIndex: PromiseOrValue; - expectedValue: PromiseOrValue; - }; - - export type MerkleProofStructOutput = [ - string, - string, - string[], - BigNumber, - BigNumber, - string - ] & { - expectedRoot: string; - key: string; - proof: string[]; - keyIndex: BigNumber; - proofIndex: BigNumber; - expectedValue: string; - }; -} - -export declare namespace BridgeCore { - export type BlockReceiptProofsStruct = { - receiptProofs: MPT.MerkleProofStruct[]; - blockHeaderRlp: PromiseOrValue; - blockNumber: PromiseOrValue; - }; - - export type BlockReceiptProofsStructOutput = [ - MPT.MerkleProofStructOutput[], - string, - BigNumber - ] & { - receiptProofs: MPT.MerkleProofStructOutput[]; - blockHeaderRlp: string; - blockNumber: BigNumber; - }; - - export type SignedBlockStruct = { - chainId: PromiseOrValue; - rlpHeader: PromiseOrValue; - signatures: PromiseOrValue[]; - cycleEnd: PromiseOrValue; - validators: PromiseOrValue[]; - }; - - export type SignedBlockStructOutput = [ - BigNumber, - string, - string[], - BigNumber, - string[] - ] & { - chainId: BigNumber; - rlpHeader: string; - signatures: string[]; - cycleEnd: BigNumber; - validators: string[]; - }; -} - -export interface TokenBridgeTestInterface extends utils.Interface { - functions: { - "BRIDGE_TOPIC()": FunctionFragment; - "accountsDailyLimit(address)": FunctionFragment; - "admin()": FunctionFragment; - "bridgeDailyLimit()": FunctionFragment; - "bridgeFees()": FunctionFragment; - "bridgeLimits()": FunctionFragment; - "bridgeTo(address,uint256,uint256)": FunctionFragment; - "bridgeToWithoutRelay(address,uint256,uint256)": FunctionFragment; - "bridgedToken()": FunctionFragment; - "canBridge(address,uint256)": FunctionFragment; - "chainIdToStats(uint256)": FunctionFragment; - "chainStartBlock(uint256)": FunctionFragment; - "chainVerifiedBlocks(uint256,uint256)": FunctionFragment; - "closeBridge(address)": FunctionFragment; - "consensusRatio()": FunctionFragment; - "currentId()": FunctionFragment; - "currentValidators(address)": FunctionFragment; - "executeReceipts(uint256,((bytes32,bytes,bytes[],uint256,uint256,bytes)[],bytes,uint256)[])": FunctionFragment; - "executedRequests(uint256)": FunctionFragment; - "faucet()": FunctionFragment; - "initialize(address[],uint256,address[],uint32,address,(uint256,uint256,uint256),(uint256,uint256,uint256,uint256,bool),address,address)": FunctionFragment; - "isClosed()": FunctionFragment; - "isValidConsensus(address[])": FunctionFragment; - "nameService()": FunctionFragment; - "normalizeFrom18ToTokenDecimals(uint256)": FunctionFragment; - "normalizeFromTokenTo18Decimals(uint256)": FunctionFragment; - "numRequiredValidators()": FunctionFragment; - "numValidators()": FunctionFragment; - "onTokenTransfer(address,uint256,bytes)": FunctionFragment; - "owner()": FunctionFragment; - "proxiableUUID()": FunctionFragment; - "renounceOwnership()": FunctionFragment; - "requiredValidators(address)": FunctionFragment; - "requiredValidatorsSet()": FunctionFragment; - "setAdmin(address)": FunctionFragment; - "setBridgeFees((uint256,uint256,uint256))": FunctionFragment; - "setBridgeLimits((uint256,uint256,uint256,uint256,bool))": FunctionFragment; - "setConsensusRatio(uint32)": FunctionFragment; - "setFaucet(address)": FunctionFragment; - "setRequiredValidators(address[])": FunctionFragment; - "setSourceBridges(address[],uint256[])": FunctionFragment; - "sourceBridgeToBlockstart(address)": FunctionFragment; - "submitBlocks((uint256,bytes,bytes[],uint256,address[])[])": FunctionFragment; - "submitChainBlockParentsAndTxs((uint256,bytes,bytes[],uint256,address[]),uint256,bytes[],((bytes32,bytes,bytes[],uint256,uint256,bytes)[],bytes,uint256)[])": FunctionFragment; - "transferOwnership(address)": FunctionFragment; - "upgradeTo(address)": FunctionFragment; - "upgradeToAndCall(address,bytes)": FunctionFragment; - "usedReceipts(bytes32)": FunctionFragment; - "validatorsCycleEnd()": FunctionFragment; - "verifyParentBlocks(uint256,uint256,bytes[],bytes)": FunctionFragment; - "withdraw(address,uint256)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "BRIDGE_TOPIC" - | "accountsDailyLimit" - | "admin" - | "bridgeDailyLimit" - | "bridgeFees" - | "bridgeLimits" - | "bridgeTo" - | "bridgeToWithoutRelay" - | "bridgedToken" - | "canBridge" - | "chainIdToStats" - | "chainStartBlock" - | "chainVerifiedBlocks" - | "closeBridge" - | "consensusRatio" - | "currentId" - | "currentValidators" - | "executeReceipts" - | "executedRequests" - | "faucet" - | "initialize" - | "isClosed" - | "isValidConsensus" - | "nameService" - | "normalizeFrom18ToTokenDecimals" - | "normalizeFromTokenTo18Decimals" - | "numRequiredValidators" - | "numValidators" - | "onTokenTransfer" - | "owner" - | "proxiableUUID" - | "renounceOwnership" - | "requiredValidators" - | "requiredValidatorsSet" - | "setAdmin" - | "setBridgeFees" - | "setBridgeLimits" - | "setConsensusRatio" - | "setFaucet" - | "setRequiredValidators" - | "setSourceBridges" - | "sourceBridgeToBlockstart" - | "submitBlocks" - | "submitChainBlockParentsAndTxs" - | "transferOwnership" - | "upgradeTo" - | "upgradeToAndCall" - | "usedReceipts" - | "validatorsCycleEnd" - | "verifyParentBlocks" - | "withdraw" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "BRIDGE_TOPIC", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "accountsDailyLimit", - values: [PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "admin", values?: undefined): string; - encodeFunctionData( - functionFragment: "bridgeDailyLimit", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "bridgeFees", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "bridgeLimits", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "bridgeTo", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "bridgeToWithoutRelay", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "bridgedToken", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "canBridge", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "chainIdToStats", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "chainStartBlock", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "chainVerifiedBlocks", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "closeBridge", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "consensusRatio", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "currentId", values?: undefined): string; - encodeFunctionData( - functionFragment: "currentValidators", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "executeReceipts", - values: [ - PromiseOrValue, - BridgeCore.BlockReceiptProofsStruct[] - ] - ): string; - encodeFunctionData( - functionFragment: "executedRequests", - values: [PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "faucet", values?: undefined): string; - encodeFunctionData( - functionFragment: "initialize", - values: [ - PromiseOrValue[], - PromiseOrValue, - PromiseOrValue[], - PromiseOrValue, - PromiseOrValue, - TokenBridge.BridgeFeesStruct, - TokenBridge.BridgeLimitsStruct, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData(functionFragment: "isClosed", values?: undefined): string; - encodeFunctionData( - functionFragment: "isValidConsensus", - values: [PromiseOrValue[]] - ): string; - encodeFunctionData( - functionFragment: "nameService", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "normalizeFrom18ToTokenDecimals", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "normalizeFromTokenTo18Decimals", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "numRequiredValidators", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "numValidators", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "onTokenTransfer", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData(functionFragment: "owner", values?: undefined): string; - encodeFunctionData( - functionFragment: "proxiableUUID", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "renounceOwnership", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "requiredValidators", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "requiredValidatorsSet", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "setAdmin", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setBridgeFees", - values: [TokenBridge.BridgeFeesStruct] - ): string; - encodeFunctionData( - functionFragment: "setBridgeLimits", - values: [TokenBridge.BridgeLimitsStruct] - ): string; - encodeFunctionData( - functionFragment: "setConsensusRatio", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setFaucet", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setRequiredValidators", - values: [PromiseOrValue[]] - ): string; - encodeFunctionData( - functionFragment: "setSourceBridges", - values: [PromiseOrValue[], PromiseOrValue[]] - ): string; - encodeFunctionData( - functionFragment: "sourceBridgeToBlockstart", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "submitBlocks", - values: [BridgeCore.SignedBlockStruct[]] - ): string; - encodeFunctionData( - functionFragment: "submitChainBlockParentsAndTxs", - values: [ - BridgeCore.SignedBlockStruct, - PromiseOrValue, - PromiseOrValue[], - BridgeCore.BlockReceiptProofsStruct[] - ] - ): string; - encodeFunctionData( - functionFragment: "transferOwnership", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "upgradeTo", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "upgradeToAndCall", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "usedReceipts", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "validatorsCycleEnd", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "verifyParentBlocks", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue[], - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "withdraw", - values: [PromiseOrValue, PromiseOrValue] - ): string; - - decodeFunctionResult( - functionFragment: "BRIDGE_TOPIC", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "accountsDailyLimit", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "admin", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "bridgeDailyLimit", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "bridgeFees", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "bridgeLimits", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "bridgeTo", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "bridgeToWithoutRelay", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "bridgedToken", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "canBridge", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "chainIdToStats", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "chainStartBlock", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "chainVerifiedBlocks", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "closeBridge", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "consensusRatio", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "currentId", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "currentValidators", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "executeReceipts", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "executedRequests", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "faucet", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isClosed", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "isValidConsensus", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "nameService", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "normalizeFrom18ToTokenDecimals", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "normalizeFromTokenTo18Decimals", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "numRequiredValidators", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "numValidators", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "onTokenTransfer", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "proxiableUUID", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "renounceOwnership", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "requiredValidators", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "requiredValidatorsSet", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "setAdmin", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "setBridgeFees", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setBridgeLimits", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setConsensusRatio", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "setFaucet", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "setRequiredValidators", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setSourceBridges", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "sourceBridgeToBlockstart", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "submitBlocks", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "submitChainBlockParentsAndTxs", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "transferOwnership", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "upgradeTo", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "upgradeToAndCall", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "usedReceipts", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "validatorsCycleEnd", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "verifyParentBlocks", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result; - - events: { - "AdminChanged(address,address)": EventFragment; - "BeaconUpgraded(address)": EventFragment; - "BlockVerified(uint256,uint256,bytes32)": EventFragment; - "BridgeRequest(address,address,uint256,uint256,bool,uint256,uint256)": EventFragment; - "ExecutedTransfer(address,address,address,uint256,uint256,uint256,uint256,uint256)": EventFragment; - "Initialized(uint8)": EventFragment; - "OwnershipTransferred(address,address)": EventFragment; - "Upgraded(address)": EventFragment; - "ValidatorsSet(address[],uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "AdminChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "BeaconUpgraded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "BlockVerified"): EventFragment; - getEvent(nameOrSignatureOrTopic: "BridgeRequest"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ExecutedTransfer"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment; - getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Upgraded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ValidatorsSet"): EventFragment; -} - -export interface AdminChangedEventObject { - previousAdmin: string; - newAdmin: string; -} -export type AdminChangedEvent = TypedEvent< - [string, string], - AdminChangedEventObject ->; - -export type AdminChangedEventFilter = TypedEventFilter; - -export interface BeaconUpgradedEventObject { - beacon: string; -} -export type BeaconUpgradedEvent = TypedEvent< - [string], - BeaconUpgradedEventObject ->; - -export type BeaconUpgradedEventFilter = TypedEventFilter; - -export interface BlockVerifiedEventObject { - chainId: BigNumber; - blockNumber: BigNumber; - blockHash: string; -} -export type BlockVerifiedEvent = TypedEvent< - [BigNumber, BigNumber, string], - BlockVerifiedEventObject ->; - -export type BlockVerifiedEventFilter = TypedEventFilter; - -export interface BridgeRequestEventObject { - from: string; - to: string; - targetChainId: BigNumber; - amount: BigNumber; - withRelay: boolean; - timestamp: BigNumber; - id: BigNumber; -} -export type BridgeRequestEvent = TypedEvent< - [string, string, BigNumber, BigNumber, boolean, BigNumber, BigNumber], - BridgeRequestEventObject ->; - -export type BridgeRequestEventFilter = TypedEventFilter; - -export interface ExecutedTransferEventObject { - from: string; - to: string; - relayer: string; - amount: BigNumber; - fee: BigNumber; - sourceChainId: BigNumber; - sourceBlockNumber: BigNumber; - id: BigNumber; -} -export type ExecutedTransferEvent = TypedEvent< - [ - string, - string, - string, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber - ], - ExecutedTransferEventObject ->; - -export type ExecutedTransferEventFilter = - TypedEventFilter; - -export interface InitializedEventObject { - version: number; -} -export type InitializedEvent = TypedEvent<[number], InitializedEventObject>; - -export type InitializedEventFilter = TypedEventFilter; - -export interface OwnershipTransferredEventObject { - previousOwner: string; - newOwner: string; -} -export type OwnershipTransferredEvent = TypedEvent< - [string, string], - OwnershipTransferredEventObject ->; - -export type OwnershipTransferredEventFilter = - TypedEventFilter; - -export interface UpgradedEventObject { - implementation: string; -} -export type UpgradedEvent = TypedEvent<[string], UpgradedEventObject>; - -export type UpgradedEventFilter = TypedEventFilter; - -export interface ValidatorsSetEventObject { - validators: string[]; - cycleEnd: BigNumber; -} -export type ValidatorsSetEvent = TypedEvent< - [string[], BigNumber], - ValidatorsSetEventObject ->; - -export type ValidatorsSetEventFilter = TypedEventFilter; - -export interface TokenBridgeTest extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: TokenBridgeTestInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - BRIDGE_TOPIC(overrides?: CallOverrides): Promise<[string]>; - - accountsDailyLimit( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - lastTransferReset: BigNumber; - bridged24Hours: BigNumber; - } - >; - - admin(overrides?: CallOverrides): Promise<[string]>; - - bridgeDailyLimit( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - lastTransferReset: BigNumber; - bridged24Hours: BigNumber; - } - >; - - bridgeFees( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber] & { - minFee: BigNumber; - maxFee: BigNumber; - fee: BigNumber; - } - >; - - bridgeLimits( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, boolean] & { - dailyLimit: BigNumber; - txLimit: BigNumber; - accountDailyLimit: BigNumber; - minAmount: BigNumber; - onlyWhitelisted: boolean; - } - >; - - bridgeTo( - target: PromiseOrValue, - targetChainId: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - bridgeToWithoutRelay( - target: PromiseOrValue, - targetChainId: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - bridgedToken(overrides?: CallOverrides): Promise<[string]>; - - canBridge( - from: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean, string] & { isWithinLimit: boolean; error: string }>; - - chainIdToStats( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber] & { - totalBridged: BigNumber; - totalRelayFees: BigNumber; - totalBridgeFees: BigNumber; - } - >; - - chainStartBlock( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { bridgeStartBlock: BigNumber }>; - - chainVerifiedBlocks( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - closeBridge( - token: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - consensusRatio(overrides?: CallOverrides): Promise<[number]>; - - currentId(overrides?: CallOverrides): Promise<[BigNumber]>; - - currentValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - executeReceipts( - chainId: PromiseOrValue, - blocks: BridgeCore.BlockReceiptProofsStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - executedRequests( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - faucet(overrides?: CallOverrides): Promise<[string]>; - - initialize( - _validators: PromiseOrValue[], - _cycleEnd: PromiseOrValue, - _requiredValidators: PromiseOrValue[], - _consensusRatio: PromiseOrValue, - _bridgedToken: PromiseOrValue, - _fees: TokenBridge.BridgeFeesStruct, - _limits: TokenBridge.BridgeLimitsStruct, - _faucet: PromiseOrValue, - _nameService: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isClosed(overrides?: CallOverrides): Promise<[boolean]>; - - isValidConsensus( - signers: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - nameService(overrides?: CallOverrides): Promise<[string]>; - - normalizeFrom18ToTokenDecimals( - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { normalized: BigNumber }>; - - normalizeFromTokenTo18Decimals( - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { normalized: BigNumber }>; - - numRequiredValidators(overrides?: CallOverrides): Promise<[number]>; - - numValidators(overrides?: CallOverrides): Promise<[BigNumber]>; - - onTokenTransfer( - from: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise<[string]>; - - proxiableUUID(overrides?: CallOverrides): Promise<[string]>; - - renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - requiredValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - requiredValidatorsSet(overrides?: CallOverrides): Promise<[BigNumber]>; - - setAdmin( - _admin: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setBridgeFees( - _fees: TokenBridge.BridgeFeesStruct, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setBridgeLimits( - _limits: TokenBridge.BridgeLimitsStruct, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setConsensusRatio( - _consensusRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFaucet( - _faucet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRequiredValidators( - validators: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSourceBridges( - bridges: PromiseOrValue[], - blockstart: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sourceBridgeToBlockstart( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - submitBlocks( - signedBlocks: BridgeCore.SignedBlockStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - submitChainBlockParentsAndTxs( - blockData: BridgeCore.SignedBlockStruct, - signedBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - txs: BridgeCore.BlockReceiptProofsStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - upgradeTo( - newImplementation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - upgradeToAndCall( - newImplementation: PromiseOrValue, - data: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - usedReceipts( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - validatorsCycleEnd(overrides?: CallOverrides): Promise<[BigNumber]>; - - verifyParentBlocks( - chainId: PromiseOrValue, - childBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - childRlpHeader: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdraw( - token: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - BRIDGE_TOPIC(overrides?: CallOverrides): Promise; - - accountsDailyLimit( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - lastTransferReset: BigNumber; - bridged24Hours: BigNumber; - } - >; - - admin(overrides?: CallOverrides): Promise; - - bridgeDailyLimit( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - lastTransferReset: BigNumber; - bridged24Hours: BigNumber; - } - >; - - bridgeFees( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber] & { - minFee: BigNumber; - maxFee: BigNumber; - fee: BigNumber; - } - >; - - bridgeLimits( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, boolean] & { - dailyLimit: BigNumber; - txLimit: BigNumber; - accountDailyLimit: BigNumber; - minAmount: BigNumber; - onlyWhitelisted: boolean; - } - >; - - bridgeTo( - target: PromiseOrValue, - targetChainId: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - bridgeToWithoutRelay( - target: PromiseOrValue, - targetChainId: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - bridgedToken(overrides?: CallOverrides): Promise; - - canBridge( - from: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean, string] & { isWithinLimit: boolean; error: string }>; - - chainIdToStats( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber] & { - totalBridged: BigNumber; - totalRelayFees: BigNumber; - totalBridgeFees: BigNumber; - } - >; - - chainStartBlock( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - chainVerifiedBlocks( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - closeBridge( - token: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - consensusRatio(overrides?: CallOverrides): Promise; - - currentId(overrides?: CallOverrides): Promise; - - currentValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - executeReceipts( - chainId: PromiseOrValue, - blocks: BridgeCore.BlockReceiptProofsStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - executedRequests( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - faucet(overrides?: CallOverrides): Promise; - - initialize( - _validators: PromiseOrValue[], - _cycleEnd: PromiseOrValue, - _requiredValidators: PromiseOrValue[], - _consensusRatio: PromiseOrValue, - _bridgedToken: PromiseOrValue, - _fees: TokenBridge.BridgeFeesStruct, - _limits: TokenBridge.BridgeLimitsStruct, - _faucet: PromiseOrValue, - _nameService: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isClosed(overrides?: CallOverrides): Promise; - - isValidConsensus( - signers: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - nameService(overrides?: CallOverrides): Promise; - - normalizeFrom18ToTokenDecimals( - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - normalizeFromTokenTo18Decimals( - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - numRequiredValidators(overrides?: CallOverrides): Promise; - - numValidators(overrides?: CallOverrides): Promise; - - onTokenTransfer( - from: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - proxiableUUID(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - requiredValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - requiredValidatorsSet(overrides?: CallOverrides): Promise; - - setAdmin( - _admin: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setBridgeFees( - _fees: TokenBridge.BridgeFeesStruct, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setBridgeLimits( - _limits: TokenBridge.BridgeLimitsStruct, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setConsensusRatio( - _consensusRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFaucet( - _faucet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRequiredValidators( - validators: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSourceBridges( - bridges: PromiseOrValue[], - blockstart: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sourceBridgeToBlockstart( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - submitBlocks( - signedBlocks: BridgeCore.SignedBlockStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - submitChainBlockParentsAndTxs( - blockData: BridgeCore.SignedBlockStruct, - signedBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - txs: BridgeCore.BlockReceiptProofsStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - upgradeTo( - newImplementation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - upgradeToAndCall( - newImplementation: PromiseOrValue, - data: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - usedReceipts( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - validatorsCycleEnd(overrides?: CallOverrides): Promise; - - verifyParentBlocks( - chainId: PromiseOrValue, - childBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - childRlpHeader: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdraw( - token: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - BRIDGE_TOPIC(overrides?: CallOverrides): Promise; - - accountsDailyLimit( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - lastTransferReset: BigNumber; - bridged24Hours: BigNumber; - } - >; - - admin(overrides?: CallOverrides): Promise; - - bridgeDailyLimit( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - lastTransferReset: BigNumber; - bridged24Hours: BigNumber; - } - >; - - bridgeFees( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber] & { - minFee: BigNumber; - maxFee: BigNumber; - fee: BigNumber; - } - >; - - bridgeLimits( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, boolean] & { - dailyLimit: BigNumber; - txLimit: BigNumber; - accountDailyLimit: BigNumber; - minAmount: BigNumber; - onlyWhitelisted: boolean; - } - >; - - bridgeTo( - target: PromiseOrValue, - targetChainId: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - bridgeToWithoutRelay( - target: PromiseOrValue, - targetChainId: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - bridgedToken(overrides?: CallOverrides): Promise; - - canBridge( - from: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean, string] & { isWithinLimit: boolean; error: string }>; - - chainIdToStats( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber] & { - totalBridged: BigNumber; - totalRelayFees: BigNumber; - totalBridgeFees: BigNumber; - } - >; - - chainStartBlock( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - chainVerifiedBlocks( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - closeBridge( - token: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - consensusRatio(overrides?: CallOverrides): Promise; - - currentId(overrides?: CallOverrides): Promise; - - currentValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - executeReceipts( - chainId: PromiseOrValue, - blocks: BridgeCore.BlockReceiptProofsStruct[], - overrides?: CallOverrides - ): Promise; - - executedRequests( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - faucet(overrides?: CallOverrides): Promise; - - initialize( - _validators: PromiseOrValue[], - _cycleEnd: PromiseOrValue, - _requiredValidators: PromiseOrValue[], - _consensusRatio: PromiseOrValue, - _bridgedToken: PromiseOrValue, - _fees: TokenBridge.BridgeFeesStruct, - _limits: TokenBridge.BridgeLimitsStruct, - _faucet: PromiseOrValue, - _nameService: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isClosed(overrides?: CallOverrides): Promise; - - isValidConsensus( - signers: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - nameService(overrides?: CallOverrides): Promise; - - normalizeFrom18ToTokenDecimals( - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - normalizeFromTokenTo18Decimals( - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - numRequiredValidators(overrides?: CallOverrides): Promise; - - numValidators(overrides?: CallOverrides): Promise; - - onTokenTransfer( - from: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - proxiableUUID(overrides?: CallOverrides): Promise; - - renounceOwnership(overrides?: CallOverrides): Promise; - - requiredValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - requiredValidatorsSet(overrides?: CallOverrides): Promise; - - setAdmin( - _admin: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setBridgeFees( - _fees: TokenBridge.BridgeFeesStruct, - overrides?: CallOverrides - ): Promise; - - setBridgeLimits( - _limits: TokenBridge.BridgeLimitsStruct, - overrides?: CallOverrides - ): Promise; - - setConsensusRatio( - _consensusRatio: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setFaucet( - _faucet: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setRequiredValidators( - validators: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - setSourceBridges( - bridges: PromiseOrValue[], - blockstart: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - sourceBridgeToBlockstart( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - submitBlocks( - signedBlocks: BridgeCore.SignedBlockStruct[], - overrides?: CallOverrides - ): Promise; - - submitChainBlockParentsAndTxs( - blockData: BridgeCore.SignedBlockStruct, - signedBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - txs: BridgeCore.BlockReceiptProofsStruct[], - overrides?: CallOverrides - ): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - upgradeTo( - newImplementation: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - upgradeToAndCall( - newImplementation: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - usedReceipts( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - validatorsCycleEnd(overrides?: CallOverrides): Promise; - - verifyParentBlocks( - chainId: PromiseOrValue, - childBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - childRlpHeader: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - withdraw( - token: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "AdminChanged(address,address)"( - previousAdmin?: null, - newAdmin?: null - ): AdminChangedEventFilter; - AdminChanged( - previousAdmin?: null, - newAdmin?: null - ): AdminChangedEventFilter; - - "BeaconUpgraded(address)"( - beacon?: PromiseOrValue | null - ): BeaconUpgradedEventFilter; - BeaconUpgraded( - beacon?: PromiseOrValue | null - ): BeaconUpgradedEventFilter; - - "BlockVerified(uint256,uint256,bytes32)"( - chainId?: null, - blockNumber?: null, - blockHash?: null - ): BlockVerifiedEventFilter; - BlockVerified( - chainId?: null, - blockNumber?: null, - blockHash?: null - ): BlockVerifiedEventFilter; - - "BridgeRequest(address,address,uint256,uint256,bool,uint256,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - targetChainId?: null, - amount?: null, - withRelay?: null, - timestamp?: null, - id?: PromiseOrValue | null - ): BridgeRequestEventFilter; - BridgeRequest( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - targetChainId?: null, - amount?: null, - withRelay?: null, - timestamp?: null, - id?: PromiseOrValue | null - ): BridgeRequestEventFilter; - - "ExecutedTransfer(address,address,address,uint256,uint256,uint256,uint256,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - relayer?: null, - amount?: null, - fee?: null, - sourceChainId?: null, - sourceBlockNumber?: null, - id?: PromiseOrValue | null - ): ExecutedTransferEventFilter; - ExecutedTransfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - relayer?: null, - amount?: null, - fee?: null, - sourceChainId?: null, - sourceBlockNumber?: null, - id?: PromiseOrValue | null - ): ExecutedTransferEventFilter; - - "Initialized(uint8)"(version?: null): InitializedEventFilter; - Initialized(version?: null): InitializedEventFilter; - - "OwnershipTransferred(address,address)"( - previousOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): OwnershipTransferredEventFilter; - OwnershipTransferred( - previousOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): OwnershipTransferredEventFilter; - - "Upgraded(address)"( - implementation?: PromiseOrValue | null - ): UpgradedEventFilter; - Upgraded( - implementation?: PromiseOrValue | null - ): UpgradedEventFilter; - - "ValidatorsSet(address[],uint256)"( - validators?: null, - cycleEnd?: null - ): ValidatorsSetEventFilter; - ValidatorsSet(validators?: null, cycleEnd?: null): ValidatorsSetEventFilter; - }; - - estimateGas: { - BRIDGE_TOPIC(overrides?: CallOverrides): Promise; - - accountsDailyLimit( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - admin(overrides?: CallOverrides): Promise; - - bridgeDailyLimit(overrides?: CallOverrides): Promise; - - bridgeFees(overrides?: CallOverrides): Promise; - - bridgeLimits(overrides?: CallOverrides): Promise; - - bridgeTo( - target: PromiseOrValue, - targetChainId: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - bridgeToWithoutRelay( - target: PromiseOrValue, - targetChainId: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - bridgedToken(overrides?: CallOverrides): Promise; - - canBridge( - from: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - chainIdToStats( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - chainStartBlock( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - chainVerifiedBlocks( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - closeBridge( - token: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - consensusRatio(overrides?: CallOverrides): Promise; - - currentId(overrides?: CallOverrides): Promise; - - currentValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - executeReceipts( - chainId: PromiseOrValue, - blocks: BridgeCore.BlockReceiptProofsStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - executedRequests( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - faucet(overrides?: CallOverrides): Promise; - - initialize( - _validators: PromiseOrValue[], - _cycleEnd: PromiseOrValue, - _requiredValidators: PromiseOrValue[], - _consensusRatio: PromiseOrValue, - _bridgedToken: PromiseOrValue, - _fees: TokenBridge.BridgeFeesStruct, - _limits: TokenBridge.BridgeLimitsStruct, - _faucet: PromiseOrValue, - _nameService: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isClosed(overrides?: CallOverrides): Promise; - - isValidConsensus( - signers: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - nameService(overrides?: CallOverrides): Promise; - - normalizeFrom18ToTokenDecimals( - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - normalizeFromTokenTo18Decimals( - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - numRequiredValidators(overrides?: CallOverrides): Promise; - - numValidators(overrides?: CallOverrides): Promise; - - onTokenTransfer( - from: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - proxiableUUID(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - requiredValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - requiredValidatorsSet(overrides?: CallOverrides): Promise; - - setAdmin( - _admin: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setBridgeFees( - _fees: TokenBridge.BridgeFeesStruct, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setBridgeLimits( - _limits: TokenBridge.BridgeLimitsStruct, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setConsensusRatio( - _consensusRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFaucet( - _faucet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRequiredValidators( - validators: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSourceBridges( - bridges: PromiseOrValue[], - blockstart: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sourceBridgeToBlockstart( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - submitBlocks( - signedBlocks: BridgeCore.SignedBlockStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - submitChainBlockParentsAndTxs( - blockData: BridgeCore.SignedBlockStruct, - signedBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - txs: BridgeCore.BlockReceiptProofsStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - upgradeTo( - newImplementation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - upgradeToAndCall( - newImplementation: PromiseOrValue, - data: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - usedReceipts( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - validatorsCycleEnd(overrides?: CallOverrides): Promise; - - verifyParentBlocks( - chainId: PromiseOrValue, - childBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - childRlpHeader: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdraw( - token: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - BRIDGE_TOPIC(overrides?: CallOverrides): Promise; - - accountsDailyLimit( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - admin(overrides?: CallOverrides): Promise; - - bridgeDailyLimit(overrides?: CallOverrides): Promise; - - bridgeFees(overrides?: CallOverrides): Promise; - - bridgeLimits(overrides?: CallOverrides): Promise; - - bridgeTo( - target: PromiseOrValue, - targetChainId: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - bridgeToWithoutRelay( - target: PromiseOrValue, - targetChainId: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - bridgedToken(overrides?: CallOverrides): Promise; - - canBridge( - from: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - chainIdToStats( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - chainStartBlock( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - chainVerifiedBlocks( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - closeBridge( - token: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - consensusRatio(overrides?: CallOverrides): Promise; - - currentId(overrides?: CallOverrides): Promise; - - currentValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - executeReceipts( - chainId: PromiseOrValue, - blocks: BridgeCore.BlockReceiptProofsStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - executedRequests( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - faucet(overrides?: CallOverrides): Promise; - - initialize( - _validators: PromiseOrValue[], - _cycleEnd: PromiseOrValue, - _requiredValidators: PromiseOrValue[], - _consensusRatio: PromiseOrValue, - _bridgedToken: PromiseOrValue, - _fees: TokenBridge.BridgeFeesStruct, - _limits: TokenBridge.BridgeLimitsStruct, - _faucet: PromiseOrValue, - _nameService: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isClosed(overrides?: CallOverrides): Promise; - - isValidConsensus( - signers: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - nameService(overrides?: CallOverrides): Promise; - - normalizeFrom18ToTokenDecimals( - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - normalizeFromTokenTo18Decimals( - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - numRequiredValidators( - overrides?: CallOverrides - ): Promise; - - numValidators(overrides?: CallOverrides): Promise; - - onTokenTransfer( - from: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - proxiableUUID(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - requiredValidators( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - requiredValidatorsSet( - overrides?: CallOverrides - ): Promise; - - setAdmin( - _admin: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setBridgeFees( - _fees: TokenBridge.BridgeFeesStruct, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setBridgeLimits( - _limits: TokenBridge.BridgeLimitsStruct, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setConsensusRatio( - _consensusRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFaucet( - _faucet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRequiredValidators( - validators: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSourceBridges( - bridges: PromiseOrValue[], - blockstart: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sourceBridgeToBlockstart( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - submitBlocks( - signedBlocks: BridgeCore.SignedBlockStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - submitChainBlockParentsAndTxs( - blockData: BridgeCore.SignedBlockStruct, - signedBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - txs: BridgeCore.BlockReceiptProofsStruct[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - upgradeTo( - newImplementation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - upgradeToAndCall( - newImplementation: PromiseOrValue, - data: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - usedReceipts( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - validatorsCycleEnd( - overrides?: CallOverrides - ): Promise; - - verifyParentBlocks( - chainId: PromiseOrValue, - childBlockNumber: PromiseOrValue, - parentRlpHeaders: PromiseOrValue[], - childRlpHeader: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdraw( - token: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; -} diff --git a/packages/bridge-contracts/typechain-types/contracts/test/VerifierTest.ts b/packages/bridge-contracts/typechain-types/contracts/test/VerifierTest.ts deleted file mode 100644 index 90c283d..0000000 --- a/packages/bridge-contracts/typechain-types/contracts/test/VerifierTest.ts +++ /dev/null @@ -1,204 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "../../common"; - -export declare namespace RLPParser { - export type LogStruct = { - contractAddress: PromiseOrValue; - topics: PromiseOrValue[]; - data: PromiseOrValue; - }; - - export type LogStructOutput = [string, string[], string] & { - contractAddress: string; - topics: string[]; - data: string; - }; - - export type TransactionReceiptStruct = { - status: PromiseOrValue; - gasUsed: PromiseOrValue; - logsBloom: PromiseOrValue; - logs: RLPParser.LogStruct[]; - }; - - export type TransactionReceiptStructOutput = [ - number, - BigNumber, - string, - RLPParser.LogStructOutput[] - ] & { - status: number; - gasUsed: BigNumber; - logsBloom: string; - logs: RLPParser.LogStructOutput[]; - }; -} - -export declare namespace MPT { - export type MerkleProofStruct = { - expectedRoot: PromiseOrValue; - key: PromiseOrValue; - proof: PromiseOrValue[]; - keyIndex: PromiseOrValue; - proofIndex: PromiseOrValue; - expectedValue: PromiseOrValue; - }; - - export type MerkleProofStructOutput = [ - string, - string, - string[], - BigNumber, - BigNumber, - string - ] & { - expectedRoot: string; - key: string; - proof: string[]; - keyIndex: BigNumber; - proofIndex: BigNumber; - expectedValue: string; - }; -} - -export interface VerifierTestInterface extends utils.Interface { - functions: { - "parseReceipt(bytes)": FunctionFragment; - "verifyReceipt((bytes32,bytes,bytes[],uint256,uint256,bytes))": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: "parseReceipt" | "verifyReceipt" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "parseReceipt", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "verifyReceipt", - values: [MPT.MerkleProofStruct] - ): string; - - decodeFunctionResult( - functionFragment: "parseReceipt", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "verifyReceipt", - data: BytesLike - ): Result; - - events: {}; -} - -export interface VerifierTest extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: VerifierTestInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - parseReceipt( - receiptRlp: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [RLPParser.TransactionReceiptStructOutput] & { - receipt: RLPParser.TransactionReceiptStructOutput; - } - >; - - verifyReceipt( - proof: MPT.MerkleProofStruct, - overrides?: CallOverrides - ): Promise<[boolean] & { ok: boolean }>; - }; - - parseReceipt( - receiptRlp: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - verifyReceipt( - proof: MPT.MerkleProofStruct, - overrides?: CallOverrides - ): Promise; - - callStatic: { - parseReceipt( - receiptRlp: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - verifyReceipt( - proof: MPT.MerkleProofStruct, - overrides?: CallOverrides - ): Promise; - }; - - filters: {}; - - estimateGas: { - parseReceipt( - receiptRlp: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - verifyReceipt( - proof: MPT.MerkleProofStruct, - overrides?: CallOverrides - ): Promise; - }; - - populateTransaction: { - parseReceipt( - receiptRlp: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - verifyReceipt( - proof: MPT.MerkleProofStruct, - overrides?: CallOverrides - ): Promise; - }; -} diff --git a/packages/bridge-contracts/typechain-types/contracts/test/VotingMock.sol/IBlockHeaderRegistry.ts b/packages/bridge-contracts/typechain-types/contracts/test/VotingMock.sol/IBlockHeaderRegistry.ts deleted file mode 100644 index 3210dec..0000000 --- a/packages/bridge-contracts/typechain-types/contracts/test/VotingMock.sol/IBlockHeaderRegistry.ts +++ /dev/null @@ -1,111 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "../../../common"; - -export interface IBlockHeaderRegistryInterface extends utils.Interface { - functions: { - "addBlockchain(uint256,string)": FunctionFragment; - }; - - getFunction(nameOrSignatureOrTopic: "addBlockchain"): FunctionFragment; - - encodeFunctionData( - functionFragment: "addBlockchain", - values: [PromiseOrValue, PromiseOrValue] - ): string; - - decodeFunctionResult( - functionFragment: "addBlockchain", - data: BytesLike - ): Result; - - events: {}; -} - -export interface IBlockHeaderRegistry extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: IBlockHeaderRegistryInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - addBlockchain( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - addBlockchain( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - addBlockchain( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: {}; - - estimateGas: { - addBlockchain( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - addBlockchain( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; -} diff --git a/packages/bridge-contracts/typechain-types/contracts/test/VotingMock.sol/VotingMock.ts b/packages/bridge-contracts/typechain-types/contracts/test/VotingMock.sol/VotingMock.ts deleted file mode 100644 index 81d7d83..0000000 --- a/packages/bridge-contracts/typechain-types/contracts/test/VotingMock.sol/VotingMock.ts +++ /dev/null @@ -1,120 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "../../../common"; - -export interface VotingMockInterface extends utils.Interface { - functions: { - "addBlockchain(address,uint256,string)": FunctionFragment; - }; - - getFunction(nameOrSignatureOrTopic: "addBlockchain"): FunctionFragment; - - encodeFunctionData( - functionFragment: "addBlockchain", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - - decodeFunctionResult( - functionFragment: "addBlockchain", - data: BytesLike - ): Result; - - events: {}; -} - -export interface VotingMock extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: VotingMockInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - addBlockchain( - registry: PromiseOrValue, - chainId: PromiseOrValue, - rpc: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - addBlockchain( - registry: PromiseOrValue, - chainId: PromiseOrValue, - rpc: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - addBlockchain( - registry: PromiseOrValue, - chainId: PromiseOrValue, - rpc: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: {}; - - estimateGas: { - addBlockchain( - registry: PromiseOrValue, - chainId: PromiseOrValue, - rpc: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - addBlockchain( - registry: PromiseOrValue, - chainId: PromiseOrValue, - rpc: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; -} diff --git a/packages/bridge-contracts/typechain-types/contracts/test/VotingMock.sol/index.ts b/packages/bridge-contracts/typechain-types/contracts/test/VotingMock.sol/index.ts deleted file mode 100644 index 0eacad4..0000000 --- a/packages/bridge-contracts/typechain-types/contracts/test/VotingMock.sol/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { IBlockHeaderRegistry } from "./IBlockHeaderRegistry"; -export type { VotingMock } from "./VotingMock"; diff --git a/packages/bridge-contracts/typechain-types/contracts/test/index.ts b/packages/bridge-contracts/typechain-types/contracts/test/index.ts deleted file mode 100644 index acb2be1..0000000 --- a/packages/bridge-contracts/typechain-types/contracts/test/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type * as multiCallSol from "./MultiCall.sol"; -export type { multiCallSol }; -import type * as testTokenSol from "./TestToken.sol"; -export type { testTokenSol }; -import type * as votingMockSol from "./VotingMock.sol"; -export type { votingMockSol }; -export type { ConsensusMock } from "./ConsensusMock"; -export type { ControllerMock } from "./ControllerMock"; -export type { GoodDollarOFTAdapterHarness } from "./GoodDollarOFTAdapterHarness"; -export type { IdentityMock } from "./IdentityMock"; -export type { LayerZeroEndpointMock } from "./LayerZeroEndpointMock"; -export type { MockGoodDollar } from "./MockGoodDollar"; -export type { NameServiceMock } from "./NameServiceMock"; -export type { TestRLPParser } from "./TestRLPParser"; -export type { TokenBridgeTest } from "./TokenBridgeTest"; -export type { VerifierTest } from "./VerifierTest"; diff --git a/packages/bridge-contracts/typechain-types/hardhat.d.ts b/packages/bridge-contracts/typechain-types/hardhat.d.ts deleted file mode 100644 index 9705bfb..0000000 --- a/packages/bridge-contracts/typechain-types/hardhat.d.ts +++ /dev/null @@ -1,1221 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { ethers } from "ethers"; -import { - FactoryOptions, - HardhatEthersHelpers as HardhatEthersHelpersBase, -} from "@nomiclabs/hardhat-ethers/types"; - -import * as Contracts from "."; - -declare module "hardhat/types/runtime" { - interface HardhatEthersHelpers extends HardhatEthersHelpersBase { - getContractFactory( - name: "AxelarExecutable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IAxelarExecutable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IAxelarGasService", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IAxelarGateway", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "StringToAddress", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "Avatar", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "Controller", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "GlobalConstraintInterface", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IntVoteInterface", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ReputationInterface", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "SchemeRegistrar", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "AggregatorV3Interface", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "CERC20", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ERC20", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IAaveIncentivesController", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IAdminWallet", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IDonationStaking", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IERC2917", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IFirstClaimPool", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IGoodDollar", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IGoodStaking", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IHasRouter", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IIdentity", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IIdentityV2", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ILendingPool", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IMultichainRouter", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "INameService", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IQuoterV2", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ISwapRouter", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IUBIScheme", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ProxyAdmin", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "Reserve", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "Staking", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "Uniswap", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "UniswapFactory", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "UniswapPair", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "DAOContract", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "DAOUpgradeableContract", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ERC1967Proxy", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ProxyFactory1967", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ILayerZeroEndpointV2", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ILayerZeroReceiver", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IMessageLib", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IMessageLibManager", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IMessagingChannel", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IMessagingComposer", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IMessagingContext", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ISendLib", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "AddressCast", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "OAppOptionsType3Upgradeable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "OAppCoreUpgradeable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "OAppReceiverUpgradeable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "OAppSenderUpgradeable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "OAppUpgradeable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "OAppPreCrimeSimulatorUpgradeable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IOAppCore", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IOAppMsgInspector", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IOAppOptionsType3", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IOAppReceiver", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "OAppCore", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "OAppSender", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IOAppPreCrimeSimulator", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IPreCrime", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "OFTCoreUpgradeable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IMintableBurnable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IOFT", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ILayerZeroEndpointUpgradeable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ILayerZeroReceiverUpgradeable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ILayerZeroUserApplicationConfigUpgradeable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "LzAppUpgradeable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "NonblockingLzAppUpgradeable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "AccessControlUpgradeable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IAccessControlUpgradeable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "OwnableUpgradeable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IERC1822ProxiableUpgradeable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IERC1967Upgradeable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IBeaconUpgradeable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ERC1967UpgradeUpgradeable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "Initializable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "UUPSUpgradeable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ContextUpgradeable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ERC165Upgradeable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IERC165Upgradeable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "Ownable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IERC1822Proxiable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IERC1967", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IBeacon", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ERC1967Upgrade", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "Proxy", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ERC20", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IERC20Metadata", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IERC20Permit", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IERC20", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IERC165", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "BlockHeaderRegistry", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "BridgeCore", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "BridgeMixedConsensus", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IFaucet", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IIdentity", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "INameService", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "TokenBridge", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IConsensus", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "AxelarHandlerUpgradeable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "BridgeHelperLibrary", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IIdentity", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ILayerZeroFeeEstimator", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IMessagePassingBridge", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "LZHandlerUpgradeable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IFaucet", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "MessagePassingBridge", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "GoodDollarMinterBurner", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IIdentity", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "GoodDollarOFTAdapter", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IIdentity", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "GoodDollarOFTMinterBurner", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ISuperGoodDollar", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ConsensusMock", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ControllerMock", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "GoodDollarOFTAdapterHarness", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IdentityMock", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "LayerZeroEndpointMock", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "MockGoodDollar", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "Multicall", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "NameServiceMock", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "TestRLPParser", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "TestToken", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "TestToken10", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "TestToken27", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "TokenBridgeTest", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "VerifierTest", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IBlockHeaderRegistry", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "VotingMock", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - - getContractAt( - name: "AxelarExecutable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IAxelarExecutable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IAxelarGasService", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IAxelarGateway", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "StringToAddress", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "Avatar", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "Controller", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "GlobalConstraintInterface", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IntVoteInterface", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ReputationInterface", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "SchemeRegistrar", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "AggregatorV3Interface", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "CERC20", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ERC20", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IAaveIncentivesController", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IAdminWallet", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IDonationStaking", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IERC2917", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IFirstClaimPool", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IGoodDollar", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IGoodStaking", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IHasRouter", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IIdentity", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IIdentityV2", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ILendingPool", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IMultichainRouter", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "INameService", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IQuoterV2", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ISwapRouter", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IUBIScheme", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ProxyAdmin", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "Reserve", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "Staking", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "Uniswap", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "UniswapFactory", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "UniswapPair", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "DAOContract", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "DAOUpgradeableContract", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ERC1967Proxy", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ProxyFactory1967", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ILayerZeroEndpointV2", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ILayerZeroReceiver", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IMessageLib", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IMessageLibManager", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IMessagingChannel", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IMessagingComposer", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IMessagingContext", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ISendLib", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "AddressCast", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "OAppOptionsType3Upgradeable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "OAppCoreUpgradeable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "OAppReceiverUpgradeable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "OAppSenderUpgradeable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "OAppUpgradeable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "OAppPreCrimeSimulatorUpgradeable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IOAppCore", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IOAppMsgInspector", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IOAppOptionsType3", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IOAppReceiver", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "OAppCore", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "OAppSender", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IOAppPreCrimeSimulator", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IPreCrime", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "OFTCoreUpgradeable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IMintableBurnable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IOFT", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ILayerZeroEndpointUpgradeable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ILayerZeroReceiverUpgradeable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ILayerZeroUserApplicationConfigUpgradeable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "LzAppUpgradeable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "NonblockingLzAppUpgradeable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "AccessControlUpgradeable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IAccessControlUpgradeable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "OwnableUpgradeable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IERC1822ProxiableUpgradeable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IERC1967Upgradeable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IBeaconUpgradeable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ERC1967UpgradeUpgradeable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "Initializable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "UUPSUpgradeable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ContextUpgradeable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ERC165Upgradeable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IERC165Upgradeable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "Ownable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IERC1822Proxiable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IERC1967", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IBeacon", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ERC1967Upgrade", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "Proxy", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ERC20", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IERC20Metadata", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IERC20Permit", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IERC20", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IERC165", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "BlockHeaderRegistry", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "BridgeCore", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "BridgeMixedConsensus", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IFaucet", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IIdentity", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "INameService", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "TokenBridge", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IConsensus", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "AxelarHandlerUpgradeable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "BridgeHelperLibrary", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IIdentity", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ILayerZeroFeeEstimator", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IMessagePassingBridge", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "LZHandlerUpgradeable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IFaucet", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "MessagePassingBridge", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "GoodDollarMinterBurner", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IIdentity", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "GoodDollarOFTAdapter", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IIdentity", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "GoodDollarOFTMinterBurner", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ISuperGoodDollar", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ConsensusMock", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ControllerMock", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "GoodDollarOFTAdapterHarness", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IdentityMock", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "LayerZeroEndpointMock", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "MockGoodDollar", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "Multicall", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "NameServiceMock", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "TestRLPParser", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "TestToken", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "TestToken10", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "TestToken27", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "TokenBridgeTest", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "VerifierTest", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IBlockHeaderRegistry", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "VotingMock", - address: string, - signer?: ethers.Signer - ): Promise; - - // default types - getContractFactory( - name: string, - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - abi: any[], - bytecode: ethers.utils.BytesLike, - signer?: ethers.Signer - ): Promise; - getContractAt( - nameOrAbi: string | any[], - address: string, - signer?: ethers.Signer - ): Promise; - } -} diff --git a/packages/bridge-contracts/typechain-types/index.ts b/packages/bridge-contracts/typechain-types/index.ts deleted file mode 100644 index b8342e4..0000000 --- a/packages/bridge-contracts/typechain-types/index.ts +++ /dev/null @@ -1,264 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type * as axelarNetwork from "./@axelar-network"; -export type { axelarNetwork }; -import type * as gooddollar from "./@gooddollar"; -export type { gooddollar }; -import type * as layerzerolabs from "./@layerzerolabs"; -export type { layerzerolabs }; -import type * as openzeppelin from "./@openzeppelin"; -export type { openzeppelin }; -import type * as contracts from "./contracts"; -export type { contracts }; -export * as factories from "./factories"; -export type { AxelarExecutable } from "./@axelar-network/axelar-gmp-sdk-solidity/contracts/executable/AxelarExecutable"; -export { AxelarExecutable__factory } from "./factories/@axelar-network/axelar-gmp-sdk-solidity/contracts/executable/AxelarExecutable__factory"; -export type { IAxelarExecutable } from "./@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IAxelarExecutable"; -export { IAxelarExecutable__factory } from "./factories/@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IAxelarExecutable__factory"; -export type { IAxelarGasService } from "./@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IAxelarGasService"; -export { IAxelarGasService__factory } from "./factories/@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IAxelarGasService__factory"; -export type { IAxelarGateway } from "./@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IAxelarGateway"; -export { IAxelarGateway__factory } from "./factories/@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IAxelarGateway__factory"; -export type { StringToAddress } from "./@axelar-network/axelar-gmp-sdk-solidity/contracts/utils/AddressString.sol/StringToAddress"; -export { StringToAddress__factory } from "./factories/@axelar-network/axelar-gmp-sdk-solidity/contracts/utils/AddressString.sol/StringToAddress__factory"; -export type { Avatar } from "./@gooddollar/goodprotocol/contracts/DAOStackInterfaces.sol/Avatar"; -export { Avatar__factory } from "./factories/@gooddollar/goodprotocol/contracts/DAOStackInterfaces.sol/Avatar__factory"; -export type { Controller } from "./@gooddollar/goodprotocol/contracts/DAOStackInterfaces.sol/Controller"; -export { Controller__factory } from "./factories/@gooddollar/goodprotocol/contracts/DAOStackInterfaces.sol/Controller__factory"; -export type { GlobalConstraintInterface } from "./@gooddollar/goodprotocol/contracts/DAOStackInterfaces.sol/GlobalConstraintInterface"; -export { GlobalConstraintInterface__factory } from "./factories/@gooddollar/goodprotocol/contracts/DAOStackInterfaces.sol/GlobalConstraintInterface__factory"; -export type { IntVoteInterface } from "./@gooddollar/goodprotocol/contracts/DAOStackInterfaces.sol/IntVoteInterface"; -export { IntVoteInterface__factory } from "./factories/@gooddollar/goodprotocol/contracts/DAOStackInterfaces.sol/IntVoteInterface__factory"; -export type { ReputationInterface } from "./@gooddollar/goodprotocol/contracts/DAOStackInterfaces.sol/ReputationInterface"; -export { ReputationInterface__factory } from "./factories/@gooddollar/goodprotocol/contracts/DAOStackInterfaces.sol/ReputationInterface__factory"; -export type { SchemeRegistrar } from "./@gooddollar/goodprotocol/contracts/DAOStackInterfaces.sol/SchemeRegistrar"; -export { SchemeRegistrar__factory } from "./factories/@gooddollar/goodprotocol/contracts/DAOStackInterfaces.sol/SchemeRegistrar__factory"; -export type { AggregatorV3Interface } from "./@gooddollar/goodprotocol/contracts/Interfaces.sol/AggregatorV3Interface"; -export { AggregatorV3Interface__factory } from "./factories/@gooddollar/goodprotocol/contracts/Interfaces.sol/AggregatorV3Interface__factory"; -export type { CERC20 } from "./@gooddollar/goodprotocol/contracts/Interfaces.sol/CERC20"; -export { CERC20__factory } from "./factories/@gooddollar/goodprotocol/contracts/Interfaces.sol/CERC20__factory"; -export type { ERC20 } from "./@gooddollar/goodprotocol/contracts/Interfaces.sol/ERC20"; -export { ERC20__factory } from "./factories/@gooddollar/goodprotocol/contracts/Interfaces.sol/ERC20__factory"; -export type { IAaveIncentivesController } from "./@gooddollar/goodprotocol/contracts/Interfaces.sol/IAaveIncentivesController"; -export { IAaveIncentivesController__factory } from "./factories/@gooddollar/goodprotocol/contracts/Interfaces.sol/IAaveIncentivesController__factory"; -export type { IAdminWallet } from "./@gooddollar/goodprotocol/contracts/Interfaces.sol/IAdminWallet"; -export { IAdminWallet__factory } from "./factories/@gooddollar/goodprotocol/contracts/Interfaces.sol/IAdminWallet__factory"; -export type { IDonationStaking } from "./@gooddollar/goodprotocol/contracts/Interfaces.sol/IDonationStaking"; -export { IDonationStaking__factory } from "./factories/@gooddollar/goodprotocol/contracts/Interfaces.sol/IDonationStaking__factory"; -export type { IERC2917 } from "./@gooddollar/goodprotocol/contracts/Interfaces.sol/IERC2917"; -export { IERC2917__factory } from "./factories/@gooddollar/goodprotocol/contracts/Interfaces.sol/IERC2917__factory"; -export type { IFirstClaimPool } from "./@gooddollar/goodprotocol/contracts/Interfaces.sol/IFirstClaimPool"; -export { IFirstClaimPool__factory } from "./factories/@gooddollar/goodprotocol/contracts/Interfaces.sol/IFirstClaimPool__factory"; -export type { IGoodDollar } from "./@gooddollar/goodprotocol/contracts/Interfaces.sol/IGoodDollar"; -export { IGoodDollar__factory } from "./factories/@gooddollar/goodprotocol/contracts/Interfaces.sol/IGoodDollar__factory"; -export type { IGoodStaking } from "./@gooddollar/goodprotocol/contracts/Interfaces.sol/IGoodStaking"; -export { IGoodStaking__factory } from "./factories/@gooddollar/goodprotocol/contracts/Interfaces.sol/IGoodStaking__factory"; -export type { IHasRouter } from "./@gooddollar/goodprotocol/contracts/Interfaces.sol/IHasRouter"; -export { IHasRouter__factory } from "./factories/@gooddollar/goodprotocol/contracts/Interfaces.sol/IHasRouter__factory"; -export type { IIdentity } from "./@gooddollar/goodprotocol/contracts/Interfaces.sol/IIdentity"; -export { IIdentity__factory } from "./factories/@gooddollar/goodprotocol/contracts/Interfaces.sol/IIdentity__factory"; -export type { IIdentityV2 } from "./@gooddollar/goodprotocol/contracts/Interfaces.sol/IIdentityV2"; -export { IIdentityV2__factory } from "./factories/@gooddollar/goodprotocol/contracts/Interfaces.sol/IIdentityV2__factory"; -export type { ILendingPool } from "./@gooddollar/goodprotocol/contracts/Interfaces.sol/ILendingPool"; -export { ILendingPool__factory } from "./factories/@gooddollar/goodprotocol/contracts/Interfaces.sol/ILendingPool__factory"; -export type { IMultichainRouter } from "./@gooddollar/goodprotocol/contracts/Interfaces.sol/IMultichainRouter"; -export { IMultichainRouter__factory } from "./factories/@gooddollar/goodprotocol/contracts/Interfaces.sol/IMultichainRouter__factory"; -export type { INameService } from "./@gooddollar/goodprotocol/contracts/Interfaces.sol/INameService"; -export { INameService__factory } from "./factories/@gooddollar/goodprotocol/contracts/Interfaces.sol/INameService__factory"; -export type { IQuoterV2 } from "./@gooddollar/goodprotocol/contracts/Interfaces.sol/IQuoterV2"; -export { IQuoterV2__factory } from "./factories/@gooddollar/goodprotocol/contracts/Interfaces.sol/IQuoterV2__factory"; -export type { ISwapRouter } from "./@gooddollar/goodprotocol/contracts/Interfaces.sol/ISwapRouter"; -export { ISwapRouter__factory } from "./factories/@gooddollar/goodprotocol/contracts/Interfaces.sol/ISwapRouter__factory"; -export type { IUBIScheme } from "./@gooddollar/goodprotocol/contracts/Interfaces.sol/IUBIScheme"; -export { IUBIScheme__factory } from "./factories/@gooddollar/goodprotocol/contracts/Interfaces.sol/IUBIScheme__factory"; -export type { ProxyAdmin } from "./@gooddollar/goodprotocol/contracts/Interfaces.sol/ProxyAdmin"; -export { ProxyAdmin__factory } from "./factories/@gooddollar/goodprotocol/contracts/Interfaces.sol/ProxyAdmin__factory"; -export type { Reserve } from "./@gooddollar/goodprotocol/contracts/Interfaces.sol/Reserve"; -export { Reserve__factory } from "./factories/@gooddollar/goodprotocol/contracts/Interfaces.sol/Reserve__factory"; -export type { Staking } from "./@gooddollar/goodprotocol/contracts/Interfaces.sol/Staking"; -export { Staking__factory } from "./factories/@gooddollar/goodprotocol/contracts/Interfaces.sol/Staking__factory"; -export type { Uniswap } from "./@gooddollar/goodprotocol/contracts/Interfaces.sol/Uniswap"; -export { Uniswap__factory } from "./factories/@gooddollar/goodprotocol/contracts/Interfaces.sol/Uniswap__factory"; -export type { UniswapFactory } from "./@gooddollar/goodprotocol/contracts/Interfaces.sol/UniswapFactory"; -export { UniswapFactory__factory } from "./factories/@gooddollar/goodprotocol/contracts/Interfaces.sol/UniswapFactory__factory"; -export type { UniswapPair } from "./@gooddollar/goodprotocol/contracts/Interfaces.sol/UniswapPair"; -export { UniswapPair__factory } from "./factories/@gooddollar/goodprotocol/contracts/Interfaces.sol/UniswapPair__factory"; -export type { DAOContract } from "./@gooddollar/goodprotocol/contracts/utils/DAOContract"; -export { DAOContract__factory } from "./factories/@gooddollar/goodprotocol/contracts/utils/DAOContract__factory"; -export type { DAOUpgradeableContract } from "./@gooddollar/goodprotocol/contracts/utils/DAOUpgradeableContract"; -export { DAOUpgradeableContract__factory } from "./factories/@gooddollar/goodprotocol/contracts/utils/DAOUpgradeableContract__factory"; -export type { ERC1967Proxy } from "./@gooddollar/goodprotocol/contracts/utils/ProxyFactory1967.sol/ERC1967Proxy"; -export { ERC1967Proxy__factory } from "./factories/@gooddollar/goodprotocol/contracts/utils/ProxyFactory1967.sol/ERC1967Proxy__factory"; -export type { ProxyFactory1967 } from "./@gooddollar/goodprotocol/contracts/utils/ProxyFactory1967.sol/ProxyFactory1967"; -export { ProxyFactory1967__factory } from "./factories/@gooddollar/goodprotocol/contracts/utils/ProxyFactory1967.sol/ProxyFactory1967__factory"; -export type { ILayerZeroEndpointV2 } from "./@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2"; -export { ILayerZeroEndpointV2__factory } from "./factories/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2__factory"; -export type { ILayerZeroReceiver } from "./@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroReceiver"; -export { ILayerZeroReceiver__factory } from "./factories/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroReceiver__factory"; -export type { IMessageLib } from "./@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessageLib"; -export { IMessageLib__factory } from "./factories/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessageLib__factory"; -export type { IMessageLibManager } from "./@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessageLibManager"; -export { IMessageLibManager__factory } from "./factories/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessageLibManager__factory"; -export type { IMessagingChannel } from "./@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingChannel"; -export { IMessagingChannel__factory } from "./factories/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingChannel__factory"; -export type { IMessagingComposer } from "./@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingComposer"; -export { IMessagingComposer__factory } from "./factories/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingComposer__factory"; -export type { IMessagingContext } from "./@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingContext"; -export { IMessagingContext__factory } from "./factories/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingContext__factory"; -export type { ISendLib } from "./@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ISendLib"; -export { ISendLib__factory } from "./factories/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ISendLib__factory"; -export type { AddressCast } from "./@layerzerolabs/lz-evm-protocol-v2/contracts/libs/AddressCast"; -export { AddressCast__factory } from "./factories/@layerzerolabs/lz-evm-protocol-v2/contracts/libs/AddressCast__factory"; -export type { OAppOptionsType3Upgradeable } from "./@layerzerolabs/oapp-evm-upgradeable/contracts/oapp/libs/OAppOptionsType3Upgradeable"; -export { OAppOptionsType3Upgradeable__factory } from "./factories/@layerzerolabs/oapp-evm-upgradeable/contracts/oapp/libs/OAppOptionsType3Upgradeable__factory"; -export type { OAppCoreUpgradeable } from "./@layerzerolabs/oapp-evm-upgradeable/contracts/oapp/OAppCoreUpgradeable"; -export { OAppCoreUpgradeable__factory } from "./factories/@layerzerolabs/oapp-evm-upgradeable/contracts/oapp/OAppCoreUpgradeable__factory"; -export type { OAppReceiverUpgradeable } from "./@layerzerolabs/oapp-evm-upgradeable/contracts/oapp/OAppReceiverUpgradeable"; -export { OAppReceiverUpgradeable__factory } from "./factories/@layerzerolabs/oapp-evm-upgradeable/contracts/oapp/OAppReceiverUpgradeable__factory"; -export type { OAppSenderUpgradeable } from "./@layerzerolabs/oapp-evm-upgradeable/contracts/oapp/OAppSenderUpgradeable"; -export { OAppSenderUpgradeable__factory } from "./factories/@layerzerolabs/oapp-evm-upgradeable/contracts/oapp/OAppSenderUpgradeable__factory"; -export type { OAppUpgradeable } from "./@layerzerolabs/oapp-evm-upgradeable/contracts/oapp/OAppUpgradeable"; -export { OAppUpgradeable__factory } from "./factories/@layerzerolabs/oapp-evm-upgradeable/contracts/oapp/OAppUpgradeable__factory"; -export type { OAppPreCrimeSimulatorUpgradeable } from "./@layerzerolabs/oapp-evm-upgradeable/contracts/precrime/OAppPreCrimeSimulatorUpgradeable"; -export { OAppPreCrimeSimulatorUpgradeable__factory } from "./factories/@layerzerolabs/oapp-evm-upgradeable/contracts/precrime/OAppPreCrimeSimulatorUpgradeable__factory"; -export type { IOAppCore } from "./@layerzerolabs/oapp-evm/contracts/oapp/interfaces/IOAppCore"; -export { IOAppCore__factory } from "./factories/@layerzerolabs/oapp-evm/contracts/oapp/interfaces/IOAppCore__factory"; -export type { IOAppMsgInspector } from "./@layerzerolabs/oapp-evm/contracts/oapp/interfaces/IOAppMsgInspector"; -export { IOAppMsgInspector__factory } from "./factories/@layerzerolabs/oapp-evm/contracts/oapp/interfaces/IOAppMsgInspector__factory"; -export type { IOAppOptionsType3 } from "./@layerzerolabs/oapp-evm/contracts/oapp/interfaces/IOAppOptionsType3"; -export { IOAppOptionsType3__factory } from "./factories/@layerzerolabs/oapp-evm/contracts/oapp/interfaces/IOAppOptionsType3__factory"; -export type { IOAppReceiver } from "./@layerzerolabs/oapp-evm/contracts/oapp/interfaces/IOAppReceiver"; -export { IOAppReceiver__factory } from "./factories/@layerzerolabs/oapp-evm/contracts/oapp/interfaces/IOAppReceiver__factory"; -export type { OAppCore } from "./@layerzerolabs/oapp-evm/contracts/oapp/OAppCore"; -export { OAppCore__factory } from "./factories/@layerzerolabs/oapp-evm/contracts/oapp/OAppCore__factory"; -export type { OAppSender } from "./@layerzerolabs/oapp-evm/contracts/oapp/OAppSender"; -export { OAppSender__factory } from "./factories/@layerzerolabs/oapp-evm/contracts/oapp/OAppSender__factory"; -export type { IOAppPreCrimeSimulator } from "./@layerzerolabs/oapp-evm/contracts/precrime/interfaces/IOAppPreCrimeSimulator"; -export { IOAppPreCrimeSimulator__factory } from "./factories/@layerzerolabs/oapp-evm/contracts/precrime/interfaces/IOAppPreCrimeSimulator__factory"; -export type { IPreCrime } from "./@layerzerolabs/oapp-evm/contracts/precrime/interfaces/IPreCrime"; -export { IPreCrime__factory } from "./factories/@layerzerolabs/oapp-evm/contracts/precrime/interfaces/IPreCrime__factory"; -export type { OFTCoreUpgradeable } from "./@layerzerolabs/oft-evm-upgradeable/contracts/oft/OFTCoreUpgradeable"; -export { OFTCoreUpgradeable__factory } from "./factories/@layerzerolabs/oft-evm-upgradeable/contracts/oft/OFTCoreUpgradeable__factory"; -export type { IMintableBurnable } from "./@layerzerolabs/oft-evm/contracts/interfaces/IMintableBurnable"; -export { IMintableBurnable__factory } from "./factories/@layerzerolabs/oft-evm/contracts/interfaces/IMintableBurnable__factory"; -export type { IOFT } from "./@layerzerolabs/oft-evm/contracts/interfaces/IOFT"; -export { IOFT__factory } from "./factories/@layerzerolabs/oft-evm/contracts/interfaces/IOFT__factory"; -export type { ILayerZeroEndpointUpgradeable } from "./@layerzerolabs/solidity-examples/contracts/contracts-upgradable/interfaces/ILayerZeroEndpointUpgradeable"; -export { ILayerZeroEndpointUpgradeable__factory } from "./factories/@layerzerolabs/solidity-examples/contracts/contracts-upgradable/interfaces/ILayerZeroEndpointUpgradeable__factory"; -export type { ILayerZeroReceiverUpgradeable } from "./@layerzerolabs/solidity-examples/contracts/contracts-upgradable/interfaces/ILayerZeroReceiverUpgradeable"; -export { ILayerZeroReceiverUpgradeable__factory } from "./factories/@layerzerolabs/solidity-examples/contracts/contracts-upgradable/interfaces/ILayerZeroReceiverUpgradeable__factory"; -export type { ILayerZeroUserApplicationConfigUpgradeable } from "./@layerzerolabs/solidity-examples/contracts/contracts-upgradable/interfaces/ILayerZeroUserApplicationConfigUpgradeable"; -export { ILayerZeroUserApplicationConfigUpgradeable__factory } from "./factories/@layerzerolabs/solidity-examples/contracts/contracts-upgradable/interfaces/ILayerZeroUserApplicationConfigUpgradeable__factory"; -export type { LzAppUpgradeable } from "./@layerzerolabs/solidity-examples/contracts/contracts-upgradable/lzApp/LzAppUpgradeable"; -export { LzAppUpgradeable__factory } from "./factories/@layerzerolabs/solidity-examples/contracts/contracts-upgradable/lzApp/LzAppUpgradeable__factory"; -export type { NonblockingLzAppUpgradeable } from "./@layerzerolabs/solidity-examples/contracts/contracts-upgradable/lzApp/NonblockingLzAppUpgradeable"; -export { NonblockingLzAppUpgradeable__factory } from "./factories/@layerzerolabs/solidity-examples/contracts/contracts-upgradable/lzApp/NonblockingLzAppUpgradeable__factory"; -export type { AccessControlUpgradeable } from "./@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable"; -export { AccessControlUpgradeable__factory } from "./factories/@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable__factory"; -export type { IAccessControlUpgradeable } from "./@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable"; -export { IAccessControlUpgradeable__factory } from "./factories/@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable__factory"; -export type { OwnableUpgradeable } from "./@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable"; -export { OwnableUpgradeable__factory } from "./factories/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable__factory"; -export type { IERC1822ProxiableUpgradeable } from "./@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol/IERC1822ProxiableUpgradeable"; -export { IERC1822ProxiableUpgradeable__factory } from "./factories/@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol/IERC1822ProxiableUpgradeable__factory"; -export type { IERC1967Upgradeable } from "./@openzeppelin/contracts-upgradeable/interfaces/IERC1967Upgradeable"; -export { IERC1967Upgradeable__factory } from "./factories/@openzeppelin/contracts-upgradeable/interfaces/IERC1967Upgradeable__factory"; -export type { IBeaconUpgradeable } from "./@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable"; -export { IBeaconUpgradeable__factory } from "./factories/@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable__factory"; -export type { ERC1967UpgradeUpgradeable } from "./@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable"; -export { ERC1967UpgradeUpgradeable__factory } from "./factories/@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable__factory"; -export type { Initializable } from "./@openzeppelin/contracts-upgradeable/proxy/utils/Initializable"; -export { Initializable__factory } from "./factories/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable__factory"; -export type { UUPSUpgradeable } from "./@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable"; -export { UUPSUpgradeable__factory } from "./factories/@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable__factory"; -export type { ContextUpgradeable } from "./@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable"; -export { ContextUpgradeable__factory } from "./factories/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable__factory"; -export type { ERC165Upgradeable } from "./@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable"; -export { ERC165Upgradeable__factory } from "./factories/@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable__factory"; -export type { IERC165Upgradeable } from "./@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable"; -export { IERC165Upgradeable__factory } from "./factories/@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable__factory"; -export type { Ownable } from "./@openzeppelin/contracts/access/Ownable"; -export { Ownable__factory } from "./factories/@openzeppelin/contracts/access/Ownable__factory"; -export type { IERC1822Proxiable } from "./@openzeppelin/contracts/interfaces/draft-IERC1822.sol/IERC1822Proxiable"; -export { IERC1822Proxiable__factory } from "./factories/@openzeppelin/contracts/interfaces/draft-IERC1822.sol/IERC1822Proxiable__factory"; -export type { IERC1967 } from "./@openzeppelin/contracts/interfaces/IERC1967"; -export { IERC1967__factory } from "./factories/@openzeppelin/contracts/interfaces/IERC1967__factory"; -export type { IBeacon } from "./@openzeppelin/contracts/proxy/beacon/IBeacon"; -export { IBeacon__factory } from "./factories/@openzeppelin/contracts/proxy/beacon/IBeacon__factory"; -export type { ERC1967Upgrade } from "./@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade"; -export { ERC1967Upgrade__factory } from "./factories/@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade__factory"; -export type { Proxy } from "./@openzeppelin/contracts/proxy/Proxy"; -export { Proxy__factory } from "./factories/@openzeppelin/contracts/proxy/Proxy__factory"; -export type { IERC20Metadata } from "./@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata"; -export { IERC20Metadata__factory } from "./factories/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata__factory"; -export type { IERC20Permit } from "./@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit"; -export { IERC20Permit__factory } from "./factories/@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit__factory"; -export type { IERC20 } from "./@openzeppelin/contracts/token/ERC20/IERC20"; -export { IERC20__factory } from "./factories/@openzeppelin/contracts/token/ERC20/IERC20__factory"; -export type { IERC165 } from "./@openzeppelin/contracts/utils/introspection/IERC165"; -export { IERC165__factory } from "./factories/@openzeppelin/contracts/utils/introspection/IERC165__factory"; -export type { BlockHeaderRegistry } from "./contracts/blockRegistry/BlockHeaderRegistry"; -export { BlockHeaderRegistry__factory } from "./factories/contracts/blockRegistry/BlockHeaderRegistry__factory"; -export type { BridgeCore } from "./contracts/bridge/BridgeCore"; -export { BridgeCore__factory } from "./factories/contracts/bridge/BridgeCore__factory"; -export type { BridgeMixedConsensus } from "./contracts/bridge/BridgeMixedConsensus"; -export { BridgeMixedConsensus__factory } from "./factories/contracts/bridge/BridgeMixedConsensus__factory"; -export type { IFaucet } from "./contracts/bridge/TokenBridge.sol/IFaucet"; -export { IFaucet__factory } from "./factories/contracts/bridge/TokenBridge.sol/IFaucet__factory"; -export type { TokenBridge } from "./contracts/bridge/TokenBridge.sol/TokenBridge"; -export { TokenBridge__factory } from "./factories/contracts/bridge/TokenBridge.sol/TokenBridge__factory"; -export type { IConsensus } from "./contracts/fuse/IConsensus"; -export { IConsensus__factory } from "./factories/contracts/fuse/IConsensus__factory"; -export type { AxelarHandlerUpgradeable } from "./contracts/messagePassingBridge/AxelarHandlerUpgradeable"; -export { AxelarHandlerUpgradeable__factory } from "./factories/contracts/messagePassingBridge/AxelarHandlerUpgradeable__factory"; -export type { BridgeHelperLibrary } from "./contracts/messagePassingBridge/BridgeHelperLibrary.sol/BridgeHelperLibrary"; -export { BridgeHelperLibrary__factory } from "./factories/contracts/messagePassingBridge/BridgeHelperLibrary.sol/BridgeHelperLibrary__factory"; -export type { ILayerZeroFeeEstimator } from "./contracts/messagePassingBridge/IMessagePassingBridge.sol/ILayerZeroFeeEstimator"; -export { ILayerZeroFeeEstimator__factory } from "./factories/contracts/messagePassingBridge/IMessagePassingBridge.sol/ILayerZeroFeeEstimator__factory"; -export type { IMessagePassingBridge } from "./contracts/messagePassingBridge/IMessagePassingBridge.sol/IMessagePassingBridge"; -export { IMessagePassingBridge__factory } from "./factories/contracts/messagePassingBridge/IMessagePassingBridge.sol/IMessagePassingBridge__factory"; -export type { LZHandlerUpgradeable } from "./contracts/messagePassingBridge/LZHandlerUpgradeable"; -export { LZHandlerUpgradeable__factory } from "./factories/contracts/messagePassingBridge/LZHandlerUpgradeable__factory"; -export type { MessagePassingBridge } from "./contracts/messagePassingBridge/MessagePassingBridge.sol/MessagePassingBridge"; -export { MessagePassingBridge__factory } from "./factories/contracts/messagePassingBridge/MessagePassingBridge.sol/MessagePassingBridge__factory"; -export type { GoodDollarMinterBurner } from "./contracts/oft/GoodDollarMinterBurner.sol/GoodDollarMinterBurner"; -export { GoodDollarMinterBurner__factory } from "./factories/contracts/oft/GoodDollarMinterBurner.sol/GoodDollarMinterBurner__factory"; -export type { GoodDollarOFTAdapter } from "./contracts/oft/GoodDollarOFTAdapter.sol/GoodDollarOFTAdapter"; -export { GoodDollarOFTAdapter__factory } from "./factories/contracts/oft/GoodDollarOFTAdapter.sol/GoodDollarOFTAdapter__factory"; -export type { GoodDollarOFTMinterBurner } from "./contracts/oft/GoodDollarOFTMinterBurner"; -export { GoodDollarOFTMinterBurner__factory } from "./factories/contracts/oft/GoodDollarOFTMinterBurner__factory"; -export type { ISuperGoodDollar } from "./contracts/oft/interfaces/ISuperGoodDollar"; -export { ISuperGoodDollar__factory } from "./factories/contracts/oft/interfaces/ISuperGoodDollar__factory"; -export type { ConsensusMock } from "./contracts/test/ConsensusMock"; -export { ConsensusMock__factory } from "./factories/contracts/test/ConsensusMock__factory"; -export type { ControllerMock } from "./contracts/test/ControllerMock"; -export { ControllerMock__factory } from "./factories/contracts/test/ControllerMock__factory"; -export type { GoodDollarOFTAdapterHarness } from "./contracts/test/GoodDollarOFTAdapterHarness"; -export { GoodDollarOFTAdapterHarness__factory } from "./factories/contracts/test/GoodDollarOFTAdapterHarness__factory"; -export type { IdentityMock } from "./contracts/test/IdentityMock"; -export { IdentityMock__factory } from "./factories/contracts/test/IdentityMock__factory"; -export type { LayerZeroEndpointMock } from "./contracts/test/LayerZeroEndpointMock"; -export { LayerZeroEndpointMock__factory } from "./factories/contracts/test/LayerZeroEndpointMock__factory"; -export type { MockGoodDollar } from "./contracts/test/MockGoodDollar"; -export { MockGoodDollar__factory } from "./factories/contracts/test/MockGoodDollar__factory"; -export type { Multicall } from "./contracts/test/MultiCall.sol/Multicall"; -export { Multicall__factory } from "./factories/contracts/test/MultiCall.sol/Multicall__factory"; -export type { NameServiceMock } from "./contracts/test/NameServiceMock"; -export { NameServiceMock__factory } from "./factories/contracts/test/NameServiceMock__factory"; -export type { TestRLPParser } from "./contracts/test/TestRLPParser"; -export { TestRLPParser__factory } from "./factories/contracts/test/TestRLPParser__factory"; -export type { TestToken } from "./contracts/test/TestToken.sol/TestToken"; -export { TestToken__factory } from "./factories/contracts/test/TestToken.sol/TestToken__factory"; -export type { TestToken10 } from "./contracts/test/TestToken.sol/TestToken10"; -export { TestToken10__factory } from "./factories/contracts/test/TestToken.sol/TestToken10__factory"; -export type { TestToken27 } from "./contracts/test/TestToken.sol/TestToken27"; -export { TestToken27__factory } from "./factories/contracts/test/TestToken.sol/TestToken27__factory"; -export type { TokenBridgeTest } from "./contracts/test/TokenBridgeTest"; -export { TokenBridgeTest__factory } from "./factories/contracts/test/TokenBridgeTest__factory"; -export type { VerifierTest } from "./contracts/test/VerifierTest"; -export { VerifierTest__factory } from "./factories/contracts/test/VerifierTest__factory"; -export type { IBlockHeaderRegistry } from "./contracts/test/VotingMock.sol/IBlockHeaderRegistry"; -export { IBlockHeaderRegistry__factory } from "./factories/contracts/test/VotingMock.sol/IBlockHeaderRegistry__factory"; -export type { VotingMock } from "./contracts/test/VotingMock.sol/VotingMock"; -export { VotingMock__factory } from "./factories/contracts/test/VotingMock.sol/VotingMock__factory"; diff --git a/yarn.lock b/yarn.lock index dfa99ea..10bd1dd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2096,8 +2096,11 @@ __metadata: "@axelar-network/axelarjs-sdk": "npm:^0.13.6" "@chainlink/env-enc": "npm:^1.0.5" "@gooddollar/goodprotocol": "npm:2.1.0" + "@layerzerolabs/devtools-evm-hardhat": "npm:^4.0.4" "@layerzerolabs/lz-definitions": "npm:^3.0.151" "@layerzerolabs/lz-evm-protocol-v2": "npm:^3.0.151" + "@layerzerolabs/lz-v2-utilities": "npm:^3.0.156" + "@layerzerolabs/metadata-tools": "npm:^3.0.3" "@layerzerolabs/oapp-evm": "npm:^0.4.1" "@layerzerolabs/oapp-evm-upgradeable": "npm:^0.1.3" "@layerzerolabs/oft-evm": "npm:^4.0.0" @@ -2105,6 +2108,7 @@ __metadata: "@layerzerolabs/scan-client": "npm:^0.0.6" "@layerzerolabs/solidity-examples": "npm:^0.0.13" "@layerzerolabs/toolbox-hardhat": "npm:~0.6.13" + "@layerzerolabs/ua-devtools": "npm:^5.0.2" "@nomicfoundation/hardhat-chai-matchers": "npm:^1.0.5" "@nomicfoundation/hardhat-network-helpers": "npm:^1.0.6" "@nomicfoundation/hardhat-verify": "npm:^2.1.0" @@ -2126,7 +2130,7 @@ __metadata: ethers: "npm:^5.*" hardhat: "npm:2.26" hardhat-contract-sizer: "npm:^2.6.1" - hardhat-deploy: "npm:^1.0.4" + hardhat-deploy: "npm:^0.12.4" hardhat-gas-reporter: "npm:^1.0.9" merkle-patricia-tree: "npm:^2.*" prettier: "npm:^2.5.1" @@ -2631,7 +2635,7 @@ __metadata: languageName: node linkType: hard -"@layerzerolabs/devtools-evm-hardhat@npm:~4.0.4": +"@layerzerolabs/devtools-evm-hardhat@npm:^4.0.4, @layerzerolabs/devtools-evm-hardhat@npm:~4.0.4": version: 4.0.4 resolution: "@layerzerolabs/devtools-evm-hardhat@npm:4.0.4" dependencies: @@ -2803,7 +2807,7 @@ __metadata: languageName: node linkType: hard -"@layerzerolabs/lz-v2-utilities@npm:^3.0.148": +"@layerzerolabs/lz-v2-utilities@npm:^3.0.148, @layerzerolabs/lz-v2-utilities@npm:^3.0.156": version: 3.0.156 resolution: "@layerzerolabs/lz-v2-utilities@npm:3.0.156" dependencies: @@ -2819,6 +2823,16 @@ __metadata: languageName: node linkType: hard +"@layerzerolabs/metadata-tools@npm:^3.0.3": + version: 3.0.3 + resolution: "@layerzerolabs/metadata-tools@npm:3.0.3" + peerDependencies: + "@layerzerolabs/devtools-evm-hardhat": ~4.0.0 + "@layerzerolabs/ua-devtools": ~5.0.1 + checksum: 10/82e75265a744bdd5ada327b9d1cc6414b5e9f1fa7736662bc393704665e8527fe7e2d665246310d31f970d774c5671f5b2d53dc68d43d505681882ffaef59a0c + languageName: node + linkType: hard + "@layerzerolabs/oapp-evm-upgradeable@npm:^0.1.3": version: 0.1.3 resolution: "@layerzerolabs/oapp-evm-upgradeable@npm:0.1.3" @@ -3039,7 +3053,7 @@ __metadata: languageName: node linkType: hard -"@layerzerolabs/ua-devtools@npm:~5.0.2": +"@layerzerolabs/ua-devtools@npm:^5.0.2, @layerzerolabs/ua-devtools@npm:~5.0.2": version: 5.0.2 resolution: "@layerzerolabs/ua-devtools@npm:5.0.2" peerDependencies: @@ -12418,9 +12432,9 @@ __metadata: languageName: node linkType: hard -"hardhat-deploy@npm:^1.0.4": - version: 1.0.4 - resolution: "hardhat-deploy@npm:1.0.4" +"hardhat-deploy@npm:^0.12.4": + version: 0.12.4 + resolution: "hardhat-deploy@npm:0.12.4" dependencies: "@ethersproject/abi": "npm:^5.7.0" "@ethersproject/abstract-signer": "npm:^5.7.0" @@ -12433,6 +12447,7 @@ __metadata: "@ethersproject/solidity": "npm:^5.7.0" "@ethersproject/transactions": "npm:^5.7.0" "@ethersproject/wallet": "npm:^5.7.0" + "@types/qs": "npm:^6.9.7" axios: "npm:^0.21.1" chalk: "npm:^4.1.2" chokidar: "npm:^3.5.2" @@ -12443,9 +12458,9 @@ __metadata: fs-extra: "npm:^10.0.0" match-all: "npm:^1.2.6" murmur-128: "npm:^0.2.1" - neoqs: "npm:^6.13.0" + qs: "npm:^6.9.4" zksync-ethers: "npm:^5.0.0" - checksum: 10/41b4784703a29a1690578a34fd8bb75c463347e7050c55ef39ca1d183fef5463bc8a1f679d57e5f7228524fc6abf8e499f8edbe1bcbc801abd10e3ac3299f9f3 + checksum: 10/127feddc4f95eaa530e7fe77021f7634e23f7f182a8a2e6d51ef5c7254037b05862c54aaa79dd7e07cac627dbae6bff68f8439851ca048ccc571110704998f9d languageName: node linkType: hard @@ -16401,13 +16416,6 @@ __metadata: languageName: node linkType: hard -"neoqs@npm:^6.13.0": - version: 6.13.0 - resolution: "neoqs@npm:6.13.0" - checksum: 10/222ac1cc370a3906c24cbc3e384dea47f993d593200b35d5f97ccb03e7248b405889d480a668ddb131898ec3d5049dffc4ddc1910d75f96772ded9c6a33f103a - languageName: node - linkType: hard - "next-tick@npm:^1.1.0": version: 1.1.0 resolution: "next-tick@npm:1.1.0"